0
0

更新代码

This commit is contained in:
2020-08-04 10:09:42 +08:00
parent 6118b5b63b
commit c2ac5d964e
478 changed files with 34410 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Models;
class GoodsParamStock extends Model
{
public function goods()
{
return $this->belongsTo(Goods::class,'goods_id','id');
}
public function param()
{
return $this->belongsTo(GoodsParams::class,'goods_param_id','id');
}
protected function getRuleTextAttribute()
{
switch ($this->rule_sign) {
case 'SHELVE_MANAGER':
return '入库:初始化库存';
case 'UNSHELVE_MANAGER':
return '出库:管理员删除商品';
case 'MALL_GOODS':
return '出库:用户购买商品';
case 'PLUS_MANAGER':
return '入库:管理员商品补仓';
case 'MINUS_MANAGER':
return '出库:管理员出库商品';
default:
return '未知情况';
}
}
}