g_sto/plugins/romanah/gokbakja/models/ProductionMachine.php

79 lines
1.8 KiB
PHP
Raw Normal View History

2023-09-14 20:16:27 +00:00
<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class ProductionMachine extends Model
{
use \October\Rain\Database\Traits\Validation;
2023-09-16 06:18:02 +00:00
2023-09-14 20:16:27 +00:00
use \October\Rain\Database\Traits\SoftDelete;
2023-10-18 21:12:32 +00:00
protected $dates = ['deleted_at', 'date'];
2023-09-14 20:16:27 +00:00
2023-10-20 21:54:07 +00:00
public $hasMany = [
'sewer_productions' => [
'Romanah\Gokbakja\Models\SewerProduction',
2023-12-15 21:52:51 +00:00
'key' => 'rulon_action_id',
2023-10-29 19:54:41 +00:00
'softDelete' => true
2023-10-20 21:54:07 +00:00
],
'pivot_sewer' => [
'Romanah\Gokbakja\Models\PivotSewer',
2023-11-07 19:42:21 +00:00
'key' => 'rulon_action_id',
2023-10-29 19:54:41 +00:00
'softDelete' => true
2023-10-20 21:54:07 +00:00
],
2023-12-15 21:52:51 +00:00
];
public $hasOne = [
'rulonAction' => [
'Romanah\Gokbakja\Models\RulonAction',
'key' => 'product_id',
],
2023-10-20 21:54:07 +00:00
];
2023-09-16 06:18:02 +00:00
public $belongsTo = [
'bag_type' => [
'Romanah\Gokbakja\Models\BagType',
'key' => 'type_id'
],
'bag_size' => [
'Romanah\Gokbakja\Models\BagSize',
'key' => 'size_id'
],
'machine' => [
'Romanah\Gokbakja\Models\Machine',
'key' => 'machine_id'
],
'employee' => [
'Romanah\Gokbakja\Models\Employee',
'key' => 'employee_id'
],
'mechanic' => [
'Romanah\Gokbakja\Models\Employee',
'key' => 'mechanic_id'
],
2023-10-18 21:12:32 +00:00
'color' => [
'Romanah\Gokbakja\Models\BagColor',
'key' => 'color_id'
],
2023-11-23 17:30:57 +00:00
'shift' => [
'Romanah\Gokbakja\Models\Shift',
'key' => 'shift_id'
],
2023-09-16 06:18:02 +00:00
];
2023-09-14 20:16:27 +00:00
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_production_machine';
/**
* @var array Validation rules
*/
public $rules = [
];
}