mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class BusinessOrderItem extends Model
|
|
{
|
|
protected $fillable = [
|
|
'shop_id',
|
|
'business_order_id',
|
|
'already_cancel_number',
|
|
'cancel_status',
|
|
'category_name',
|
|
'external_sku_id',
|
|
'goods_amount',
|
|
'goods_cost_price',
|
|
'goods_id',
|
|
'goods_name',
|
|
'goods_number',
|
|
'goods_price',
|
|
'goods_purchase_price',
|
|
'goods_specification',
|
|
'help_sell_amount',
|
|
'is_supplier',
|
|
'need_verification_number',
|
|
'shipping_status',
|
|
'sku_id',
|
|
'sub_order_sn',
|
|
'theoretically_refund_amount',
|
|
'thumb_url',
|
|
'verification_number',
|
|
];
|
|
|
|
public function order()
|
|
{
|
|
return $this->belongsTo(BusinessOrder::class, 'business_order_id', 'id');
|
|
}
|
|
|
|
public function shop()
|
|
{
|
|
return $this->belongsTo(Shop::class, 'shop_id', 'id');
|
|
}
|
|
|
|
public function goodsSkuLocation()
|
|
{
|
|
return $this->hasOne(GoodsSkuLocation::class, 'external_sku_id', 'external_sku_id');
|
|
}
|
|
|
|
public function goodsSku()
|
|
{
|
|
return $this->hasOne(GoodsSku::class, 'external_sku_id', 'external_sku_id');
|
|
}
|
|
}
|