user_info.go 325 B

12345678910111213
  1. package settings
  2. type UserInfo struct {
  3. Username string `json:"username" binding:"required,alphanum"` // 用户名
  4. Password string `json:"password" binding:"required,min=6,max=30"` // 密码
  5. }
  6. func NewUserInfo(userName, password string) *UserInfo {
  7. return &UserInfo{
  8. Username: userName,
  9. Password: password,
  10. }
  11. }