goodsnotices/app/Models/GoodsItem.php
2024-05-27 16:03:31 +08:00

35 lines
894 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $item_id
* @property string $brand
* @property string $color_name
* @property string $sell_point
* @property string $specifications
* @property string $shop_url
* @property string $product_images
* @property string $images
* @property string $product_infos
* @property string $app_introduce
* @property string $applet_introduce
* @property string $created_at
* @property string $updated_at
* @property Good $good
*/
class GoodsItem extends Base
{
public $fillable = [
'item_id', 'brand', 'color_name', 'sell_point', 'specifications', 'shop_url', 'product_images', 'images',
'product_infos', 'app_introduce', 'applet_introduce'
];
public function good(): BelongsTo
{
return $this->belongsTo(Good::class, 'item_id', 'itemid');
}
}