Test ID as foreign key

This commit is contained in:
Jinzhu 2015-02-18 13:37:27 +08:00
parent af7da1ec44
commit b7edaeeeb3
1 changed files with 2 additions and 2 deletions

View File

@ -19,13 +19,13 @@ type User struct {
UpdatedAt time.Time // UpdatedAt: Time of record is updated, will be updated automatically UpdatedAt time.Time // UpdatedAt: Time of record is updated, will be updated automatically
Emails []Email // Embedded structs Emails []Email // Embedded structs
BillingAddress Address // Embedded struct BillingAddress Address // Embedded struct
BillingAddressId sql.NullInt64 // Embedded struct's foreign key BillingAddressID sql.NullInt64 // Embedded struct's foreign key
ShippingAddress Address // Embedded struct ShippingAddress Address // Embedded struct
ShippingAddressId int64 // Embedded struct's foreign key ShippingAddressId int64 // Embedded struct's foreign key
CreditCard CreditCard CreditCard CreditCard
Latitude float64 Latitude float64
Languages []Language `gorm:"many2many:user_languages;"` Languages []Language `gorm:"many2many:user_languages;"`
CompanyId int64 CompanyID int64
Company Company Company Company
Role Role
PasswordHash []byte PasswordHash []byte