浏览代码

耗材参数

XMLWAN 4 年前
父节点
当前提交
6349bac66e
共有 1 个文件被更改,包括 24 次插入0 次删除
  1. 24 0
      models/good_models.go

+ 24 - 0
models/good_models.go 查看文件

1
 package models
1
 package models
2
 
2
 
3
+import "XT/models"
4
+
3
 type GoodsType struct {
5
 type GoodsType struct {
4
 	ID             int64  `gorm:"column:id" json:"id"`
6
 	ID             int64  `gorm:"column:id" json:"id"`
5
 	TypeCode       string `gorm:"column:type_code" json:"type_code"`
7
 	TypeCode       string `gorm:"column:type_code" json:"type_code"`
71
 func (GoodInfo) TableName() string {
73
 func (GoodInfo) TableName() string {
72
 	return "xt_good_information"
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
+}