<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    use HasFactory;
    
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'orders';

    /**
    * The database primary key value.
    *
    * @var string
    */
    protected $primaryKey = 'id';

    /**
     * Attributes that should be mass-assignable.
     *
     * @var array
     */
    protected $fillable = [
        'order_number',
        'user_id',
        'angel_id', 
        'is_subscription', 
        'subscription_id', 
        'ref_number', 
        'customer_name', 
        'customer_email',  
        'customer_phone', 
        'source_latitude', 
        'source_longitude', 
        'destination_latitude', 
        'destination_longitude', 
        'flat_no', 
        'google_address', 
        'address',
        'landmark',
        'state_name',
        'city_name',
        'source_postal_code',
        'destination_postal_code',
        'source_google_place_id',
        'destination_google_place_id',
        'location_name',
        'user_type',
        'order_type',
        'vehicle_number',
        'table_number',
        'pickup_type',
        'assoonas',
        'contact_less_delivery',
        'order_description',
        'order_assign_datetime',
        'delivery_date',
        'time_to_pack',
        'delivery_time_slot',
        'delivered_time',
        'offer_percentage',
        'offer_amount',
        'tax_percentage',
        'tax_amount',
        'delivery_charge',
        'order_sub_total',
        'order_grand_total',
        'cardfee_percentage',
        'cardfee_price',
        'payment_status',
        'payment_method',
        'payment_method_id',
        'referral_wallet_id',
        'referral_used',
        'payment_wallet',
        'paid_full',
        'split_payment',
        'wallet_amount',
        'transaction_id',
        'distance',
        'angel_invoice',
        'angel_invoice_number',
        'angel_deliver_date',
        'angel_charge',
        'angel_cash_in_hand_status',
        'failed_reason',
        'voucher_code',
        'voucher_id',
        'voucher_mode',
        'voucher_percentage',
        'voucher_amount',
        'status',
        'order_mode',
        'accepted_by',
        'ip',
        'otp'
    ];
}
