2023-10-02 22:15:33 +00:00
|
|
|
<?php namespace Romanah\Gokbakja\Models;
|
|
|
|
|
|
|
|
|
|
use Model;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Model
|
|
|
|
|
*/
|
|
|
|
|
class SewerProduction extends Model
|
|
|
|
|
{
|
|
|
|
|
use \October\Rain\Database\Traits\Validation;
|
|
|
|
|
|
|
|
|
|
use \October\Rain\Database\Traits\SoftDelete;
|
|
|
|
|
|
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
|
|
2023-10-20 21:54:07 +00:00
|
|
|
public $hasMany = [
|
|
|
|
|
'pivot_sewer' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\PivotSewer',
|
2023-10-29 19:54:41 +00:00
|
|
|
'key' => 'sewer_production_id',
|
|
|
|
|
'softDelete' => true
|
2023-11-21 19:52:16 +00:00
|
|
|
]
|
2023-10-20 21:54:07 +00:00
|
|
|
];
|
|
|
|
|
|
2023-12-17 12:43:47 +00:00
|
|
|
public $hasOne = [
|
|
|
|
|
'pivot_sewer_lst' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\PivotSewer',
|
|
|
|
|
'key' => 'sewer_production_id',
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
|
2023-10-02 22:15:33 +00:00
|
|
|
public $belongsTo = [
|
|
|
|
|
'employee' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\Employee',
|
|
|
|
|
'key' => 'employee_id'
|
|
|
|
|
],
|
2023-11-07 07:37:33 +00:00
|
|
|
'rulon_action' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\RulonAction',
|
|
|
|
|
'key' => 'rulon_action_id'
|
2023-10-20 21:54:07 +00:00
|
|
|
],
|
2023-11-23 13:47:30 +00:00
|
|
|
'shift' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\Shift',
|
|
|
|
|
'key' => 'shift_id'
|
|
|
|
|
],
|
|
|
|
|
'sewer_machine' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\SewerMachine',
|
|
|
|
|
'key' => 'sewer_machine_id'
|
|
|
|
|
],
|
2023-12-15 21:52:51 +00:00
|
|
|
'color' => [
|
|
|
|
|
'Romanah\Gokbakja\Models\BagColor',
|
|
|
|
|
'key' => 'color_id'
|
|
|
|
|
],
|
2023-10-02 22:15:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var string The database table used by the model.
|
|
|
|
|
*/
|
|
|
|
|
public $table = 'romanah_gokbakja_sewer_production';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array Validation rules
|
|
|
|
|
*/
|
|
|
|
|
public $rules = [
|
|
|
|
|
];
|
|
|
|
|
}
|