fix misunderstanding

This commit is contained in:
DinoLai 2017-11-21 02:02:33 +08:00
parent fcf4c8b569
commit b7e50c2b34

View File

@ -42,7 +42,7 @@ type Address struct {
type Language struct {
ID int
Name string `gorm:"index:idx_name_code"` // Create index with name, and will create combined index if find other fields defined same name
Code string `gorm:"unique_index:idx_name_code"` // `unique_index` also works
Code string `gorm:"index:idx_name_code"` // `unique_index` also works
}
type CreditCard struct {