44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $keyword
|
|
* @property \Carbon\Carbon $created_at
|
|
* @property \Carbon\Carbon $updated_at
|
|
* @property int $deleted_at
|
|
* @property int $is_delete
|
|
* @property int $queried_at
|
|
* @property int $platform
|
|
*/
|
|
class AppKeywordsMonitor extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*/
|
|
protected ?string $table = 'app_keywords_monitor';
|
|
|
|
/**
|
|
* 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', 'updated_at' => 'datetime', 'deleted_at' => 'integer', 'is_delete' => 'integer', 'queried_at' => 'integer', 'platform' => 'integer'];
|
|
|
|
function getQueriedAtAttribute($value): string
|
|
{
|
|
if (!$value) {
|
|
return '未查询';
|
|
}
|
|
return date('Y-m-d H:i:s', intval($value)) ?: '未查询';
|
|
}
|
|
}
|