14 lines
319 B
Go
14 lines
319 B
Go
package models
|
|
|
|
// User 最小用户模型占位
|
|
type User struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Username string `gorm:"size:64;not null;uniqueIndex" json:"username"`
|
|
Password string `gorm:"size:255;not null" json:"-"`
|
|
}
|
|
|
|
// TableName 返回表名
|
|
func (User) TableName() string {
|
|
return "users"
|
|
}
|