feat:完善项目
This commit is contained in:
@ -48,7 +48,8 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewSysLog()}, &synchronized{iModel: model.NewSysUserLoginLog()},
|
||||
// 功能信息
|
||||
&synchronized{iModel: model.NewManageSupplier()},
|
||||
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialPurchase()},
|
||||
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialSupplier()},
|
||||
&synchronized{iModel: model.NewManageMaterialPurchase()}, &synchronized{iModel: model.NewManageMaterialWarehouse()},
|
||||
)
|
||||
}
|
||||
func initCacheMode() {
|
||||
|
@ -4,8 +4,9 @@ package model
|
||||
type ManageEquipment struct {
|
||||
Model
|
||||
ModelTenant
|
||||
Code string `gorm:"column:code;type:varchar(35);default:null;comment:编号" json:"code"`
|
||||
Title string `gorm:"column:title;type:varchar(100);default:null;comment:名称" json:"title"`
|
||||
ParentID uint64 `gorm:"column:parent_id;type:int;default:0;comment:父级ID" json:"-"`
|
||||
Code string `gorm:"column:code;type:varchar(35);default:null;comment:编号" json:"code"`
|
||||
Title string `gorm:"column:title;type:varchar(100);default:null;comment:名称" json:"title"`
|
||||
Image
|
||||
Config string `gorm:"column:config;type:varchar(255);default:null;comment:配置" json:"config"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注" json:"remark"`
|
||||
|
18
app/common/model/manage_equipment_material.go
Normal file
18
app/common/model/manage_equipment_material.go
Normal file
@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
// ManageEquipmentMaterial 装备器材数据模型
|
||||
type ManageEquipmentMaterial struct {
|
||||
Model
|
||||
EquipmentID uint64 `gorm:"column:equipment_id;type:int(11);default:0;comment:装备ID" json:"-"`
|
||||
MaterialID uint64 `gorm:"column:material_id;type:int(11);default:0;comment:器材ID" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ManageEquipmentMaterial) TableName() string {
|
||||
return "manage_equipment_material"
|
||||
}
|
||||
|
||||
func NewManageEquipmentMaterial() *ManageEquipmentMaterial {
|
||||
return &ManageEquipmentMaterial{}
|
||||
}
|
20
app/common/model/manage_material_supplier.go
Normal file
20
app/common/model/manage_material_supplier.go
Normal file
@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
// ManageMaterialSupplier 器材供应商数据模型
|
||||
type ManageMaterialSupplier struct {
|
||||
Model
|
||||
MaterialID uint64 `gorm:"column:material_id;type:int(11);default:0;comment:器材ID" json:"material_id"`
|
||||
SupplierID uint64 `gorm:"column:supplier_id;type:int;default:0;comment:供应商ID" json:"-"`
|
||||
Stock int `gorm:"column:stock;type:int(8);default:0;comment:库存数" json:"stock"`
|
||||
FrozenStock int `gorm:"column:frozen_stock;type:int(8);default:0;comment:冻结的库存数" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ManageMaterialSupplier) TableName() string {
|
||||
return "manage_material_supplier"
|
||||
}
|
||||
|
||||
func NewManageMaterialSupplier() *ManageMaterialSupplier {
|
||||
return &ManageMaterialSupplier{}
|
||||
}
|
@ -4,11 +4,12 @@ package model
|
||||
type ManageSupplier struct {
|
||||
Model
|
||||
ModelTenant
|
||||
Kind ManageSupplierKind `gorm:"column:kind;type:tinyint(1);default:1;comment:类型" json:"kind"`
|
||||
Name string `gorm:"column:name;type:varchar(100);default:null;comment:名称" json:"name"`
|
||||
Mobile string `gorm:"column:mobile;type:varchar(20);default:null;comment:联系方式" json:"mobile"`
|
||||
Address string `gorm:"column:address;type:varchar(255);default:null;comment:联系地址" json:"address"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注信息 " json:"remark"`
|
||||
Kind ManageSupplierKind `gorm:"column:kind;type:tinyint(1);default:1;comment:类型" json:"kind"`
|
||||
Name string `gorm:"column:name;type:varchar(100);default:null;comment:名称" json:"name"`
|
||||
Mobile string `gorm:"column:mobile;type:varchar(20);default:null;comment:联系方式" json:"mobile"`
|
||||
Contacts string `gorm:"column:contacts;type:varchar(20);default:null;comment:联系人" json:"contacts"`
|
||||
Address string `gorm:"column:address;type:varchar(255);default:null;comment:联系地址" json:"address"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注信息 " json:"remark"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
Reference in New Issue
Block a user