|
@@ -1,5 +1,7 @@
|
1
|
1
|
package models
|
2
|
2
|
|
|
3
|
+import "XT/models"
|
|
4
|
+
|
3
|
5
|
type GoodsType struct {
|
4
|
6
|
ID int64 `gorm:"column:id" json:"id"`
|
5
|
7
|
TypeCode string `gorm:"column:type_code" json:"type_code"`
|
|
@@ -71,3 +73,25 @@ type GoodInfo struct {
|
71
|
73
|
func (GoodInfo) TableName() string {
|
72
|
74
|
return "xt_good_information"
|
73
|
75
|
}
|
|
76
|
+
|
|
77
|
+type GoodsTypeOne struct {
|
|
78
|
+ ID int64 `gorm:"column:id" json:"id"`
|
|
79
|
+ TypeCode string `gorm:"column:type_code" json:"type_code"`
|
|
80
|
+ TypeName string `gorm:"column:type_name" json:"type_name"`
|
|
81
|
+ Remark string `gorm:"column:remark" json:"remark"`
|
|
82
|
+ Ctime int64 `gorm:"column:ctime" json:"ctime"`
|
|
83
|
+ Mtime int64 `gorm:"column:mtime" json:"mtime"`
|
|
84
|
+ Creater int64 `gorm:"column:creater" json:"creater"`
|
|
85
|
+ Modifier int64 `gorm:"column:modifier" json:"modifier"`
|
|
86
|
+ OrgId int64 `gorm:"column:org_id" json:"org_id"`
|
|
87
|
+ Status int64 `gorm:"column:status" json:"status"`
|
|
88
|
+ Type int64 `gorm:"column:type" json:"type"`
|
|
89
|
+ Number int64 `gorm:"column:number" json:"number"`
|
|
90
|
+ OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
|
|
91
|
+ StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
|
|
92
|
+ GoodInfo []*models.GoodInfo `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
|
|
93
|
+}
|
|
94
|
+
|
|
95
|
+func (GoodsTypeOne) TableName() string {
|
|
96
|
+ return "xt_goods_type"
|
|
97
|
+}
|