mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update ShopOrderItem.php
This commit is contained in:
parent
c10936ab9e
commit
ac664a269d
@ -20,4 +20,16 @@ class ShopOrderItem extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasOne(ShopGoods::class, 'code', 'goods_code');
|
return $this->hasOne(ShopGoods::class, 'code', 'goods_code');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定商品数据
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function bindGoods()
|
||||||
|
{
|
||||||
|
$this->goods()->bind([
|
||||||
|
'goods_name' => 'name',
|
||||||
|
'goods_cover' => 'cover',
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user