<?php

namespace App\Models;

class BusinessOrder extends Model
{
    /**
     * 不可批量赋值的属性。为空则所有熟悉都可以批量赋值
     *
     * @var array
     */
    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');
    }
}
