refactor: 修改model
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user