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