mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
83 lines
1.8 KiB
PHP
83 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\traits\Filter;
|
|
|
|
class BusinessOrder extends Model
|
|
{
|
|
use Filter;
|
|
|
|
public $fieldSearchable = [
|
|
'participate_no',
|
|
'shop_id',
|
|
'activity_no',
|
|
'shipping_status',
|
|
'is_supplier',
|
|
'cancel_status',
|
|
'after_sales_status',
|
|
'supply_participate_no',
|
|
'confirm_at_start',
|
|
'confirm_at_end',
|
|
'goods_sku_num',
|
|
'print_status',
|
|
'ids',
|
|
'pno',
|
|
'order_sn',
|
|
'id',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'shop_id',
|
|
'receiver_address_detail',
|
|
'receiver_address_province',
|
|
'self_pick_site_no',
|
|
'discount_amount',
|
|
'theoretical_refund_amount',
|
|
'receiver_address_district',
|
|
'verification_status',
|
|
'inner_transaction_id',
|
|
'is_supplier',
|
|
'service_amount',
|
|
'supply_participate_no',
|
|
'updated_at',
|
|
'order_amount',
|
|
'receiver_address_city',
|
|
'receiver_name',
|
|
'business_note',
|
|
'buyer_memo',
|
|
'logistics_type',
|
|
'help_sell_nickname',
|
|
'activity_title',
|
|
'after_sales_status',
|
|
'mall_activity_type',
|
|
'transaction_id',
|
|
'activity_no',
|
|
'confirm_at',
|
|
'platform_discount_amount',
|
|
'participate_no',
|
|
'receiver_mobile',
|
|
'shipping_status',
|
|
'shipping_amount',
|
|
'cancel_status',
|
|
'nick_name',
|
|
'order_sn',
|
|
];
|
|
|
|
|
|
public function items()
|
|
{
|
|
return $this->hasMany(BusinessOrderItem::class, 'business_order_id');
|
|
}
|
|
|
|
public function shop()
|
|
{
|
|
return $this->belongsTo(Shop::class, 'shop_id', 'id');
|
|
}
|
|
|
|
public function waybill()
|
|
{
|
|
return $this->belongsTo(Waybill::class, 'id', 'order_id');
|
|
}
|
|
}
|