43 lines
960 B
PHP
43 lines
960 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Juil;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class PmisEquipment extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $table = 'pmis_equipments';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'tenant_id',
|
||
|
|
'company_name',
|
||
|
|
'equipment_code',
|
||
|
|
'equipment_name',
|
||
|
|
'specification',
|
||
|
|
'unit',
|
||
|
|
'equipment_number',
|
||
|
|
'operator',
|
||
|
|
'inspection_end_date',
|
||
|
|
'inspection_not_applicable',
|
||
|
|
'insurance_end_date',
|
||
|
|
'insurance_not_applicable',
|
||
|
|
'options',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'inspection_end_date' => 'date',
|
||
|
|
'inspection_not_applicable' => 'boolean',
|
||
|
|
'insurance_end_date' => 'date',
|
||
|
|
'insurance_not_applicable' => 'boolean',
|
||
|
|
'options' => 'array',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function scopeTenant($query, $tenantId)
|
||
|
|
{
|
||
|
|
return $query->where('tenant_id', $tenantId);
|
||
|
|
}
|
||
|
|
}
|