erp/app/Models/BusinessGoodsSku.php

81 lines
1.7 KiB
PHP
Raw Normal View History

<?php
namespace App\Models;
2022-09-02 18:42:57 +08:00
use App\Models\traits\Filter;
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 = [
'self_sku_id',
'activity_no',
'goods_desc',
'goods_image_list',
'is_activity_delete',
'limit_buy',
'market_price',
'update_time',
'goods_purchase_price',
'price_in_fen',
'quantity',
'goods_purchase_price',
'price_in_fen',
'quantity',
'quantity_type',
'reserve_quantity',
'sold_quantity',
'spec_list',
'spec_name',
'thumb_url',
'total_quantity',
'updated_at',
'create_time'
];
/**
* 不可批量赋值的属性。为空则所有熟悉都可以批量赋值
*
* @var array
*/
2022-08-09 16:56:52 +08:00
protected $fillable = [
'shop_id',
'business_order_id',
'already_cancel_number',
'cancel_status',
'category_name',
'external_sku_id',
'goods_amount',
'goods_cost_price',
'goods_id',
'goods_name',
'goods_number',
'goods_price',
'goods_purchase_price',
'goods_specification',
'help_sell_amount',
'is_supplier',
'need_verification_number',
'shipping_status',
'sku_id',
'sub_order_sn',
'theoretically_refund_amount',
'thumb_url',
'verification_number',
'quantity_type'
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');
}
}