From c73d79fe050e21bc53b3e94b6ca79fd3761d4d17 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 14 六月 2024 10:24:52 +0800
Subject: [PATCH] 操作类型支持仓库id搜索

---
 models/attribute_value.go |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/models/attribute_value.go b/models/attribute_value.go
index 3b8ad53..f6bca8b 100644
--- a/models/attribute_value.go
+++ b/models/attribute_value.go
@@ -10,9 +10,9 @@
 	// AttributeValue 灞炴�у�煎拰瀵硅薄
 	AttributeValue struct {
 		gorm.Model
-		EntityID    string `gorm:"primaryKey"`
-		AttributeID uint   `gorm:"primaryKey"`
-		Value       string `json:"value"`
+		EntityID    string `gorm:"uniqueIndex:entity_id_attr_id;type:varchar(100);not null;default:''" json:"entityID"`
+		AttributeID uint   `gorm:"uniqueIndex:entity_id_attr_id;type:int;not null;default:0" json:"attributeID"`
+		Value       string `gorm:"type:varchar(255);not null;default:''" json:"value"`
 	}
 
 	AttributeValueSearch struct {

--
Gitblit v1.8.0