Documentation ¶
Index ¶
- func GetStatus(code int) string
- func GetUserType(code int) string
- type Notice
- type NoticeCreateReq
- type NoticeGetPageReq
- type NoticeGetPageResp
- type NoticeUpdateReq
- type Pagination
- type Role
- type User
- type UserCreateReq
- type UserGetPageReq
- type UserGetPageReqResult
- type UserInfo
- type UserRole
- type UserUpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserType ¶
Types ¶
type NoticeCreateReq ¶
type NoticeCreateReq struct { StartTime types.Time `json:"startTime" validate:"required"` EndTime types.Time `json:"endTime" validate:"required"` Title string `json:"title" validate:"required,min=2,max=150"` Content string `json:"content" validate:"required,min=2"` Operator string `json:"operator" validate:"required,min=2,max=150"` }
func (*NoticeCreateReq) Verify ¶
func (m *NoticeCreateReq) Verify() string
type NoticeGetPageReq ¶
type NoticeGetPageReq struct {
Pagination
}
type NoticeGetPageResp ¶
type NoticeUpdateReq ¶
type NoticeUpdateReq struct { ID uint64 `json:"id" validate:"required"` StartTime types.Time `json:"startTime" validate:"required"` EndTime types.Time `json:"endTime" validate:"required"` Title string `json:"title" validate:"required,min=2,max=150"` Content string `json:"content" validate:"required,min=2"` Operator string `json:"operator" binding:"required,min=2,max=150"` }
func (*NoticeUpdateReq) Verify ¶
func (m *NoticeUpdateReq) Verify() string
type Pagination ¶
type Pagination struct { PageNum int `form:"pageNum,default=1"` PageSize int `form:"pageSize,default=10" validate:"max=100"` }
func (*Pagination) Verify ¶
func (m *Pagination) Verify() string
type UserCreateReq ¶
type UserCreateReq struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required,min=6,max=12"` UserType int `json:"user_type" validate:"required"` Avatar string `json:"avatar"` }
func (*UserCreateReq) Verify ¶
func (m *UserCreateReq) Verify() string
type UserGetPageReq ¶
type UserGetPageReq struct { Pagination Name string `form:"name"` }
type UserGetPageReqResult ¶
type UserUpdateReq ¶
type UserUpdateReq struct { ID uint64 `json:"id" validate:"required"` Username string `json:"username" validate:"required"` Password string `json:"password" validate:"max=12"` UserType int `json:"user_type" validate:"required"` Avatar string `json:"avatar"` }
func (*UserUpdateReq) Verify ¶
func (m *UserUpdateReq) Verify() string
Click to show internal directories.
Click to hide internal directories.