36 lines
652 B
PHP
36 lines
652 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ProjectUpdate extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'project_id',
|
|
'user_id',
|
|
'title',
|
|
'content',
|
|
'progress_percent_at_update',
|
|
'is_public',
|
|
];
|
|
|
|
protected $casts = [
|
|
'progress_percent_at_update' => 'integer',
|
|
'is_public' => 'boolean',
|
|
];
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|