67 lines
1.5 KiB
PHP
67 lines
1.5 KiB
PHP
<?php namespace Romanah\Gokbakja\Models;
|
|
|
|
use Model;
|
|
|
|
/**
|
|
* Model
|
|
*/
|
|
class ProductionMachine extends Model
|
|
{
|
|
use \October\Rain\Database\Traits\Validation;
|
|
|
|
use \October\Rain\Database\Traits\SoftDelete;
|
|
|
|
protected $dates = ['deleted_at', 'date'];
|
|
|
|
public $hasMany = [
|
|
'sewer_productions' => [
|
|
'Romanah\Gokbakja\Models\SewerProduction',
|
|
'key' => 'machine_production_id',
|
|
'softDelete' => true
|
|
],
|
|
'pivot_sewer' => [
|
|
'Romanah\Gokbakja\Models\PivotSewer',
|
|
'key' => 'machine_production_id',
|
|
'softDelete' => true
|
|
],
|
|
];
|
|
|
|
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'
|
|
],
|
|
'color' => [
|
|
'Romanah\Gokbakja\Models\BagColor',
|
|
'key' => 'color_id'
|
|
],
|
|
];
|
|
|
|
/**
|
|
* @var string The database table used by the model.
|
|
*/
|
|
public $table = 'romanah_gokbakja_production_machine';
|
|
|
|
/**
|
|
* @var array Validation rules
|
|
*/
|
|
public $rules = [
|
|
];
|
|
}
|