refactor(admin): optimize log data processing and display
- Update log data serialization and deserialization method - Improve log data display format in the admin interface- Refactor log model initialization and table suffix handling - Optimize time model configuration for better timestamp management
This commit is contained in:
@@ -13,28 +13,20 @@ use think\model\concern\SoftDelete;
|
||||
class TimeModel extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* 自动时间戳类型
|
||||
* @var string
|
||||
*/
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
* @var string
|
||||
*/
|
||||
protected $createTime = 'create_time';
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
* @var string
|
||||
*/
|
||||
protected $updateTime = 'update_time';
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*/
|
||||
use SoftDelete;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected function getOptions(): array
|
||||
{
|
||||
return [
|
||||
'autoWriteTimestamp' => true,
|
||||
'createTime' => 'create_time',
|
||||
'updateTime' => 'update_time',
|
||||
'deleteTime' => false,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user