2026-03-12 17:06:23 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Juil;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class PmisWorkReportMaterial extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
2026-03-19 20:21:42 +09:00
|
|
|
protected $connection = 'codebridge';
|
|
|
|
|
|
2026-03-12 17:06:23 +09:00
|
|
|
protected $table = 'pmis_work_report_materials';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'tenant_id',
|
|
|
|
|
'report_id',
|
|
|
|
|
'material_name',
|
|
|
|
|
'specification',
|
|
|
|
|
'unit',
|
|
|
|
|
'design_qty',
|
|
|
|
|
'prev_cumulative',
|
|
|
|
|
'today_count',
|
|
|
|
|
'sort_order',
|
|
|
|
|
'options',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'design_qty' => 'decimal:2',
|
|
|
|
|
'prev_cumulative' => 'decimal:2',
|
|
|
|
|
'today_count' => 'decimal:2',
|
|
|
|
|
'options' => 'array',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function report(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(PmisDailyWorkReport::class, 'report_id');
|
|
|
|
|
}
|
|
|
|
|
}
|