<?php namespace Romanah\Gokbakja\Models;

use Model;

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

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

    protected $dates = ['deleted_at'];

    public $belongsTo = [
        'order' => [
            'Romanah\Gokbakja\Models\Order',
            'key' => 'order_id'
        ],
        'product' => [
            'Romanah\Gokbakja\Models\Product',
            'key' => 'product_id'
        ],
        'size' => [
            'Romanah\Gokbakja\Models\BagSize',
            'key' => 'size_id'
        ],
        'type' => [
            'Romanah\Gokbakja\Models\BagType',
            'key' => 'type_id'
        ],
        'color' => [
            'Romanah\Gokbakja\Models\BagColor',
            'key' => 'color_id'
        ],
    ];


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

    /**
     * @var array Validation rules
     */
    public $rules = [
    ];
}
