package dto import ( "assets/consts/asset" "github.com/gogf/gf/v2/frame/g" ) // GetAssetTypeReq 获取资产类型请求 type GetAssetTypeReq struct { g.Meta `path:"/getAssetType" method:"get" tags:"资产管理" summary:"获取资产类型选项" dc:"获取所有资产类型的选项列表"` } // GetAssetTypeRes 获取资产类型响应 type GetAssetTypeRes struct { Options []KeyValue `json:"options" dc:"资产类型选项列表"` } // GetCategoryAttrTypeReq 获取分类属性类型请求 type GetCategoryAttrTypeReq struct { g.Meta `path:"/getCategoryAttrType" method:"get" tags:"枚举管理" summary:"获取分类属性类型" dc:"获取分类属性类型"` } // GetCategoryAttrTypeRes 获取分类属性类型响应 type GetCategoryAttrTypeRes struct { Options []KeyValue `json:"options" dc:"分类属性类型选项列表"` } // GetSpecsUnitReq 获取规格单位 type GetSpecsUnitReq struct { g.Meta `path:"/getSpecsUnit" method:"get" tags:"枚举管理" summary:"获取规格单位" dc:"获取规格单位"` AssetType *consts.AssetType `json:"assetType" v:"required|in:physical,virtual,service" dc:"资产类型"` } // GetSpecsUnitRes 获取规格单位响应 type GetSpecsUnitRes struct { Options []KeyValue `json:"options" dc:"规格单位选项列表"` } // GetTenantModuleTypeReq 获取租户模块类型请求 type GetTenantModuleTypeReq struct { g.Meta `path:"/getTenantModuleType" method:"get" tags:"枚举管理" summary:"获取租户模块类型" dc:"获取租户模块类型"` AssetId int64 `json:"assetId" v:"required|in:physical,virtual,service" dc:"资产id"` } // GetTenantModuleTypeRes 获取租户模块类型响应 type GetTenantModuleTypeRes struct { Options []KeyValue `json:"options" dc:"租户模块类型列表"` } type KeyValue struct { Key interface{} `json:"key"` // 对应原有常量值 Value interface{} `json:"value"` // 对应描述信息 } type GetDictRes struct { g.Meta `mime:"application/json"` Info *DictTypeRes `json:"info"` Values []*DictDataRes `json:"values"` } type DictTypeRes struct { DictName string `json:"name"` DictType string `json:"type"` Remark string `json:"remark"` } type DictDataRes struct { DictValue string `json:"key"` DictLabel string `json:"value"` DictType string `json:"type"` IsDefault int `json:"isDefault"` Remark string `json:"remark"` }