zhangqian
2024-06-13 db75431fe7a401ac3509bf41c2f9c405bb07a408
add field define
3个文件已修改
14 ■■■■ 已修改文件
conf/config.yaml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/attribute.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/attribute_value.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
conf/config.yaml
@@ -11,7 +11,7 @@
  companyName: jialian
db:
  #  dsn: root:c++java123@tcp(192.168.20.119:3306)/wms?charset=utf8&parseTime=True&loc=Local
  dsn: root:c++java123@tcp(192.168.20.119:3306)/aps_server2?charset=utf8&parseTime=True&loc=Local
  dsn: root:c++java123@tcp(127.0.0.1:3306)/aps_server2?charset=utf8&parseTime=True&loc=Local
  logMode: true
  maxIdleCon: 20
  maxOpenCon: 100
models/attribute.go
@@ -10,9 +10,9 @@
    // Attribute 动态属性表
    Attribute struct {
        gorm.Model
        Name     string   `json:"name"`
        DataType DataType `json:"data_type"`
        Value    string   `json:"value" gorm:"-"`
        Name     string   `gorm:"type:varchar(100);not null;default:''" json:"name"` //属性名称
        DataType DataType `gorm:"type:tinyint;not null;default:0" json:"dataType"`   //给谁用的 1 物料(产品)
        Value    string   `json:"value" gorm:"-"`                                    //从AttributeValue取到的value
    }
    AttributeSearch struct {
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 {