feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
This commit is contained in:
16
internal/domain/password_history.go
Normal file
16
internal/domain/password_history.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user