fix: change username to name and add profile pic to staff

This commit is contained in:
ericprd
2025-03-03 10:39:01 +08:00
parent c02d8cda69
commit afe6f4e9a6
6 changed files with 37 additions and 27 deletions
+7 -6
View File
@@ -5,10 +5,11 @@ import (
)
type Staff struct {
ID string `gorm:"primaryKey" json:"id"`
Username string `gorm:"default:null;unique" json:"username"`
Email string `gorm:"unique;not null" json:"email"`
Password string `gorm:"not null" json:"password"`
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"default:null;unique" json:"name"`
ProfilePicture string `gorm:"default:null" json:"profile_picture"`
Email string `gorm:"unique;not null" json:"email"`
Password string `gorm:"not null" json:"password"`
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
}