123456789101112131415161718192021222324252627282930 |
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- package entity
- import (
- "time"
- )
- const TableNameUser = "user"
- // User mapped from table <user>
- type User struct {
- UID int64 `gorm:"column:uid;type:int;primaryKey;autoIncrement:true" json:"uid"`
- Nickname string `gorm:"column:nickname;type:varchar(30);not null" json:"nickname"`
- Email string `gorm:"column:email;type:varchar(50);not null" json:"email"`
- Password string `gorm:"column:password;type:char(32);not null" json:"password"`
- Salt string `gorm:"column:salt;type:char(6);not null" json:"salt"`
- Avatar *string `gorm:"column:avatar;type:varchar(200)" json:"avatar"` // 头像
- Status int64 `gorm:"column:status;type:tinyint;not null;default:1" json:"status"`
- CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"` // 创建时间
- UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"` // 更新时间
- }
- // TableName User's table name
- func (*User) TableName() string {
- return TableNameUser
- }
|