mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 12:34:03 +00:00
38 lines
757 B
PHP
38 lines
757 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Order extends AbstractModel
|
|
{
|
|
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'orders';
|
|
|
|
protected $fillable = [
|
|
'company_id', 'marking', 'forwarder_id', 'address_id', 'current_step', 'complete'
|
|
];
|
|
|
|
public function orderSteps()
|
|
{
|
|
return $this->hasMany(OrderStep::class, 'order_id');
|
|
}
|
|
|
|
public function packages()
|
|
{
|
|
return $this->hasMany(Package::class, 'order_id');
|
|
}
|
|
|
|
public function shippingArrangement()
|
|
{
|
|
return $this->hasOne(ShippingArrangement::class, 'order_id');
|
|
}
|
|
|
|
public function deliveryArrangement()
|
|
{
|
|
return $this->hasOne(DeliveryArrangement::class, 'order_id');
|
|
}
|
|
}
|