- 删除了 StoreBranchProduct、WarehouseProduct 和 WarehouseProductStorege 模型中的 onBeforeWrite 和 onAfterWrite 钩子方法 - 移除了用于记录更新前后日志的代码 - 简化了模型结构,提高了代码可读性和性能
49 lines
1007 B
PHP
49 lines
1007 B
PHP
<?php
|
|
|
|
namespace app\common\model\warehouse_product;
|
|
|
|
|
|
use app\common\model\BaseModel;
|
|
use Illuminate\Support\Facades\Log;
|
|
use think\model\concern\SoftDelete;
|
|
use Throwable;
|
|
|
|
/**
|
|
* 商品仓储信息模型
|
|
* Class WarehouseProduct
|
|
* @package app\common\model\warehouse_product
|
|
*/
|
|
class WarehouseProduct extends BaseModel
|
|
{
|
|
use SoftDelete;
|
|
protected $name = 'warehouse_product';
|
|
protected $deleteTime = 'delete_time';
|
|
public $ignoreLogFields = [
|
|
'price',
|
|
'total_price',
|
|
'status',
|
|
'pay_type',
|
|
'is_pay',
|
|
'vip_price',
|
|
'cost',
|
|
'purchase',
|
|
'total_price',
|
|
'mark',
|
|
'after_nums',
|
|
'before_nums',
|
|
'batch',
|
|
'enter_admin_id',
|
|
'admin_id',
|
|
'financial_pm',
|
|
'expiration_date',
|
|
'manufacture',
|
|
'code',
|
|
'oid',
|
|
'unit',
|
|
'store_id',
|
|
'supplier_id',
|
|
'warehouse_id',
|
|
'create_time',
|
|
'update_time',
|
|
];
|
|
} |