<?php namespace Romanah\Gokbakja\Models;

use Model;

/**
 * Model
 */
class ShippingTransport extends Model
{
    use \October\Rain\Database\Traits\Validation;

    use \October\Rain\Database\Traits\SoftDelete;

    protected $dates = ['deleted_at'];


    /**
     * @var string The database table used by the model.
     */
    public $table = 'romanah_gokbakja_shipping_transport';

    public $hasMany = [
        'loaded_items' => [
            'Romanah\Gokbakja\Models\LoadTransport',
            'key' => 'transport_id',
            'softDelete' => true
        ]

    ];

    public $belongsTo = [
        'shipping' => [
            'Romanah\Gokbakja\Models\Shipping',
            'key' => 'shipping_id'
        ],
        'order_item' => [
            'Romanah\Gokbakja\Models\OrderItem',
            'key' => 'order_item_id'
        ]
    ];
    /**
     * @var array Validation rules
     */
    public $rules = [
    ];
}
