<?php

namespace Modules\Cart\Models;

use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    protected $table = "order";
    protected $fillable = [
        'code',
        'customer_id',
        'status',
        'discount',
        'shipping_fee',
        'amount',
        'delivery_address',
        'commune_id',
        'district_id',
        'province_id',
        'country_id',
        'delivery_location_id',
        'delivery_district_id',
        'delivery_note',
        'note',
        'warehouse_id',
        'shipper_id',
        'shipping_code',
        'prepaid_amount',
        'promotion_code',
        'payment_type',
        'payment_status',
        'zip_code',
        'type',
        'search',
        'product_quantity',
        'shipping_type',
        'verifier_id',
        'payment_account'
    ];

    public function orderItems() {
        return $this->hasMany(OrderItem::class);
    }

}
