2026-03-12 14:13:38 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Juil;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class PmisEquipment extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
2026-03-19 20:21:42 +09:00
|
|
|
protected $connection = 'codebridge';
|
|
|
|
|
|
2026-03-12 14:13:38 +09:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|