Files
junhong_cmp_fiber/pkg/constants/asset_package_batch_order.go
break 73f5125d3d
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
2026-07-25 17:06:58 +08:00

33 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package constants
import "time"
const (
// StoragePurposeAssetPackageBatchOrder 表示资产套餐批量订购 CSV 上传用途。
StoragePurposeAssetPackageBatchOrder = "batch_purchase"
// AssetPackageBatchOrderStoragePrefix 表示资产套餐批量订购文件的对象存储目录。
AssetPackageBatchOrderStoragePrefix = "batch-purchases"
// AssetPackageBatchOrderMaxRows 表示单个批量订购 CSV 最大业务行数。
AssetPackageBatchOrderMaxRows = 1000
// AssetPackageBatchOrderMaxFileSize 表示单个批量订购 CSV 最大字节数10MB
AssetPackageBatchOrderMaxFileSize int64 = 10 * 1024 * 1024
// AssetPackageBatchOrderTaskTimeout 表示单个批量订购任务的最长执行时间。
AssetPackageBatchOrderTaskTimeout = 2 * time.Hour
// AssetPackageBatchOrderItemStatusSuccess 表示批量订购单行已成功创建订单。
AssetPackageBatchOrderItemStatusSuccess = 3
// AssetPackageBatchOrderItemStatusFailed 表示批量订购单行已失败并记录原因。
AssetPackageBatchOrderItemStatusFailed = 4
)
// GetAssetPackageBatchOrderItemStatusName 返回批量订购单行状态中文名称。
func GetAssetPackageBatchOrderItemStatusName(status int) string {
switch status {
case AssetPackageBatchOrderItemStatusSuccess:
return "成功"
case AssetPackageBatchOrderItemStatusFailed:
return "失败"
default:
return "未知"
}
}