From 7af977218be09a1ff8e9ac6740dfd22983aa33d2 Mon Sep 17 00:00:00 2001
From: lishihai <dslsh@dscom>
Date: 星期五, 14 六月 2024 11:47:25 +0800
Subject: [PATCH] 属性值和对象-AttributeValue-wms_attribute_value-的曾删改

---
 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