2026-05-24 13:14:41 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// User 用户实体。
|
|
|
|
|
type User struct {
|
2026-05-24 13:53:03 +08:00
|
|
|
ID uint `json:"id" gorm:"primaryKey"`
|
|
|
|
|
Username string `json:"username" gorm:"uniqueIndex;size:32"`
|
|
|
|
|
Password string `json:"-"`
|
|
|
|
|
Email string `json:"email,omitempty" gorm:"size:128"`
|
2026-05-24 13:14:41 +08:00
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
|
}
|