This commit is contained in:
zhouchangcheng 2024-05-27 15:53:42 +08:00
parent 6dddb19629
commit 186e05311e
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* @property GoodsItem $good_item
* @property GoodsItem $item
*/
class Good extends Base
{

View File

@ -14,7 +14,8 @@ class GoodsItem extends Base
'item_id', 'brand', 'color_name', 'sell_point', 'specifications', 'shop_url', 'product_images', 'images',
'product_infos', 'app_introduce', 'applet_introduce'
];
public function Good () : BelongsTo{
public function good(): BelongsTo
{
return $this->belongsTo(Good::class, 'item_id', 'itemid');
}
}