schema

package
v0.0.0-...-3363d21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatus

func GetStatus(code int) string

func GetUserType

func GetUserType(code int) string

Types

type Notice

type Notice struct {
	ID        uint64     `json:"id"`
	CreatedAt types.Time `json:"createdAt"`
	StartTime types.Time `json:"startTime"`
	EndTime   types.Time `json:"endTime"`
	Title     string     `json:"title"`
	Content   string     `json:"content"`
	Operator  string     `json:"operator"`
}

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 NoticeGetPageResp struct {
	List  []*Notice `json:"list"`
	Total int64     `json:"total"`
}

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 Role

type Role struct {
	ID       uint64 `json:"id"`
	UserID   uint64 `json:"user_id"`
	UserName string `json:"user_name"`
	Value    string `json:"value"`
}

type User

type User struct {
	ID        uint64     `json:"id"`
	Username  string     `json:"username"`
	Password  string     `json:"password"`
	Avatar    string     `json:"avatar"`
	UserType  string     `json:"user_type"`
	State     string     `json:"state"`
	CreatedAt types.Time `json:"createdAt"`
	UpdatedAt types.Time `json:"updatedAt"`
}

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 UserGetPageReqResult struct {
	List  []*User `json:"list"`
	Total int64   `json:"total"`
}

type UserInfo

type UserInfo struct {
	Roles        []string
	Introduction string
	Avatar       string
	Name         string
}

type UserRole

type UserRole struct {
	UserName  string
	UserID    uint64
	UserRoles []*Role
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL