17 lines
622 B
Go
17 lines
622 B
Go
|
package model
|
||
|
|
||
|
// User
|
||
|
// @description: 后台用户表
|
||
|
type User struct {
|
||
|
Base
|
||
|
Account string `json:"account" gorm:"type:varchar(50);not null;index:idx_account;comment: '登陆账号'"`
|
||
|
Password string `json:"password" gorm:"type:varchar(255);not null;comment: '密码'"`
|
||
|
Avatar string `json:"avatar" gorm:"type:varchar(255);default null;comment: '头像'"`
|
||
|
Nickname string `json:"nickname" gorm:"type:varchar(50);not null;comment: '昵称'"`
|
||
|
Contact string `json:"contact" gorm:"type:varchar(255);default null;comment: '联系方式(邮箱|电话)'"`
|
||
|
}
|
||
|
|
||
|
func (User) TableName() string {
|
||
|
return "t_user"
|
||
|
}
|