38 lines
967 B
PHP
38 lines
967 B
PHP
<?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();
|
|
}
|
|
}
|