feat 保持pid唯一
This commit is contained in:
parent
248ca98840
commit
14c031839f
@ -37,7 +37,7 @@ type Product struct {
|
|||||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||||
|
|
||||||
Name string `gorm:"index" json:"name"`
|
Name string `gorm:"index" json:"name"`
|
||||||
Pid string `gorm:"index:,unique,composite:product_pid_website_idx;not null" json:"pid"`
|
Pid string `gorm:"index:,unique,composite:product_pid_website_idx;not null;index:,unique" json:"pid"`
|
||||||
Color string `json:"color"`
|
Color string `json:"color"`
|
||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
Image string `json:"image"`
|
Image string `json:"image"`
|
||||||
|
Loading…
Reference in New Issue
Block a user