init: 项目初始代码

This commit is contained in:
2026-10-14 14:00:29 +08:00
commit cc434cf89f
464 changed files with 66984 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace app\api\model;
/**
* 语言包模型
* @mixin \think\Model
*/
class Language extends BaseModel
{
protected $schema = [
'id' => 'int',
'name' => 'string',
'code' => 'string',
'icon' => 'string',
'locale' => 'string',
'coin' => 'string',
'sort' => 'int',
'status' => 'int',
'create_time' => 'int',
'update_time' => 'int'
];
/**
* 查找语言包是否被使用
* @param $id
* @return array|\think\Model|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getLanguageUse($id)
{
return Platform::where('language_id',$id)->find();
}
}