mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-08-09 23:17:24 +08:00
modified 修改model文件全部为严格模式
This commit is contained in:
parent
5e010f593a
commit
f222973875
@ -1,15 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare (strict_types=1);
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @since 2018-02-08
|
* @since 2018-02-08
|
||||||
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace app\model;
|
namespace app\model;
|
||||||
|
|
||||||
|
use think\model\relation\HasMany;
|
||||||
|
|
||||||
class AdminAuthGroup extends Base {
|
class AdminAuthGroup extends Base {
|
||||||
|
|
||||||
public function rules() {
|
public function rules(): HasMany {
|
||||||
return $this->hasMany('AdminAuthRule', 'group_id', 'id');
|
return $this->hasMany('AdminAuthRule', 'group_id', 'id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare (strict_types=1);
|
||||||
/**
|
/**
|
||||||
* @since 2017-11-02
|
* @since 2017-11-02
|
||||||
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
||||||
@ -6,11 +7,13 @@
|
|||||||
|
|
||||||
namespace app\model;
|
namespace app\model;
|
||||||
|
|
||||||
|
use think\model\relation\HasOne;
|
||||||
|
|
||||||
class AdminUser extends Base {
|
class AdminUser extends Base {
|
||||||
|
|
||||||
protected $autoWriteTimestamp = true;
|
protected $autoWriteTimestamp = true;
|
||||||
|
|
||||||
public function userData() {
|
public function userData(): HasOne {
|
||||||
return $this->hasOne('AdminUserData', 'uid', 'id');
|
return $this->hasOne('AdminUserData', 'uid', 'id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user