2025-01-10 00:09:25 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
2025-05-11 20:45:48 +08:00
|
|
|
|
2025-01-10 00:09:25 +08:00
|
|
|
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
|
|
|
)
|
|
|
|
|
|
|
|
var ErrNotFound = sqlx.ErrNotFound
|
|
|
|
var ErrNoRowsUpdate = errors.New("update db no rows change")
|
|
|
|
|
2025-06-18 16:31:32 +08:00
|
|
|
// 平台
|
|
|
|
var PlatformWxMini string = "wxmini"
|
|
|
|
var PlatformWxH5 string = "wxh5"
|
|
|
|
var PlatformApp string = "app"
|
|
|
|
var PlatformH5 string = "h5"
|
|
|
|
var PlatformAdmin string = "admin"
|
|
|
|
|
|
|
|
// 用户授权类型
|
|
|
|
var UserAuthTypeMobile string = "mobile"
|
|
|
|
var UserAuthTypeWxMiniOpenID string = "wxmini_openid"
|
|
|
|
var UserAuthTypeWxh5OpenID string = "wxh5_openid"
|
2025-05-11 20:45:48 +08:00
|
|
|
var UserAuthTypeUUID string = "uuid"
|
2025-03-07 03:48:59 +08:00
|
|
|
|
2025-06-18 16:31:32 +08:00
|
|
|
// 代理扣除类型
|
2025-03-07 03:48:59 +08:00
|
|
|
var AgentDeductionTypeCost string = "cost"
|
|
|
|
var AgentDeductionTypePricing string = "pricing"
|
|
|
|
|
|
|
|
var AgentRewardsTypeDescendantPromotion string = "descendant_promotion"
|
|
|
|
var AgentRewardsTypeDescendantUpgradeVip string = "descendant_upgrade_vip"
|
|
|
|
var AgentRewardsTypeDescendantUpgradeSvip string = "descendant_upgrade_svip"
|
|
|
|
var AgentRewardsTypeDescendantStayActive string = "descendant_stay_active"
|
|
|
|
var AgentRewardsTypeDescendantNewActive string = "descendant_new_active"
|
|
|
|
var AgentRewardsTypeDescendantWithdraw string = "descendant_withdraw"
|
|
|
|
|
|
|
|
var AgentLeveNameNormal string = "normal"
|
|
|
|
var AgentLeveNameVIP string = "VIP"
|
|
|
|
var AgentLeveNameSVIP string = "SVIP"
|
2025-06-02 13:41:35 +08:00
|
|
|
|
|
|
|
const (
|
2025-06-08 15:14:34 +08:00
|
|
|
OrderStatusPending = "pending"
|
|
|
|
OrderStatusPaid = "paid"
|
|
|
|
OrderStatusFailed = "failed"
|
|
|
|
OrderStatusRefunding = "refunding"
|
|
|
|
OrderStatusRefunded = "refunded"
|
|
|
|
OrderStatusClosed = "closed"
|
|
|
|
)
|
|
|
|
const (
|
|
|
|
OrderRefundStatusPending = "pending"
|
|
|
|
OrderRefundStatusSuccess = "success"
|
|
|
|
OrderRefundStatusFailed = "failed"
|
|
|
|
OrderRefundStatusClosed = "closed"
|
2025-06-02 13:41:35 +08:00
|
|
|
)
|
|
|
|
const (
|
|
|
|
QueryStatePending = "pending"
|
|
|
|
QueryStateFailed = "failed"
|
|
|
|
QueryStateSuccess = "success"
|
|
|
|
QueryStateProcessing = "processing"
|
2025-06-08 15:14:34 +08:00
|
|
|
QueryStateCleaned = "cleaned"
|
2025-06-02 13:41:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2025-06-09 22:24:19 +08:00
|
|
|
GrantTypeFace string = "face"
|
|
|
|
AuthorizationGrantTypeSms = "sms"
|
2025-06-02 13:41:35 +08:00
|
|
|
)
|
|
|
|
const (
|
|
|
|
AuthorizationStatusPending = "pending"
|
|
|
|
AuthorizationStatusSuccess = "success"
|
|
|
|
AuthorizationStatusFailed = "failed"
|
|
|
|
AuthorizationStatusExpired = "expired"
|
|
|
|
AuthorizationStatusRevoked = "revoked"
|
|
|
|
AuthorizationStatusRejected = "rejected"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
AuthorizationFaceStatusPending = "pending"
|
|
|
|
AuthorizationFaceStatusSuccess = "success"
|
|
|
|
AuthorizationFaceStatusFailed = "failed"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
AgentRealNameStatusPending = "pending"
|
|
|
|
AgentRealNameStatusApproved = "approved"
|
|
|
|
AgentRealNameStatusRejected = "rejected"
|
|
|
|
)
|
2025-06-18 16:31:32 +08:00
|
|
|
|
|
|
|
// 用户身份类型
|
|
|
|
const (
|
|
|
|
UserTypeTemp = 0 // 临时用户
|
|
|
|
UserTypeNormal = 1 // 正式用户
|
|
|
|
UserTypeAdmin = 2 // 管理员
|
|
|
|
)
|
|
|
|
|
|
|
|
// 代理状态
|
|
|
|
const (
|
|
|
|
AgentStatusNo = 0 // 非代理
|
|
|
|
AgentStatusYes = 1 // 是代理
|
|
|
|
)
|
2025-06-22 16:02:09 +08:00
|
|
|
const (
|
|
|
|
TaxStatusPending = 0 // 待扣税
|
|
|
|
TaxStatusSuccess = 1 // 已扣税
|
|
|
|
TaxStatusExempt = 2 // 免税
|
|
|
|
TaxStatusFailed = 3 // 扣税失败
|
|
|
|
)
|