feat: add Go backend
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
const (
|
||||
AppMemberStatusNormal = 1
|
||||
AppMemberStatusDisabled = 2
|
||||
AppMemberStatusCancelled = 3
|
||||
AppMemberRiskNormal = 1
|
||||
AppMemberRiskWatch = 2
|
||||
AppMemberRiskBlocked = 3
|
||||
AppMemberDispatchAuto = 1
|
||||
AppMemberDispatchManual = 2
|
||||
AppMemberCategoryReal = 1
|
||||
AppMemberCategoryFake = 2
|
||||
PaymentAccountBank = 1
|
||||
PaymentAccountDigital = 2
|
||||
PaymentAccountUnionPay = 3
|
||||
PaymentAccountAlipay = 4
|
||||
PaymentAccountWechat = 5
|
||||
WalletDirectionIncome = 1
|
||||
WalletDirectionExpense = 2
|
||||
WalletAdjustReward = 1
|
||||
WalletAdjustSupplement = 2
|
||||
WalletAdjustDeduct = 3
|
||||
WalletAdjustReversal = 4
|
||||
WalletAdjustOther = 5
|
||||
WalletRequestPending = 1
|
||||
WalletRequestApproved = 2
|
||||
WalletRequestRejected = 3
|
||||
WalletRequestExecuted = 4
|
||||
MemberNoticeReal = 1
|
||||
MemberNoticeSimulation = 2
|
||||
MemberNoticeActive = 1
|
||||
MemberNoticeRevoked = 2
|
||||
)
|
||||
|
||||
var (
|
||||
AppMemberStatusOptions = []*model.Option{
|
||||
dict.GenSuccessOption(AppMemberStatusNormal, "正常"),
|
||||
dict.GenWarningOption(AppMemberStatusDisabled, "禁用"),
|
||||
dict.GenErrorOption(AppMemberStatusCancelled, "已注销"),
|
||||
}
|
||||
AppMemberRiskStatusOptions = []*model.Option{
|
||||
dict.GenSuccessOption(AppMemberRiskNormal, "正常"),
|
||||
dict.GenWarningOption(AppMemberRiskWatch, "观察"),
|
||||
dict.GenErrorOption(AppMemberRiskBlocked, "拦截"),
|
||||
}
|
||||
AppMemberDispatchModeOptions = []*model.Option{
|
||||
dict.GenSuccessOption(AppMemberDispatchAuto, "自动"),
|
||||
dict.GenDefaultOption(AppMemberDispatchManual, "手动"),
|
||||
}
|
||||
AppMemberCategoryOptions = []*model.Option{
|
||||
dict.GenSuccessOption(AppMemberCategoryReal, "真人"),
|
||||
dict.GenWarningOption(AppMemberCategoryFake, "假人"),
|
||||
}
|
||||
PaymentAccountTypeOptions = []*model.Option{
|
||||
dict.GenPrimaryOption(PaymentAccountBank, "银行卡"),
|
||||
dict.GenInfoOption(PaymentAccountDigital, "数字钱包"),
|
||||
dict.GenSuccessOption(PaymentAccountUnionPay, "云闪付"),
|
||||
dict.GenPrimaryOption(PaymentAccountAlipay, "支付宝"),
|
||||
dict.GenSuccessOption(PaymentAccountWechat, "微信"),
|
||||
}
|
||||
WalletAdjustTypeOptions = []*model.Option{
|
||||
dict.GenSuccessOption(WalletAdjustReward, "奖励金"),
|
||||
dict.GenPrimaryOption(WalletAdjustSupplement, "人工补账"),
|
||||
dict.GenErrorOption(WalletAdjustDeduct, "差错扣回"),
|
||||
dict.GenWarningOption(WalletAdjustReversal, "冲正"),
|
||||
dict.GenDefaultOption(WalletAdjustOther, "其他"),
|
||||
}
|
||||
WalletDirectionOptions = []*model.Option{
|
||||
dict.GenSuccessOption(WalletDirectionIncome, "收入"),
|
||||
dict.GenErrorOption(WalletDirectionExpense, "支出"),
|
||||
}
|
||||
WalletRequestStatusOptions = []*model.Option{
|
||||
dict.GenWarningOption(WalletRequestPending, "待审批"),
|
||||
dict.GenPrimaryOption(WalletRequestApproved, "已通过"),
|
||||
dict.GenErrorOption(WalletRequestRejected, "已拒绝"),
|
||||
dict.GenSuccessOption(WalletRequestExecuted, "已执行"),
|
||||
}
|
||||
MemberNoticeSourceOptions = []*model.Option{
|
||||
dict.GenSuccessOption(MemberNoticeReal, "真实通知"),
|
||||
dict.GenWarningOption(MemberNoticeSimulation, "运营模拟"),
|
||||
}
|
||||
MemberNoticeStatusOptions = []*model.Option{
|
||||
dict.GenSuccessOption(MemberNoticeActive, "有效"),
|
||||
dict.GenErrorOption(MemberNoticeRevoked, "已撤回"),
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("appMemberStatus", "会员状态", AppMemberStatusOptions)
|
||||
dict.RegisterEnums("appMemberRiskStatus", "会员风控状态", AppMemberRiskStatusOptions)
|
||||
dict.RegisterEnums("appMemberDispatchMode", "会员派单模式", AppMemberDispatchModeOptions)
|
||||
dict.RegisterEnums("appMemberCategory", "会员类别", AppMemberCategoryOptions)
|
||||
dict.RegisterEnums("paymentAccountType", "收款账户类型", PaymentAccountTypeOptions)
|
||||
dict.RegisterEnums("walletAdjustType", "钱包调整类型", WalletAdjustTypeOptions)
|
||||
dict.RegisterEnums("walletDirection", "钱包变更方向", WalletDirectionOptions)
|
||||
dict.RegisterEnums("walletRequestStatus", "钱包调整状态", WalletRequestStatusOptions)
|
||||
dict.RegisterEnums("memberNoticeSource", "会员通知来源", MemberNoticeSourceOptions)
|
||||
dict.RegisterEnums("memberNoticeStatus", "会员通知状态", MemberNoticeStatusOptions)
|
||||
}
|
||||
Reference in New Issue
Block a user