44 lines
917 B
PHP
44 lines
917 B
PHP
<?php namespace Romanah\Gokbakja\Models;
|
|
|
|
use Model;
|
|
|
|
/**
|
|
* Model
|
|
*/
|
|
class PivotProduction extends Model
|
|
{
|
|
use \October\Rain\Database\Traits\Validation;
|
|
|
|
use \October\Rain\Database\Traits\SoftDelete;
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
public $hasMany = [
|
|
'pivot_production_calculate' => [
|
|
'Romanah\Gokbakja\Models\ProductionCalculate',
|
|
'key' => 'prev_pivot_id'
|
|
]
|
|
];
|
|
|
|
public $belongsTo = [
|
|
'production' => [
|
|
'Romanah\Gokbakja\Models\Production',
|
|
'key' => 'production_id',
|
|
],
|
|
'product' => [
|
|
'Romanah\Gokbakja\Models\Product',
|
|
'key' => 'product_id'
|
|
],
|
|
];
|
|
/**
|
|
* @var string The database table used by the model.
|
|
*/
|
|
public $table = 'romanah_gokbakja_pivot_production';
|
|
|
|
/**
|
|
* @var array Validation rules
|
|
*/
|
|
public $rules = [
|
|
];
|
|
}
|