File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 99)
1010
1111type Role struct {
12- ID uuid.UUID `gorm:"type:uuid; "`
12+ ID uuid.UUID `gorm:"primaryKey; type:char(36) "`
1313 Role string `gorm:"unique"`
1414}
1515
Original file line number Diff line number Diff line change 99)
1010
1111type Session struct {
12- ID uuid.UUID `gorm:"type:uuid; "`
13- UserID uuid.UUID `gorm:"type:uuid; "`
12+ ID uuid.UUID `gorm:"primaryKey; type:char(36) "`
13+ UserID uuid.UUID `gorm:"type:char(36) "`
1414 User User
1515 UserAgent string
1616 IP string
Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ import (
1010)
1111
1212type User struct {
13- ID uuid.UUID `gorm:"type:uuid; "`
13+ ID uuid.UUID `gorm:"primaryKey; type:char(36) "`
1414 FirstName string
1515 LastName string
1616 Email string `gorm:"unique"`
17- Password string
17+ Password string `gorm:"type:text"`
1818 SignupMethod string
1919 EmailVerifiedAt int64
20- CreatedAt int64 `gorm:"autoCreateTime"`
21- UpdatedAt int64 `gorm:"autoUpdateTime"`
22- Image string
20+ CreatedAt int64 `gorm:"autoCreateTime"`
21+ UpdatedAt int64 `gorm:"autoUpdateTime"`
22+ Image string `gorm:"type:text"`
2323 Roles string
2424}
2525
Original file line number Diff line number Diff line change 99)
1010
1111type VerificationRequest struct {
12- ID uuid.UUID `gorm:"type:uuid; "`
13- Token string `gorm:"index "`
12+ ID uuid.UUID `gorm:"primaryKey; type:char(36) "`
13+ Token string `gorm:"type:text "`
1414 Identifier string
1515 ExpiresAt int64
1616 CreatedAt int64 `gorm:"autoCreateTime"`
You can’t perform that action at this time.
0 commit comments