Files
backend/app/Models/RoadConstructionProject.php
2024-02-01 09:53:53 +00:00

33 lines
642 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class RoadConstructionProject extends Model
{
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'operation_sub_types' => 'array',
'physical_progress' => 'array',
'project_stop_reasons' => 'array'
];
public function user()
{
return $this->belongsTo('App\Models\User');
}
/**
* Get all of the project's files.
*/
public function files()
{
return $this->morphMany('App\Models\ProjectFile', 'project_fileable');
}
}