2026-03-12 15:59:51 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Juil;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class PmisWorkVolume extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
2026-03-19 20:21:42 +09:00
|
|
|
protected $connection = 'codebridge';
|
|
|
|
|
|
2026-03-12 15:59:51 +09:00
|
|
|
protected $table = 'pmis_work_volumes';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'tenant_id',
|
|
|
|
|
'work_type',
|
|
|
|
|
'sub_work_type',
|
|
|
|
|
'unit',
|
|
|
|
|
'design_quantity',
|
|
|
|
|
'daily_report_applied',
|
|
|
|
|
'options',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'design_quantity' => 'decimal:2',
|
|
|
|
|
'daily_report_applied' => 'boolean',
|
|
|
|
|
'options' => 'array',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function scopeTenant($query, $tenantId)
|
|
|
|
|
{
|
|
|
|
|
return $query->where('tenant_id', $tenantId);
|
|
|
|
|
}
|
|
|
|
|
}
|