代码初始化
This commit is contained in:
13
consts/knapsack/knapsack_action_type.go
Normal file
13
consts/knapsack/knapsack_action_type.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package knapsack
|
||||
|
||||
// KnapsackActionType 背包操作类型
|
||||
type KnapsackActionType string
|
||||
|
||||
const (
|
||||
KnapsackActionCreate KnapsackActionType = "create" // 创建
|
||||
KnapsackActionUse KnapsackActionType = "use" // 使用
|
||||
KnapsackActionVerify KnapsackActionType = "verify" // 核销
|
||||
KnapsackActionList KnapsackActionType = "list" // 上架
|
||||
KnapsackActionUnlist KnapsackActionType = "unlist" // 下架
|
||||
KnapsackActionExpire KnapsackActionType = "expire" // 过期
|
||||
)
|
||||
28
consts/knapsack/knapsack_asset_type.go
Normal file
28
consts/knapsack/knapsack_asset_type.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package knapsack
|
||||
|
||||
// KnapsackAssetType 背包资产类型
|
||||
type KnapsackAssetType string
|
||||
|
||||
const (
|
||||
KnapsackAssetTypePhysical KnapsackAssetType = "physical" // 实物资产
|
||||
KnapsackAssetTypeVirtual KnapsackAssetType = "virtual" // 虚拟资产
|
||||
KnapsackAssetTypeService KnapsackAssetType = "service" // 服务资产
|
||||
)
|
||||
|
||||
// ServiceAssetType 服务资产子类型
|
||||
type ServiceAssetType string
|
||||
|
||||
const (
|
||||
ServiceAssetTypeSchedule ServiceAssetType = "schedule" // 排期服务
|
||||
ServiceAssetTypeBooking ServiceAssetType = "booking" // 预订服务
|
||||
)
|
||||
|
||||
// VirtualAssetType 虚拟资产子类型
|
||||
type VirtualAssetType string
|
||||
|
||||
const (
|
||||
VirtualAssetTypeNFT VirtualAssetType = "nft" // NFT数字藏品
|
||||
VirtualAssetTypeCoupon VirtualAssetType = "coupon" // 优惠券
|
||||
VirtualAssetTypeVoucher VirtualAssetType = "voucher" // 兑换券
|
||||
VirtualAssetTypeTicket VirtualAssetType = "ticket" // 门票
|
||||
)
|
||||
12
consts/knapsack/knapsack_status.go
Normal file
12
consts/knapsack/knapsack_status.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package knapsack
|
||||
|
||||
// KnapsackStatus 背包项状态
|
||||
type KnapsackStatus int
|
||||
|
||||
const (
|
||||
KnapsackStatusDisabled KnapsackStatus = 0 // 禁用
|
||||
KnapsackStatusActive KnapsackStatus = 1 // 启用(可用)
|
||||
KnapsackStatusUsed KnapsackStatus = 2 // 已使用
|
||||
KnapsackStatusListed KnapsackStatus = 3 // 已上架到市场
|
||||
KnapsackStatusExpired KnapsackStatus = 4 // 已过期
|
||||
)
|
||||
13
consts/market/market_action_type.go
Normal file
13
consts/market/market_action_type.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package market
|
||||
|
||||
// MarketActionType 市场操作类型
|
||||
type MarketActionType string
|
||||
|
||||
const (
|
||||
MarketActionList MarketActionType = "list" // 上架
|
||||
MarketActionUnlist MarketActionType = "unlist" // 下架
|
||||
MarketActionBuy MarketActionType = "buy" // 购买
|
||||
MarketActionSold MarketActionType = "sold" // 售出
|
||||
MarketActionPriceUpdate MarketActionType = "price_update" // 更新价格
|
||||
MarketActionExpire MarketActionType = "expire" // 过期
|
||||
)
|
||||
11
consts/market/market_status.go
Normal file
11
consts/market/market_status.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package market
|
||||
|
||||
// MarketStatus 市场物品状态
|
||||
type MarketStatus int
|
||||
|
||||
const (
|
||||
MarketStatusActive MarketStatus = 1 // 活跃(上架中)
|
||||
MarketStatusSold MarketStatus = 2 // 已售出
|
||||
MarketStatusInactive MarketStatus = 3 // 已下架
|
||||
MarketStatusExpired MarketStatus = 4 // 已过期
|
||||
)
|
||||
11
consts/public/table_name.go
Normal file
11
consts/public/table_name.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package public
|
||||
|
||||
// 数据库表名
|
||||
const (
|
||||
TableNameKnapsack = "knapsack" // 背包表
|
||||
TableNameKnapsackLog = "knapsack_log" // 背包日志表
|
||||
TableNameMarket = "market" // 市场表
|
||||
TableNameMarketLog = "market_log" // 市场日志表
|
||||
TableNameWallet = "wallet" // 钱包表
|
||||
TableNameWalletLog = "wallet_log" // 钱包日志表
|
||||
)
|
||||
11
consts/wallet/wallet_log_type.go
Normal file
11
consts/wallet/wallet_log_type.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package wallet
|
||||
|
||||
// WalletLogType 钱包日志操作类型
|
||||
type WalletLogType string
|
||||
|
||||
const (
|
||||
WalletLogTypeIncome WalletLogType = "income" // 收入
|
||||
WalletLogTypeExpense WalletLogType = "expense" // 支出
|
||||
WalletLogTypeFreeze WalletLogType = "freeze" // 冻结
|
||||
WalletLogTypeUnfreeze WalletLogType = "unfreeze" // 解冻
|
||||
)
|
||||
10
consts/wallet/wallet_status.go
Normal file
10
consts/wallet/wallet_status.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package wallet
|
||||
|
||||
// WalletStatus 钱包状态
|
||||
type WalletStatus int
|
||||
|
||||
const (
|
||||
WalletStatusDisabled WalletStatus = 0 // 禁用
|
||||
WalletStatusEnabled WalletStatus = 1 // 启用
|
||||
WalletStatusFrozen WalletStatus = -1 // 冻结
|
||||
)
|
||||
Reference in New Issue
Block a user