123456789101112131415161718192021222324252627282930313233343536373839 |
- package user_service
- import (
- "tmr-watch/http/handle/restful"
- "github.com/casbin/casbin"
- )
- type User struct {
- ID int
- Username string
- Password string
- Fullname string
- Deptid int
- Role int
- CreatedBy string
- ModifiedBy string
- Imei string
- PastureId string
- PageNum int
- PageSize int
- Enforcer *casbin.Enforcer `inject:""`
- }
- func (a *User) Check() (bool, error) {
- return restful.CheckUser(a.Username, a.Password)
- }
- func (a *User) CheckFace() (bool, error) {
- return restful.CheckUser(a.Username, a.Password)
- }
- // func (a *User) CheckImei() (bool, error) {
- // return restful.CheckImei(a.Username, a.Imei)
- // }
|