usermngmt/model.go

33 lines
626 B
Go
Raw Normal View History

2021-11-08 04:53:03 +00:00
package usermngmt
import (
"time"
)
// User ...
type User struct {
2021-11-09 04:48:24 +00:00
ID string `json:"_id"`
Name string `json:"name"`
Phone string `json:"phone"`
Email string `json:"email"`
Status string `json:"status"`
Role RoleShort `json:"role"`
Other string `json:"other"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type RoleShort struct {
ID string `json:"_id"`
Name string `json:"name"`
IsAdmin bool `json:"isAdmin"`
}
type (
2021-11-09 07:16:34 +00:00
// UserAll ...
UserAll struct {
List []User `json:"list"`
Total int64 `json:"total"`
2021-11-09 04:48:24 +00:00
}
)