• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

miaoxing / app / 13066009386

20 Jan 2025 04:18PM UTC coverage: 22.581%. Remained the same
13066009386

push

github

twinh
fix(app): 解决 `g-config` 命令将 `[id].jsx` 排在最前面导致其他页面失效

42 of 186 relevant lines covered (22.58%)

3.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Service/UserModel.php
1
<?php
2

3
namespace Miaoxing\App\Service;
4

5
use Miaoxing\App\Model\BelongsToGroupTrait;
6
use Miaoxing\App\Model\HasPermissionTrait;
7
use Miaoxing\Plugin\Service\UserModel as BaseUserModel;
8

9
/**
10
 * @property string|null $id
11
 * @property string $appId
12
 * @property string $outId
13
 * @property int $adminType 管理员类型
14
 * @property string $groupId 用户组
15
 * @property bool $isAdmin
16
 * @property string $nickName
17
 * @property string $remarkName
18
 * @property string $username
19
 * @property string $name
20
 * @property string $email
21
 * @property string $mobile
22
 * @property string|null $mobileVerifiedAt 手机校验时间
23
 * @property string $phone
24
 * @property string $password
25
 * @property int $sex
26
 * @property string $country
27
 * @property string $province
28
 * @property string $city
29
 * @property string $district
30
 * @property string $address
31
 * @property string $signature
32
 * @property bool $isEnabled 是否启用
33
 * @property string $avatar
34
 * @property string|null $lastLoginAt
35
 * @property string|null $createdAt
36
 * @property string|null $updatedAt
37
 * @property string $createdBy
38
 * @property string $updatedBy
39
 * @property int $score 积分
40
 * @property string $money 账户余额
41
 * @property string $rechargeMoney 充值账户余额
42
 * @property string $source 用户来源
43
 * @property string|null $displayName
44
 * @property RoleModel|RoleModel[] $roles
45
 * @property RoleModel|RoleModel[] $enabledRoles
46
 * @property PermissionModel|PermissionModel[] $permissions
47
 * @property PermissionModel|PermissionModel[] $enabledPermissions
48
 * @property GroupModel $group
49
 */
50
class UserModel extends BaseUserModel
51
{
52
    use BelongsToGroupTrait;
53
    use HasPermissionTrait;
54

55
    /**
56
     * @return RoleModel|RoleModel[]
57
     */
58
    public function roles(): RoleModel
59
    {
60
        return $this->belongsToMany(RoleModel::class)->whereNull('roles_users.deleted_at');
×
61
    }
62

63
    /**
64
     * @return RoleModel|RoleModel[]
65
     */
66
    public function enabledRoles(): RoleModel
67
    {
68
        return $this->roles()->where('isEnabled', true);
×
69
    }
70

71
    /**
72
     * @return PermissionModel|PermissionModel[]
73
     */
74
    public function permissions(): PermissionModel
75
    {
76
        return $this->belongsToMany(PermissionModel::class)->whereNull('permissions_users.deleted_at');
×
77
    }
78

79
    /**
80
     * @return PermissionModel|PermissionModel[]
81
     */
82
    public function enabledPermissions(): PermissionModel
83
    {
84
        return $this->permissions()->where('isEnabled', true);
×
85
    }
86
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc