chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | YwxApp [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2026-2036 http://ywxapp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: ywxapp<admin@ywxapp.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace ywxapp\model;
|
||||
|
||||
/**
|
||||
* Configure 类
|
||||
*
|
||||
* @author ywxapp <admin@ywxapp.cn>
|
||||
*/
|
||||
class Configure extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
public function getTitleAttr($value)
|
||||
{
|
||||
return lang($value);
|
||||
}
|
||||
|
||||
public function getGroupAttr($value)
|
||||
{
|
||||
return lang($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行时自愈:确保 configure 主表存在(install.sql 为事实源)。
|
||||
*/
|
||||
public static function ensureSchema(): void
|
||||
{
|
||||
BaseModel::ensureTableFromInstall(BaseModel::currentPrefix(), 'configure');
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化:自愈建表,避免远程库缺失 wxapp_configure 导致 1146。
|
||||
*/
|
||||
protected function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
self::ensureSchema();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user