62 lines
1.7 KiB
PHP
62 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\NoticeTypeEnum;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Uwil\LaravelActivityLogs\Traits\HasActivityLog;
|
|
use Uwil\LaravelBackend\Traits\Models\HasCache;
|
|
use Uwil\LaravelBackend\Traits\Models\HasModelNaming;
|
|
use Uwil\LaravelI18n\Traits\Models\HasTranslations;
|
|
|
|
/**
|
|
* @property integer $id Id of the notice.
|
|
* @property string $title Title of the notice.
|
|
* @property string $message Message of the notice.
|
|
* @property integer $type Type of the notice.
|
|
* @property-read \Illuminate\Support\Carbon $created_at Date the notice password was created.
|
|
* @property-read \Illuminate\Support\Carbon $updated_at Date the notice password was updated.
|
|
* @property-read \Illuminate\Support\Carbon $deleted_at Date the notice password was deleted.
|
|
*/
|
|
class Notice extends Model
|
|
{
|
|
use HasActivityLog;
|
|
use HasCache;
|
|
/** @use \Illuminate\Database\Eloquent\Factories\HasFactory<\Database\Factories\NoticeFactory> */
|
|
use HasFactory;
|
|
use HasModelNaming;
|
|
use HasTranslations;
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
protected $fillable = [
|
|
'title',
|
|
'message',
|
|
'type',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'type' => NoticeTypeEnum::class,
|
|
];
|
|
|
|
/**
|
|
* The translatable columns.
|
|
*
|
|
* @var list<string>
|
|
*/
|
|
public $translatable = [
|
|
'title',
|
|
'message',
|
|
];
|
|
}
|