admin_user.go
928 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package domain
import "time"
//AdminUser 管理员
type AdminUser struct {
//id
Id int64 `json:"id"`
//账号
Account string `json:"account"`
//密码
Password string `json:"password"`
//管理员名称
AdminName string `json:"adminName"`
//是否是默认系统账号
IsDefault bool `json:"isDefault"`
//账号是否可用
IsUsable bool `json:"isUserable"`
//创建时间
CreateAt time.Time `json:"createAt"`
//用户权限id
Permission []AdminPermissionBase `json:"permission"`
}
type AdminUserFindQuery struct {
AccountLike string
Offset int
Limit int
}
type AdminUserFindOneQuery struct {
AdminUserId int64
AccountEqual string
}
type AdminUserRepository interface {
Save(*AdminUser) (*AdminUser, error)
FindOne(qureyOptions AdminUserFindOneQuery) (*AdminUser, error)
Find(queryOptions AdminUserFindQuery) ([]AdminUser, error)
CountAll(queryOption AdminUserFindQuery) (int, error)
}