From e92ccaca37828a194d17aced7d0631c947e1db3f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 9 Dec 2024 17:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=94=80=E5=A4=87=E4=BB=BD=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_virtual_amount_back.go | 14 ++++++++++++++ src/model/user_wallet_back.go | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/model/user_virtual_amount_back.go create mode 100644 src/model/user_wallet_back.go diff --git a/src/model/user_virtual_amount_back.go b/src/model/user_virtual_amount_back.go new file mode 100644 index 0000000..f44988b --- /dev/null +++ b/src/model/user_virtual_amount_back.go @@ -0,0 +1,14 @@ +package model + +import ( + "time" +) + +type UserVirtualAmountBack struct { + Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` + Uid int64 `json:"uid" xorm:"not null default 0 unique(idx_uid_coin_id) BIGINT(20)"` + CoinId int `json:"coin_id" xorm:"not null default 0 index(idx_coinid_amount) unique(idx_uid_coin_id) INT(11)"` + Amount string `json:"amount" xorm:"not null default 0.00000000 index(idx_coinid_amount) DECIMAL(28,8)"` + CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"` +} diff --git a/src/model/user_wallet_back.go b/src/model/user_wallet_back.go new file mode 100644 index 0000000..7eb7a7d --- /dev/null +++ b/src/model/user_wallet_back.go @@ -0,0 +1,13 @@ +package model + +import ( + "time" +) + +type UserWalletBack struct { + Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` + Uid int64 `json:"uid" xorm:"not null default 0 comment('用户id') BIGINT(20)"` + Amount string `json:"amount" xorm:"not null default 0.00 comment('用户余额') DECIMAL(10,2)"` + CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"` +}