From 97d6acaf340b19d66244967b00dd2fdff410e034 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 13 六月 2024 20:49:09 +0800
Subject: [PATCH] attribute value add dateType and dateType enums

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