36 lines
716 B
PHP
36 lines
716 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Juil;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class PmisWorkReportPhoto extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $table = 'pmis_work_report_photos';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'tenant_id',
|
||
|
|
'report_id',
|
||
|
|
'photo_path',
|
||
|
|
'location',
|
||
|
|
'content',
|
||
|
|
'photo_date',
|
||
|
|
'sort_order',
|
||
|
|
'options',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'photo_date' => 'date',
|
||
|
|
'options' => 'array',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function report(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(PmisDailyWorkReport::class, 'report_id');
|
||
|
|
}
|
||
|
|
}
|