-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acd9686
commit e698db2
Showing
2 changed files
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
package models | ||
|
||
// gorm supports the use of composite primary keys | ||
// combination of wallet address and email must be unique | ||
// https://gorm.io/docs/composite_primary_key.html | ||
|
||
type User struct { | ||
WalletAddress string `gorm:"primaryKey;type:varchar(42);not null" json:"walletAddress"` | ||
Email string `gorm:"primaryKey;not null" json:"email"` | ||
Username string `json:"username"` | ||
WalletAddress string `gorm:"type:varchar(42);not null" json:"walletAddress"` | ||
} |