优化install安装流程

This commit is contained in:
2026-03-18 17:15:01 +08:00
parent 299c012063
commit e8c77943b5
32 changed files with 330 additions and 74 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use support\think\Db;
@@ -23,6 +24,8 @@ use support\think\Db;
*/
class Admin extends Model
{
use TimestampInteger;
protected string $table = 'admin';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
/**
@@ -11,6 +12,8 @@ use support\think\Model;
*/
class AdminGroup extends Model
{
use TimestampInteger;
protected string $table = 'admin_group';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -6,6 +6,7 @@ namespace app\admin\model;
use Throwable;
use app\admin\library\Auth;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use Webman\Http\Request;
@@ -14,6 +15,8 @@ use Webman\Http\Request;
*/
class AdminLog extends Model
{
use TimestampInteger;
protected string $table = 'admin_log';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,10 +4,13 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
class AdminRule extends Model
{
use TimestampInteger;
protected string $table = 'admin_rule';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
/**
@@ -11,6 +12,8 @@ use support\think\Model;
*/
class Config extends Model
{
use TimestampInteger;
public static string $cacheTag = 'sys_config';
protected string $table = 'config';

View File

@@ -14,6 +14,8 @@ class CrudLog extends Model
protected bool $updateTime = false;
protected array $type = [
'create_time' => 'integer',
'update_time' => 'integer',
'table' => 'array',
'fields' => 'array',
];

View File

@@ -4,10 +4,13 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
class DataRecycle extends Model
{
use TimestampInteger;
protected string $table = 'security_data_recycle';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,11 +4,14 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use think\model\relation\BelongsTo;
class DataRecycleLog extends Model
{
use TimestampInteger;
protected string $table = 'security_data_recycle_log';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -13,6 +13,8 @@ class SensitiveData extends Model
protected bool $autoWriteTimestamp = true;
protected array $type = [
'create_time' => 'integer',
'update_time' => 'integer',
'data_fields' => 'array',
];
}

View File

@@ -4,11 +4,14 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use think\model\relation\BelongsTo;
class SensitiveDataLog extends Model
{
use TimestampInteger;
protected string $table = 'security_sensitive_data_log';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,11 +4,14 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use think\model\relation\BelongsTo;
class User extends Model
{
use TimestampInteger;
protected string $table = 'user';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,10 +4,13 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
class UserGroup extends Model
{
use TimestampInteger;
protected string $table = 'user_group';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -2,11 +2,14 @@
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use think\model\relation\BelongsTo;
class UserMoneyLog extends Model
{
use TimestampInteger;
protected string $table = 'user_money_log';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -4,10 +4,13 @@ declare(strict_types=1);
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
class UserRule extends Model
{
use TimestampInteger;
protected string $table = 'user_rule';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -2,11 +2,14 @@
namespace app\admin\model;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
use think\model\relation\BelongsTo;
class UserScoreLog extends Model
{
use TimestampInteger;
protected string $table = 'user_score_log';
protected string $pk = 'id';
protected bool $autoWriteTimestamp = true;

View File

@@ -2,6 +2,7 @@
namespace app\admin\model\mall;
use app\common\model\traits\TimestampInteger;
use support\think\Model;
/**
@@ -9,6 +10,8 @@ use support\think\Model;
*/
class Player extends Model
{
use TimestampInteger;
// 表名
protected $name = 'mall_player';