package auth import ( "time" "gorm.io/gorm" ) // User 用户模型 type User struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` Username string `gorm:"uniqueIndex;not null" json:"username"` Password string `gorm:"not null" json:"-"` Email string `gorm:"index" json:"email"` Nickname string `json:"nickname"` Role string `gorm:"default:'user'" json:"role"` Status string `gorm:"default:'active'" json:"status"` Permissions string `gorm:"type:text" json:"permissions"` }