修复软删除和唯一索引同时存在的bug
This commit is contained in:
@@ -21,11 +21,11 @@ type AreaController struct {
|
||||
Model
|
||||
|
||||
// Name 是主控的业务名称,例如 "1号猪舍主控"
|
||||
Name string `gorm:"not null;unique" json:"name"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
|
||||
// NetworkID 是主控在通信网络中的唯一标识,例如 LoRaWAN 的 DevEUI。
|
||||
// 这是 transport 层用来寻址的关键。
|
||||
NetworkID string `gorm:"not null;unique;index" json:"network_id"`
|
||||
NetworkID string `gorm:"not null;index" json:"network_id"`
|
||||
|
||||
// Location 描述了主控的物理安装位置。
|
||||
Location string `gorm:"index" json:"location"`
|
||||
|
||||
Reference in New Issue
Block a user