mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-08-30 21:29:45 +08:00
Update ShopGoodsItem.php
This commit is contained in:
parent
1368f1e986
commit
7ad9baa59c
@ -3,6 +3,7 @@
|
|||||||
namespace app\data\model;
|
namespace app\data\model;
|
||||||
|
|
||||||
use think\admin\Model;
|
use think\admin\Model;
|
||||||
|
use think\model\relation\HasMany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商城商品规格模型
|
* 商城商品规格模型
|
||||||
@ -11,6 +12,16 @@ use think\admin\Model;
|
|||||||
*/
|
*/
|
||||||
class ShopGoodsItem extends Model
|
class ShopGoodsItem extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联商品规格
|
||||||
|
* @return \think\model\relation\HasMany
|
||||||
|
*/
|
||||||
|
public function items(): HasMany
|
||||||
|
{
|
||||||
|
return $this->hasMany(ShopGoodsItem::class, 'goods_code', 'code');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化创建时间
|
* 格式化创建时间
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user