Files

48 lines
1.2 KiB
PHP

<?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();
}
}