49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class JaheshOperation extends Model
|
|
{
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [
|
|
'province_id',
|
|
'created_at'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'operation_1' => 'array',
|
|
'operation_2' => 'array',
|
|
'operation_3' => 'array',
|
|
'operation_4' => 'array',
|
|
'operation_5' => 'array',
|
|
'operation_6' => 'array',
|
|
'operation_7' => 'array',
|
|
'operation_8' => 'array',
|
|
'operation_9' => 'array',
|
|
'operation_10' => 'array',
|
|
'operation_11' => 'array',
|
|
'operation_12' => 'array'
|
|
];
|
|
|
|
public function operationHistories()
|
|
{
|
|
return $this->hasMany('App\Models\JaheshOperationHistory');
|
|
}
|
|
|
|
public function province()
|
|
{
|
|
return $this->belongsTo('App\Models\Province');
|
|
}
|
|
}
|