49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $title
|
|
* @property string $keywords
|
|
* @property string $content
|
|
* @property string $description
|
|
* @property \Carbon\Carbon $created_at
|
|
* @property int $created_by
|
|
* @property \Carbon\Carbon $updated_at
|
|
* @property int $updated_by
|
|
* @property int $deleted_at
|
|
* @property int $deleted_by
|
|
* @property int $platform
|
|
* @property int $is_record
|
|
* @property string $cover
|
|
*/
|
|
class AppNews extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*/
|
|
protected ?string $table = 'app_news';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected array $fillable = [];
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*/
|
|
protected array $casts = ['id' => 'integer', 'created_at' => 'datetime', 'created_by' => 'integer', 'updated_at' => 'datetime', 'updated_by' => 'integer', 'deleted_at' => 'integer', 'deleted_by' => 'integer', 'platform' => 'integer', 'is_record' => 'integer'];
|
|
|
|
protected ?string $dateFormat = 'U';
|
|
|
|
public function getCreatedAtAttribute($value)
|
|
{
|
|
return date('Y-m-d H:i:s', intval($value));
|
|
}
|
|
}
|