refactor: 重构资产模型与DAO层实现

This commit is contained in:
2026-03-19 17:45:06 +08:00
parent 5236c45a39
commit f30141679c
24 changed files with 570 additions and 600 deletions

View File

@@ -11,8 +11,8 @@ import (
type StockOperationReq struct {
g.Meta `path:"/stockOperation" method:"post" tags:"库存管理" summary:"库存操作(创建/修改)" dc:"库存操作(创建/修改)"`
AssetSkuId *bson.ObjectID `json:"assetSkuId" v:"required" dc:"关联资产SKU ID"`
Stock int `json:"stock" v:"required|min:1" dc:"库存数量"`
AssetSkuId int64 `json:"assetSkuId" v:"required" dc:"关联资产SKU ID"`
Stock int `json:"stock" v:"required|min:1" dc:"库存数量"`
// 批次模式专用字段
BatchNo string `json:"batchNo" dc:"批次号(批次模式必填)"`
ProductionDate *gtime.Time `json:"productionDate" dc:"生产日期(批次模式,格式:2006-01-02)"`
@@ -22,8 +22,8 @@ type StockOperationReq struct {
// StockPublishMessage 库存发布消息
type StockPublishMessage struct {
AssetId string `json:"assetId"`
AssetSkuId string `json:"assetSkuId"`
AssetId int64 `json:"assetId"`
AssetSkuId int64 `json:"assetSkuId"`
TenantId interface{} `json:"tenantId"`
UserName interface{} `json:"userName"`
StockCount int `json:"stockCount"`
@@ -41,7 +41,7 @@ type StockPublishMessage struct {
type GetStockFormFieldsReq struct {
g.Meta `path:"/getStockFormFields" method:"get" tags:"库存管理" summary:"获取库存操作表单字段" dc:"根据资产SKU的库存管理模式动态返回表单字段"`
AssetSkuId *bson.ObjectID `json:"assetSkuId" v:"required" dc:"关联资产ID"`
AssetSkuId int64 `json:"assetSkuId" v:"required" dc:"关联资产ID"`
}
// GetStockFormFieldsRes 获取库存表单字段响应