0
如何定義我的struct
以在Go中爲Gorm指定多列唯一索引?如何爲Gorm指定一個具有多列唯一索引的結構體?
如:
type Something struct {
gorm.Model
First string `sql:"unique_index:unique_index_with_second"`
Second string `sql:"unique_index:unique_index_with_first"`
}
我只是接受這個事不宜遲,因爲我已經傾倒的項目和格姆。 –