| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- package daytask
- // DtRechargeOrder 充值订单表
- type DtRechargeOrder struct {
- Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:订单ID"`
- OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(32);not null;uniqueIndex:uk_order_no;comment:订单编号"`
- UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;index:idx_user_id;comment:用户ID"`
- UserUid string `json:"userUid" gorm:"column:user_uid;type:varchar(32);comment:用户UID"`
- Channel string `json:"channel" gorm:"column:channel;type:varchar(32);not null;index:idx_channel;comment:充值渠道: usdt/momo/zalopay/bank"`
- Amount float64 `json:"amount" gorm:"column:amount;type:decimal(18,2);default:0.00;comment:充值金额(USDT)"`
- ActualAmount float64 `json:"actualAmount" gorm:"column:actual_amount;type:decimal(18,2);default:0.00;comment:实际到账"`
- Fee float64 `json:"fee" gorm:"column:fee;type:decimal(18,2);default:0.00;comment:手续费"`
- ExchangeRate float64 `json:"exchangeRate" gorm:"column:exchange_rate;type:decimal(18,6);default:1.000000;comment:汇率"`
- PayAmount float64 `json:"payAmount" gorm:"column:pay_amount;type:decimal(18,2);default:0.00;comment:支付金额(原币种)"`
- PayCurrency string `json:"payCurrency" gorm:"column:pay_currency;type:varchar(16);default:USDT;comment:支付币种"`
- Txid string `json:"txid" gorm:"column:txid;type:varchar(128);comment:交易哈希/流水号"`
- FromAddress string `json:"fromAddress" gorm:"column:from_address;type:varchar(128);comment:付款地址"`
- ToAddress string `json:"toAddress" gorm:"column:to_address;type:varchar(128);comment:收款地址"`
- Screenshot string `json:"screenshot" gorm:"column:screenshot;type:varchar(255);comment:付款截图"`
- PayTime int64 `json:"payTime" gorm:"column:pay_time;type:bigint;comment:支付时间"`
- ConfirmTime int64 `json:"confirmTime" gorm:"column:confirm_time;type:bigint;comment:确认时间"`
- ConfirmAdminId int64 `json:"confirmAdminId" gorm:"column:confirm_admin_id;type:bigint;comment:确认管理员ID"`
- Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
- Status int8 `json:"status" gorm:"column:status;type:tinyint;default:0;index:idx_status;comment:状态: 0=待支付 1=待确认 2=已完成 3=已取消 4=已退款"`
- CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;index:idx_created_at;comment:创建时间"`
- UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
- }
- func (*DtRechargeOrder) TableName() string {
- return "dt_recharge_order"
- }
- func NewDtRechargeOrder() *DtRechargeOrder {
- return &DtRechargeOrder{}
- }
- // DtWithdrawOrder 提现订单表
- type DtWithdrawOrder struct {
- Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:订单ID"`
- OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(32);not null;uniqueIndex:uk_order_no;comment:订单编号"`
- UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;index:idx_user_id;comment:用户ID"`
- UserUid string `json:"userUid" gorm:"column:user_uid;type:varchar(32);comment:用户UID"`
- Channel string `json:"channel" gorm:"column:channel;type:varchar(32);not null;index:idx_channel;comment:提现渠道: usdt/momo/zalopay/bank"`
- Amount float64 `json:"amount" gorm:"column:amount;type:decimal(18,2);default:0.00;comment:提现金额(USDT)"`
- ActualAmount float64 `json:"actualAmount" gorm:"column:actual_amount;type:decimal(18,2);default:0.00;comment:实际到账"`
- Fee float64 `json:"fee" gorm:"column:fee;type:decimal(18,2);default:0.00;comment:手续费"`
- ExchangeRate float64 `json:"exchangeRate" gorm:"column:exchange_rate;type:decimal(18,6);default:1.000000;comment:汇率"`
- ReceiveAmount float64 `json:"receiveAmount" gorm:"column:receive_amount;type:decimal(18,2);default:0.00;comment:收款金额(原币种)"`
- ReceiveCurrency string `json:"receiveCurrency" gorm:"column:receive_currency;type:varchar(16);default:USDT;comment:收款币种"`
- PaymentId int64 `json:"paymentId" gorm:"column:payment_id;type:bigint;comment:收款方式ID"`
- ReceiveAccount string `json:"receiveAccount" gorm:"column:receive_account;type:varchar(128);comment:收款账号"`
- ReceiveName string `json:"receiveName" gorm:"column:receive_name;type:varchar(64);comment:收款人姓名"`
- BankName string `json:"bankName" gorm:"column:bank_name;type:varchar(64);comment:银行名称"`
- Txid string `json:"txid" gorm:"column:txid;type:varchar(128);comment:交易哈希/流水号"`
- PayScreenshot string `json:"payScreenshot" gorm:"column:pay_screenshot;type:varchar(255);comment:打款截图"`
- ApplyTime int64 `json:"applyTime" gorm:"column:apply_time;type:bigint;comment:申请时间"`
- AuditTime int64 `json:"auditTime" gorm:"column:audit_time;type:bigint;comment:审核时间"`
- AuditAdminId int64 `json:"auditAdminId" gorm:"column:audit_admin_id;type:bigint;comment:审核管理员ID"`
- PayTime int64 `json:"payTime" gorm:"column:pay_time;type:bigint;comment:打款时间"`
- PayAdminId int64 `json:"payAdminId" gorm:"column:pay_admin_id;type:bigint;comment:打款管理员ID"`
- RejectReason string `json:"rejectReason" gorm:"column:reject_reason;type:varchar(255);comment:拒绝原因"`
- Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
- Status int8 `json:"status" gorm:"column:status;type:tinyint;default:0;index:idx_status;comment:状态: 0=待审核 1=审核通过 2=已打款 3=已完成 4=已拒绝 5=已取消"`
- CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;index:idx_created_at;comment:创建时间"`
- UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
- }
- func (*DtWithdrawOrder) TableName() string {
- return "dt_withdraw_order"
- }
- func NewDtWithdrawOrder() *DtWithdrawOrder {
- return &DtWithdrawOrder{}
- }
- // DtBalanceLog 资金流水表
- type DtBalanceLog struct {
- Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:流水ID"`
- UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;index:idx_user_id;comment:用户ID"`
- UserUid string `json:"userUid" gorm:"column:user_uid;type:varchar(32);comment:用户UID"`
- Type string `json:"type" gorm:"column:type;type:varchar(32);not null;index:idx_type;comment:类型: recharge/withdraw/task_reward/invite_reward/level_purchase/refund/adjust"`
- Amount float64 `json:"amount" gorm:"column:amount;type:decimal(18,2);default:0.00;comment:变动金额"`
- BalanceBefore float64 `json:"balanceBefore" gorm:"column:balance_before;type:decimal(18,2);default:0.00;comment:变动前余额"`
- BalanceAfter float64 `json:"balanceAfter" gorm:"column:balance_after;type:decimal(18,2);default:0.00;comment:变动后余额"`
- RelatedId int64 `json:"relatedId" gorm:"column:related_id;type:bigint;comment:关联ID"`
- RelatedNo string `json:"relatedNo" gorm:"column:related_no;type:varchar(32);comment:关联单号"`
- Title string `json:"title" gorm:"column:title;type:varchar(128);comment:流水标题"`
- Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
- CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;index:idx_created_at;comment:创建时间"`
- }
- func (*DtBalanceLog) TableName() string {
- return "dt_balance_log"
- }
- func NewDtBalanceLog() *DtBalanceLog {
- return &DtBalanceLog{}
- }
- // DtPaymentChannel 支付渠道配置表
- type DtPaymentChannel struct {
- Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:渠道ID"`
- Code string `json:"code" gorm:"column:code;type:varchar(32);not null;uniqueIndex:uk_code;comment:渠道编码: usdt/momo/zalopay/bank"`
- Name string `json:"name" gorm:"column:name;type:varchar(64);not null;comment:渠道名称"`
- NameVi string `json:"nameVi" gorm:"column:name_vi;type:varchar(64);comment:渠道名称(越南语)"`
- Icon string `json:"icon" gorm:"column:icon;type:varchar(255);comment:渠道图标"`
- Type int8 `json:"type" gorm:"column:type;type:tinyint;default:1;comment:类型: 1=充值 2=提现 3=双向"`
- MinAmount float64 `json:"minAmount" gorm:"column:min_amount;type:decimal(18,2);default:0.00;comment:最小金额"`
- MaxAmount float64 `json:"maxAmount" gorm:"column:max_amount;type:decimal(18,2);default:0.00;comment:最大金额"`
- FeeType int8 `json:"feeType" gorm:"column:fee_type;type:tinyint;default:1;comment:手续费类型: 1=固定 2=比例"`
- FeeValue float64 `json:"feeValue" gorm:"column:fee_value;type:decimal(18,4);default:0.0000;comment:手续费值"`
- ExchangeRate float64 `json:"exchangeRate" gorm:"column:exchange_rate;type:decimal(18,6);default:1.000000;comment:汇率"`
- Config string `json:"config" gorm:"column:config;type:json;comment:渠道配置(API密钥等)"`
- ReceiveAddress string `json:"receiveAddress" gorm:"column:receive_address;type:varchar(128);comment:收款地址(USDT)"`
- ReceiveQrcode string `json:"receiveQrcode" gorm:"column:receive_qrcode;type:varchar(255);comment:收款二维码"`
- Description string `json:"description" gorm:"column:description;type:varchar(512);comment:说明"`
- Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
- Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
- CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
- UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
- }
- func (*DtPaymentChannel) TableName() string {
- return "dt_payment_channel"
- }
- func NewDtPaymentChannel() *DtPaymentChannel {
- return &DtPaymentChannel{}
- }
|