feat: import services and standardize Go 1.26.5
This commit is contained in:
33
apps/finance/wallet/internal/models/wallet_basic.go
Normal file
33
apps/finance/wallet/internal/models/wallet_basic.go
Normal file
@@ -0,0 +1,33 @@
|
||||
// Package models 定义钱包相关的数据模型
|
||||
// @Author: David Yan(david.yan@qq.com)
|
||||
// @Created: 2022-04-14 22:12:48
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/core/types"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// WalletBasic 钱包基础信息表
|
||||
// 存储用户钱包的基本信息,包括余额、支付密码、绑定的第三方支付账号等
|
||||
type WalletBasic struct {
|
||||
gorm.Model
|
||||
types.Std_Identity
|
||||
types.Std_Passport
|
||||
AlipayID string `gorm:"column:alipay_id;type:varchar(64);default:'';comment:绑定的支付宝ID;" json:"alipay_id"` // 绑定的支付宝ID
|
||||
WxpayID string `gorm:"column:wxpay_id;type:varchar(64);default:'';comment:绑定的微信支付ID;" json:"wxpay_id"` // 绑定的微信支付ID
|
||||
PayPassword string `gorm:"column:pay_password;type:varchar(255);default:'';comment:支付密码;" json:"pay_password"` // 支付密码
|
||||
Balance int64 `gorm:"column:balance;default:0;comment:余额;" json:"balance"` // 余额,单位:分
|
||||
WithdrawalBalance int64 `gorm:"column:withdrawal_balance;default:0;comment:可提现余额;" json:"withdrawal_balance"` // 可提现余额,单位:分
|
||||
types.Std_Status
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&WalletBasic{})
|
||||
}
|
||||
|
||||
// TableName 返回数据库表名
|
||||
func (table *WalletBasic) TableName() string {
|
||||
return "wallet_basic"
|
||||
}
|
||||
Reference in New Issue
Block a user