修复软删除和唯一索引同时存在的bug

This commit is contained in:
2025-11-20 17:37:02 +08:00
parent 1f3d3d8a7c
commit da934a9bbb
7 changed files with 80 additions and 8 deletions

View File

@@ -108,7 +108,7 @@ type DeviceTemplate struct {
Model
// Name 是此模板的唯一名称, 例如 "FanModel-XYZ-2000" 或 "TempSensor-T1"
Name string `gorm:"not null;unique" json:"name"`
Name string `gorm:"not null" json:"name"`
// Manufacturer 是设备的制造商。
Manufacturer string `json:"manufacturer"`