Files
xin-school/modules/Merchant/Models/MerchantProductModel.php
T
2026-06-17 09:13:49 +08:00

43 lines
895 B
PHP

<?php
namespace Modules\Merchant\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class MerchantProductModel extends Model
{
use SoftDeletes;
protected $table = 'merchant_products';
protected $fillable = [
'merchant_id',
'category_id',
'name',
'description',
'images',
'price',
'original_price',
'stock',
'unit',
'sales',
'status',
'is_recommend',
'sort',
];
protected $casts = [
'merchant_id' => 'integer',
'category_id' => 'integer',
'images' => 'array',
'price' => 'decimal:2',
'original_price' => 'decimal:2',
'stock' => 'integer',
'sales' => 'integer',
'status' => 'integer',
'is_recommend' => 'integer',
'sort' => 'integer',
];
}