Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameOrder = "order"
View Source
const TableNameParam = "param"
View Source
const TableNameRecharge = "recharge"
View Source
const TableNameUser = "user"
View Source
const TableNameWithdraw = "withdraw"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` UserID int32 `gorm:"column:user_id;not null;comment:买家user id" json:"user_id"` // 买家user id AgentUserID int32 `` // 下单时机器人所属代理user id,机器人可能更换 /* 127-byte string literal not displayed */ BotID int64 `gorm:"column:bot_id;not null;comment:机器人id" json:"bot_id"` // 机器人id OrderNo string `gorm:"column:order_no;not null;comment:订单号" json:"order_no"` // 订单号 FragmentRefID *string `gorm:"column:fragment_ref_id;comment:与fragment对应的ref" json:"fragment_ref_id"` // 与fragment对应的ref ReceiveTgUsername string `gorm:"column:receive_tg_username;not null;comment:接收会员的tg用户名" json:"receive_tg_username"` // 接收会员的tg用户名 VipMonth int32 `gorm:"column:vip_month;not null;comment:开通vip时长3、6、12" json:"vip_month"` // 开通vip时长3、6、12 UsdtAmount float64 `gorm:"column:usdt_amount;not null;comment:需支付USDT数" json:"usdt_amount"` // 需支付USDT数 BaseAmount float64 `gorm:"column:base_amount;not null;comment:给到代理的价格" json:"base_amount"` // 给到代理的价格 Status int32 `` // 1:等待支付,2:支付成功,3:开通成功,4:过期作废 /* 135-byte string literal not displayed */ AgentStatus int32 `gorm:"column:agent_status;not null;default:1;comment:1:等待入账,2:代理已入账" json:"agent_status"` // 1:等待入账,2:代理已入账 CreatedAt time.Time `gorm:"column:created_at;not null;comment:订单创建时间" json:"created_at"` // 订单创建时间 ExpiredAt time.Time `gorm:"column:expired_at;not null;comment:订单过期时间" json:"expired_at"` // 订单过期时间 TgChatID int64 `gorm:"column:tg_chat_id;not null" json:"tg_chat_id"` TgMsgID int32 `gorm:"column:tg_msg_id;not null" json:"tg_msg_id"` }
Order mapped from table <order>
type Param ¶
type Param struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` K string `gorm:"column:k;not null" json:"k"` V1 *string `gorm:"column:v1" json:"v1"` V2 *string `gorm:"column:v2" json:"v2"` V3 *string `gorm:"column:v3" json:"v3"` V4 *string `gorm:"column:v4" json:"v4"` V5 *string `gorm:"column:v5" json:"v5"` V6 *string `gorm:"column:v6" json:"v6"` Remark *string `gorm:"column:remark;comment:备注" json:"remark"` // 备注 }
Param mapped from table <param>
type Recharge ¶
type Recharge struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` UserID int32 `gorm:"column:user_id;not null;comment:user id" json:"user_id"` // user id BotID int64 `gorm:"column:bot_id;not null;comment:机器人id" json:"bot_id"` // 机器人id OrderNo string `gorm:"column:order_no;not null;comment:订单号" json:"order_no"` // 订单号 Amount float64 `gorm:"column:amount;not null;comment:需支付USDT数" json:"amount"` // 需支付USDT数 Status int32 `gorm:"column:status;not null;default:1;comment:1:等待支付,2:支付成功,3:过期作废" json:"status"` // 1:等待支付,2:支付成功,3:过期作废 ActualAmount float64 `gorm:"column:actual_amount;not null;comment:实际支付金额,由支付平台返回" json:"actual_amount"` // 实际支付金额,由支付平台返回 CreatedAt time.Time `gorm:"column:created_at;not null;comment:订单创建时间" json:"created_at"` // 订单创建时间 TgChatID int64 `gorm:"column:tg_chat_id;not null" json:"tg_chat_id"` TgMsgID int32 `gorm:"column:tg_msg_id;not null" json:"tg_msg_id"` }
Recharge mapped from table <recharge>
type User ¶
type User struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` ParentID int32 `gorm:"column:parent_id;not null;comment:上级用户id,从哪个用户的机器人进来的" json:"parent_id"` // 上级用户id,从哪个用户的机器人进来的 TgID int64 `gorm:"column:tg_id;not null;comment:tg id" json:"tg_id"` // tg id TgUsername *string `gorm:"column:tg_username;comment:tg username" json:"tg_username"` // tg username Balance float64 `gorm:"column:balance;not null;default:0.00;comment:USDT钱包" json:"balance"` // USDT钱包 Brokerage float64 `gorm:"column:brokerage;not null;default:0.00;comment:代理佣金" json:"brokerage"` // 代理佣金 TronAddr *string `gorm:"column:tron_addr;comment:USDT收款钱包地址" json:"tron_addr"` // USDT收款钱包地址 CreatedAt time.Time `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"` // 创建时间 BotID *int64 `gorm:"column:bot_id;comment:机器人id" json:"bot_id"` // 机器人id BotToken *string `gorm:"column:bot_token;comment:机器人token" json:"bot_token"` // 机器人token BotUsername *string `gorm:"column:bot_username;comment:机器人username" json:"bot_username"` // 机器人username BotStatus int32 `gorm:"column:bot_status;not null;default:1;comment:1:正常,2:无,3:异常,4:禁用" json:"bot_status"` // 1:正常,2:无,3:异常,4:禁用 BotCreatedAt *time.Time `gorm:"column:bot_created_at;comment:机器人添加时间" json:"bot_created_at"` // 机器人添加时间 ThreeMonthPrice *float64 `gorm:"column:three_month_price;comment:三个月套餐价格" json:"three_month_price"` // 三个月套餐价格 SixMonthPrice *float64 `gorm:"column:six_month_price;comment:六个月套餐价格" json:"six_month_price"` // 六个月套餐价格 TwelveMonthPrice *float64 `gorm:"column:twelve_month_price;comment:一年套餐价格" json:"twelve_month_price"` // 一年套餐价格 }
User mapped from table <user>
type Withdraw ¶
type Withdraw struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` UserID int32 `gorm:"column:user_id;not null" json:"user_id"` TgID int64 `gorm:"column:tg_id;not null" json:"tg_id"` OrderNo string `gorm:"column:order_no;not null;comment:提现订单号" json:"order_no"` // 提现订单号 Amount float64 `gorm:"column:amount;not null;comment:提现金额" json:"amount"` // 提现金额 TronAddr string `gorm:"column:tron_addr;not null;comment:提现钱包" json:"tron_addr"` // 提现钱包 Status int32 `gorm:"column:status;not null;comment:1:等待提现,2:提现完成,3:提现失败" json:"status"` // 1:等待提现,2:提现完成,3:提现失败 CreatedAt time.Time `gorm:"column:created_at;not null" json:"created_at"` }
Withdraw mapped from table <withdraw>
Click to show internal directories.
Click to hide internal directories.