1 | <?php |
||
7 | class Orders extends Model |
||
8 | { |
||
9 | public $timestamps = false; |
||
10 | public $incrementing = true; |
||
11 | protected $table = 'orders'; |
||
12 | protected $primaryKey = 'id'; |
||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $fillable = [ |
||
17 | 'employee_id', |
||
18 | 'customer_id', |
||
19 | 'order_date', |
||
20 | 'shipped_date', |
||
21 | 'shipper_id', |
||
22 | 'ship_name', |
||
23 | 'ship_address', |
||
24 | 'ship_city', |
||
25 | 'ship_state_province', |
||
26 | 'ship_zip_postal_code', |
||
27 | 'ship_country_region', |
||
28 | 'shipping_fee', |
||
29 | 'taxes', |
||
30 | 'payment_type', |
||
31 | 'paid_date', |
||
32 | 'notes', |
||
33 | 'tax_rate', |
||
34 | 'tax_status_id', |
||
35 | 'status_id', |
||
36 | ]; |
||
37 | |||
38 | /** |
||
39 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
40 | */ |
||
41 | public function employee() |
||
42 | { |
||
43 | return $this->belongsTo(Employees::class, 'employee_id'); |
||
44 | } |
||
45 | } |
||
46 |