-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace PHPSTORM_META { | ||
|
||
use Miaoxing\Plugin\Service\User; | ||
|
||
override(User::cur(), map([ | ||
'' => \Miaoxing\App\Service\UserModel::class, | ||
])); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Miaoxing\App\Metadata; | ||
|
||
/** | ||
* @property string|null $id | ||
* @property string $appId | ||
* @property string $outId | ||
* @property int $adminType 管理员类型 | ||
* @property string $groupId 用户组 | ||
* @property bool $isAdmin | ||
* @property string $nickName | ||
* @property string $remarkName | ||
* @property string $username | ||
* @property string $name | ||
* @property string $email | ||
* @property string $mobile | ||
* @property string|null $mobileVerifiedAt 手机校验时间 | ||
* @property string $phone | ||
* @property string $password | ||
* @property int $sex | ||
* @property string $country | ||
* @property string $province | ||
* @property string $city | ||
* @property string $district | ||
* @property string $address | ||
* @property string $signature | ||
* @property bool $isEnabled 是否启用 | ||
* @property string $avatar | ||
* @property string|null $lastLoginAt | ||
* @property string|null $createdAt | ||
* @property string|null $updatedAt | ||
* @property string $createdBy | ||
* @property string $updatedBy | ||
* @property int $score 积分 | ||
* @property string $money 账户余额 | ||
* @property string $rechargeMoney 充值账户余额 | ||
* @property string $source 用户来源 | ||
* @property mixed $isMobileVerified | ||
* @property string|null $displayName | ||
* @internal will change in the future | ||
*/ | ||
trait UserTrait | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Miaoxing\App\Service; | ||
|
||
use Miaoxing\Admin\Service\GroupModel; | ||
use Miaoxing\App\Metadata\UserTrait; | ||
use Miaoxing\Plugin\Service\UserModel as BaseUserModel; | ||
|
||
/** | ||
* @property GroupModel $group | ||
*/ | ||
class UserModel extends BaseUserModel | ||
{ | ||
use UserTrait; | ||
|
||
public function group() | ||
{ | ||
return $this->hasOne(GroupModel::class, 'id', 'groupId'); | ||
} | ||
} |