package domain import "time" // PasswordHistory 密码历史记录(防止重复使用旧密码) type PasswordHistory struct { ID int64 `gorm:"primaryKey;autoIncrement" json:"id"` UserID int64 `gorm:"not null;index" json:"user_id"` PasswordHash string `gorm:"type:varchar(255);not null" json:"-"` CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"` } // TableName 指定表名 func (PasswordHistory) TableName() string { return "password_histories" }