You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
621 B
17 lines
621 B
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type User struct {
|
|
ID uint64 `gorm:"primarykey"`
|
|
UserName string `gorm:"index:username;type:varchar(64)"`
|
|
Password string `gorm:"type:varchar(64)"`
|
|
Salt string `gorm:"type:varchar(64)"`
|
|
Avatar string `gorm:"type:varchar(256)"`
|
|
BackgroundImage string `gorm:"type:varchar(256)"`
|
|
Signature string `gorm:"type:varchar(512)"`
|
|
CreatedAt time.Time `gorm:"type:TIMESTAMP;default:CURRENT_TIMESTAMP"`
|
|
UpdatedAt time.Time `gorm:"type:TIMESTAMP;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP"`
|
|
}
|
|
|