- 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
32 lines
531 B
PHP
32 lines
531 B
PHP
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use think\Model;
|
|
use think\model\concern\SoftDelete;
|
|
|
|
/**
|
|
* 有关时间的模型
|
|
* Class TimeModel
|
|
* @package app\common\model
|
|
*/
|
|
class TimeModel extends Model
|
|
{
|
|
|
|
/**
|
|
* 软删除
|
|
*/
|
|
use SoftDelete;
|
|
|
|
protected function getOptions(): array
|
|
{
|
|
return [
|
|
'autoWriteTimestamp' => true,
|
|
'createTime' => 'create_time',
|
|
'updateTime' => 'update_time',
|
|
'deleteTime' => false,
|
|
];
|
|
}
|
|
|
|
|
|
} |