<?php namespace Romanah\Gokbakja\Models;

use Model;

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

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

    protected $dates = ['deleted_at'];

    public $hasMany = [
        'sewer_productions' => [
            'Romanah\Gokbakja\Models\SewerProduction',
            'key' => 'rulon_action_id'
        ]
    ];

    public $belongsTo = [
        'product' => [
            'Romanah\Gokbakja\Models\ProductionMachine',
            'key'=>'product_id'
        ],
        'stock' => [
            'Romanah\Gokbakja\Models\Stock',
            'key'=>'stock_id'
        ],
        'user' => [
            'RainLab\User\Models\User',
            'key'=>'user_id'
        ],
    ];

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

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