2022-08-06 15:25:13 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2022-09-02 18:42:57 +08:00
|
|
|
use App\Models\traits\Filter;
|
|
|
|
|
|
2022-08-06 15:25:13 +08:00
|
|
|
class BusinessGoodsSku extends Model
|
|
|
|
|
{
|
2022-09-02 18:42:57 +08:00
|
|
|
use Filter;
|
|
|
|
|
|
|
|
|
|
//查询字段
|
|
|
|
|
public $fieldSearchable = [
|
|
|
|
|
'external_sku_id',
|
|
|
|
|
'goods_name',
|
|
|
|
|
'shop_id',
|
|
|
|
|
];
|
|
|
|
|
|
2022-09-08 01:02:07 +08:00
|
|
|
protected $hidden = [
|
|
|
|
|
'activity_no',
|
|
|
|
|
'goods_desc',
|
|
|
|
|
'goods_image_list',
|
|
|
|
|
'is_activity_delete',
|
|
|
|
|
'limit_buy',
|
|
|
|
|
'market_price',
|
|
|
|
|
'update_time',
|
|
|
|
|
'price_in_fen',
|
|
|
|
|
'quantity',
|
|
|
|
|
'goods_purchase_price',
|
|
|
|
|
'quantity_type',
|
|
|
|
|
'reserve_quantity',
|
|
|
|
|
'sold_quantity',
|
|
|
|
|
'spec_list',
|
|
|
|
|
'spec_name',
|
|
|
|
|
'thumb_url',
|
|
|
|
|
'total_quantity',
|
|
|
|
|
'updated_at',
|
|
|
|
|
'create_time'
|
|
|
|
|
];
|
|
|
|
|
|
2022-08-09 16:56:52 +08:00
|
|
|
protected $fillable = [
|
2023-01-29 14:03:58 +08:00
|
|
|
'title',
|
2022-08-09 16:56:52 +08:00
|
|
|
'shop_id',
|
2023-01-29 13:31:43 +08:00
|
|
|
'activity_no',
|
|
|
|
|
'update_time',
|
|
|
|
|
'create_time',
|
2022-08-09 16:56:52 +08:00
|
|
|
'category_name',
|
|
|
|
|
'external_sku_id',
|
|
|
|
|
'goods_id',
|
|
|
|
|
'goods_name',
|
|
|
|
|
'goods_purchase_price',
|
|
|
|
|
'sku_id',
|
|
|
|
|
'thumb_url',
|
2023-01-29 13:31:43 +08:00
|
|
|
'quantity_type',
|
|
|
|
|
'limit_buy',
|
|
|
|
|
'goods_image_list',
|
|
|
|
|
'quantity',
|
|
|
|
|
'spec_list',
|
|
|
|
|
'reserve_quantity',
|
|
|
|
|
'total_quantity',
|
|
|
|
|
'spec_name',
|
|
|
|
|
'sold_quantity',
|
|
|
|
|
'price_in_fen',
|
2022-08-09 16:56:52 +08:00
|
|
|
];
|
2022-09-02 18:42:57 +08:00
|
|
|
|
|
|
|
|
public function shop()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(Shop::class, 'id', 'shop_id');
|
|
|
|
|
}
|
2022-08-06 15:25:13 +08:00
|
|
|
}
|