fix: add created_at field on user profile

This commit is contained in:
ericprd
2025-03-17 22:50:37 +08:00
parent efab193793
commit d7fa8496b0
3 changed files with 12 additions and 8 deletions
+10 -8
View File
@@ -6,11 +6,12 @@ import (
)
type User struct {
ID string `json:"id"`
SubscribeID string `json:"subscribe_id"`
Password string `json:"password"`
Email string `json:"email"`
Phone string `json:"phone"`
ID string `json:"id"`
SubscribeID string `json:"subscribe_id"`
Password string `json:"password"`
Email string `json:"email"`
Phone string `json:"phone"`
CreatedAt time.Time `json:"created_at"`
Subscribe subscribe.Subscribe `gorm:"foreignKey:SubscribeID" json:"subscribe"`
}
@@ -23,9 +24,10 @@ type UserRegister struct {
}
type UserProfile struct {
ID string `json:"id"`
Email string `json:"email"`
Phone string `json:"phone"`
ID string `json:"id"`
Email string `json:"email"`
Phone string `json:"phone"`
CreatedAt time.Time `json:"created_at"`
Subscribe subscribe.Subscribe `gorm:"foreignKey:SubscribeID" json:"subscribe"`
}