Files
nl-mall-api/app/Models/ProductModel.php
lq 5bd5938e5c
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
初始化项目
2025-05-19 16:54:25 +08:00

24 lines
439 B
PHP

<?php
namespace App\Models;
use App\BaseApp\BaseModel;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ProductModel extends BaseModel
{
protected $table = 'product';
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $guarded = [];
public function images(): HasMany
{
return $this->hasMany(ProductImageModel::class, 'product_id', 'id');
}
}