You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
674 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class WeeklyBrief extends Model
{
protected $fillable = [
'week_start',
'week_end',
'title',
'markdown',
'stats_json',
'admin_user_id',
'generated_at',
];
protected $casts = [
'week_start' => 'date',
'week_end' => 'date',
'stats_json' => 'array',
'generated_at' => 'datetime',
'admin_user_id' => 'integer',
];
public function adminUser(): BelongsTo
{
return $this->belongsTo(AdminUser::class, 'admin_user_id');
}
}