重构增加模型枚举值定义

This commit is contained in:
2025-05-09 18:56:17 +08:00
parent d5a242d6b4
commit 071a0e1a6c
29 changed files with 252 additions and 138 deletions

View File

@@ -0,0 +1,7 @@
package announcement
type Type int32
const (
TypeNormal Type = iota + 1 // 普通公告
)

View File

@@ -0,0 +1,9 @@
package bill
type Type int32
const (
TypeConsume Type = iota + 1 // 消费
TypeRefund // 退款
TypeRecharge // 充值
)

View File

@@ -0,0 +1,9 @@
package channel
type Protocol int32
const (
ProtocolHttp Protocol = iota + 1
ProtocolHttps
ProtocolSocks5
)

View File

@@ -0,0 +1,10 @@
package client
type Spec int32
const (
SpecNative Spec = iota + 1 // 原生客户端
SpecBrowser // 浏览器客户端
SpecWeb // Web 服务
SpecTrusted // 可信服务
)

View File

@@ -0,0 +1,9 @@
package coupon
type Status int32
const (
StatusUnused = iota // 未使用
StatusUsed // 已使用
StatusExpired // 已过期
)

10
web/domains/node/types.go Normal file
View File

@@ -0,0 +1,10 @@
package node
type ISP int32
const (
IspUnknown ISP = iota // 未知
IspChinaTelecom // 中国电信
IspChinaUnicom // 中国联通
IspChinaMobile // 中国移动
)

View File

@@ -0,0 +1,8 @@
package proxy
type Type int32
const (
TypeThirdParty Type = iota + 1 // 三方代理
TypeSelfHosted // 自建代理
)

View File

@@ -0,0 +1,9 @@
package refund
type Status int32
const (
StatusHandling Status = iota + 1 // 待处理
StatusSuccess // 已退款
StatusRefused // 已拒绝
)

View File

@@ -0,0 +1,16 @@
package resource
type Type int32
const (
TypeDynamic Type = iota + 1 // 动态
TypeTunnel // 隧道
TypePrivate // 私有
)
type PssType int32
const (
PssTypeTime PssType = iota + 1 // 包时
PssTypeCount // 包量
)

View File

@@ -0,0 +1,24 @@
package trade
type Type int32
const (
TypePurchase Type = iota + 1 // 购买
TypeRecharge // 充值
)
type Method int32
const (
MethodAlipay Method = iota + 1 // 支付宝
MethodWeChat // 微信
)
type Status int32
const (
StatusPending Status = iota // 待支付
StatusSuccess // 已支付
StatusCanceled // 已取消
StatusRefunded
) // 已退款

View File

@@ -0,0 +1,9 @@
package user
type IdType int32
const (
IdTypeNone IdType = iota // 未认证
IdTypePersonal // 个人认证
IdTypeEnterprise // 企业认证
)