refactor: 修改model

This commit is contained in:
2025-01-13 09:28:15 +08:00
parent 355b378301
commit 8cea2c4e56
15 changed files with 231 additions and 143 deletions

View File

@@ -3,34 +3,13 @@ declare (strict_types = 1);
namespace app\admin\model\v1;
use think\Model;
use app\common\model\LanguageBaseModel;
/**
* @mixin \think\Model
*/
class LanguageModel extends Model
class LanguageModel extends LanguageBaseModel
{
// 表名
protected $name = 'sys_language';
// 主键
protected $pk = 'id';
// 字段信息
protected $schema = [
'id' => 'int',
'country_id' => 'int',
'name' => 'string',
'code' => 'string',
'icon' => 'string',
'url' => 'string',
'status' => 'int',
'is_default' => 'int',
'sort' => 'int',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
// 关联国家
public function country()
{