From acec47a81b422d63e120d671f9c9cb585cafc14c Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 9 Dec 2024 17:15:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B3=A8=E9=94=80=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public_platoon_user_relation_back.go | 56 +++++++++++++++++++ src/model/user_back.go | 31 ++++++++++ src/model/user_real_name_auth_back.go | 25 +++++++++ src/model/user_relate_back.go | 13 +++++ 4 files changed, 125 insertions(+) create mode 100644 src/model/public_platoon_user_relation_back.go create mode 100644 src/model/user_back.go create mode 100644 src/model/user_real_name_auth_back.go create mode 100644 src/model/user_relate_back.go diff --git a/src/model/public_platoon_user_relation_back.go b/src/model/public_platoon_user_relation_back.go new file mode 100644 index 0000000..be1fd43 --- /dev/null +++ b/src/model/public_platoon_user_relation_back.go @@ -0,0 +1,56 @@ +package model + +import ( + "time" +) + +type PublicPlatoonUserRelationBack struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('用户id(若为-1,则代表等待新用户填充)') index INT(11)"` + RecommendUid int `json:"recommend_uid" xorm:"not null default 0 comment('推荐人id') INT(11)"` + FatherUid string `json:"father_uid" xorm:"not null default '' comment('父级uid(123456-563464-438384)') index VARCHAR(100)"` + FatherUid1 int `json:"father_uid1" xorm:"not null default 0 comment('父级uid_1') INT(11)"` + FatherUid2 int `json:"father_uid2" xorm:"not null default 0 comment('父级uid_2') INT(11)"` + FatherUid3 int `json:"father_uid3" xorm:"not null default 0 comment('父级uid_3') INT(11)"` + FatherUid4 int `json:"father_uid4" xorm:"not null default 0 comment('父级uid_4') INT(11)"` + FatherUid5 int `json:"father_uid5" xorm:"not null default 0 comment('父级uid_5') INT(11)"` + FatherUid6 int `json:"father_uid6" xorm:"not null default 0 comment('父级uid_6') INT(11)"` + FatherUid7 int `json:"father_uid7" xorm:"not null default 0 comment('父级uid_7') INT(11)"` + FatherUid8 int `json:"father_uid8" xorm:"not null default 0 comment('父级uid_8') INT(11)"` + FatherUid9 int `json:"father_uid9" xorm:"not null default 0 comment('父级uid_9') INT(11)"` + Pid1 int `json:"pid1" xorm:"not null default 0 comment('父级id_1') INT(11)"` + Pid2 int `json:"pid2" xorm:"not null default 0 comment('父级id_2') INT(11)"` + Pid3 int `json:"pid3" xorm:"not null default 0 comment('父级id_3') INT(11)"` + Pid4 int `json:"pid4" xorm:"not null default 0 comment('父级id_4') INT(11)"` + Pid5 int `json:"pid5" xorm:"not null default 0 comment('父级id_5') INT(11)"` + Pid6 int `json:"pid6" xorm:"not null default 0 comment('父级id_6') INT(11)"` + Pid7 int `json:"pid7" xorm:"not null default 0 comment('父级id_7') INT(11)"` + Pid8 int `json:"pid8" xorm:"not null default 0 comment('父级id_8') INT(11)"` + Pid9 int `json:"pid9" xorm:"not null default 0 comment('父级id_9') INT(11)"` + Position int `json:"position" xorm:"not null default 1 comment('位置(以自己为创始人)') INT(11)"` + Position1 int `json:"position1" xorm:"not null default 0 comment('位置_1(以pid1为创始人中网的位置)') INT(11)"` + Position2 int `json:"position2" xorm:"not null default 0 comment('位置_2') INT(11)"` + Position3 int `json:"position3" xorm:"not null default 0 comment('位置_3') INT(11)"` + Position4 int `json:"position4" xorm:"not null default 0 comment('位置_4') INT(11)"` + Position5 int `json:"position5" xorm:"not null default 0 comment('位置_5') INT(11)"` + Position6 int `json:"position6" xorm:"not null default 0 comment('位置_6') INT(11)"` + Position7 int `json:"position7" xorm:"not null default 0 comment('位置_7') INT(11)"` + Position8 int `json:"position8" xorm:"not null default 0 comment('位置_8') INT(11)"` + Position9 int `json:"position9" xorm:"not null default 0 comment('位置_9') INT(11)"` + Level int `json:"level" xorm:"not null default 1 comment('等级(以自己为创始人)') INT(11)"` + Level1 int `json:"level1" xorm:"not null default 0 comment('等级_1(以pid1为创始人中网的等级)') INT(11)"` + Level2 int `json:"level2" xorm:"not null default 0 comment('等级_2') INT(11)"` + Level3 int `json:"level3" xorm:"not null default 0 comment('等级_3') INT(11)"` + Level4 int `json:"level4" xorm:"not null default 0 comment('等级_4') INT(11)"` + Level5 int `json:"level5" xorm:"not null default 0 comment('等级_5') INT(11)"` + Level6 int `json:"level6" xorm:"not null default 0 comment('等级_6') INT(11)"` + Level7 int `json:"level7" xorm:"not null default 0 comment('等级_7') INT(11)"` + Level8 int `json:"level8" xorm:"not null default 0 comment('等级_8') INT(11)"` + Level9 int `json:"level9" xorm:"default 0 comment('等级_9') INT(11)"` + LevelTotal int `json:"level_total" xorm:"not null default 1 comment('等级(整个系统)') INT(11)"` + JoinAt time.Time `json:"join_at" xorm:"not null default CURRENT_TIMESTAMP comment('加入公排时间') DATETIME"` + HasSonNum int `json:"has_son_num" xorm:"not null default 0 comment('拥有直属下级数量') TINYINT(2)"` + IsAllowPunish int `json:"is_allow_punish" xorm:"not null default 1 comment('是否允许处罚(1:允许 2:不允许)') TINYINT(1)"` + 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_back.go b/src/model/user_back.go new file mode 100644 index 0000000..360dd89 --- /dev/null +++ b/src/model/user_back.go @@ -0,0 +1,31 @@ +package model + +import ( + "time" +) + +type UserBack struct { + Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` + Phone string `json:"phone" xorm:"not null default '' comment('手机号') VARCHAR(255)"` + UnionId string `json:"union_id" xorm:"not null default '' comment('微信用户id') VARCHAR(255)"` + OpenId string `json:"open_id" xorm:"not null default '' comment('微信openid') VARCHAR(255)"` + Nickname string `json:"nickname" xorm:"not null default '' comment('昵称') VARCHAR(255)"` + Avatar string `json:"avatar" xorm:"not null default '' comment('头像') VARCHAR(255)"` + Password string `json:"password" xorm:"not null default '' comment('密码') CHAR(50)"` + Passcode string `json:"passcode" xorm:"not null default '' comment('支付密码') CHAR(50)"` + Level int `json:"level" xorm:"not null default 0 comment('用户等级id') INT(11)"` + InviteTotal int `json:"invite_total" xorm:"not null default 0 comment('直推邀请总人数') INT(11)"` + State int `json:"state" xorm:"not null default 1 comment('1正常,2冻结') TINYINT(1)"` + LastLoginIp string `json:"last_login_ip" xorm:"not null default '' comment('最后登录IP') CHAR(50)"` + Sex int `json:"sex" xorm:"not null default 0 comment('性别(0:未知 1:男 2:女)') TINYINT(1)"` + ParentUid int64 `json:"parent_uid" xorm:"not null default 0 comment('父级id') BIGINT(20)"` + SystemInviteCode string `json:"system_invite_code" xorm:"not null default '' comment('系统邀请码') CHAR(50)"` + CustomInviteCode string `json:"custom_invite_code" xorm:"not null default '' comment('自定义邀请码') CHAR(50)"` + Memo string `json:"memo" xorm:"not null default '' comment('备注信息') VARCHAR(244)"` + IsRealName int `json:"is_real_name" xorm:"not null default 0 comment('是否实名(0:未实名 1.已实名)') TINYINT(1)"` + RegisterType int `json:"register_type" xorm:"not null default 1 comment('注册类型(1:APP注册、2:H5注册)') TINYINT(1)"` + LastLoginAt time.Time `json:"last_login_at" xorm:"not null default CURRENT_TIMESTAMP comment('最近登录时间') DATETIME"` + 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"` + DeleteAt time.Time `json:"delete_at" xorm:"DATETIME"` +} diff --git a/src/model/user_real_name_auth_back.go b/src/model/user_real_name_auth_back.go new file mode 100644 index 0000000..d26b65d --- /dev/null +++ b/src/model/user_real_name_auth_back.go @@ -0,0 +1,25 @@ +package model + +import ( + "time" +) + +type UserRealNameAuthBack struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"comment('用户id') index INT(11)"` + RealName string `json:"real_name" xorm:"comment('真实姓名') VARCHAR(255)"` + CardNo string `json:"card_no" xorm:"comment('身份证号') VARCHAR(255)"` + FrontImg string `json:"front_img" xorm:"comment('身份证正面(国徽面)') VARCHAR(255)"` + BackImg string `json:"back_img" xorm:"comment('身份证反面(人像面)') VARCHAR(255)"` + State int `json:"state" xorm:"comment('0未审核 1通过 2拒绝') TINYINT(1)"` + AuditType int `json:"audit_type" xorm:"comment('审核类型:1自动 2手动') TINYINT(1)"` + IsPay int `json:"is_pay" xorm:"not null default 0 comment('是否支付,0:否 ,1:是') TINYINT(1)"` + CreateTime time.Time `json:"create_time" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"` + UpdateTime time.Time `json:"update_time" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') DATETIME"` + Oid string `json:"oid" xorm:"default '' comment('订单号') VARCHAR(50)"` + Msg string `json:"msg" xorm:"comment('调用支付宝实名接口数据') LONGTEXT"` + CertifyId string `json:"certify_id" xorm:"default '' comment('支付宝的实名认证id') VARCHAR(255)"` + Amount float64 `json:"amount" xorm:"default 0.00 comment('付款金额') DOUBLE(11,2)"` + AlipayOid string `json:"alipay_oid" xorm:"default '' comment('支付宝人脸识别订单号(会变化)') VARCHAR(50)"` + IsCheck int `json:"is_check" xorm:"default 0 INT(1)"` +} diff --git a/src/model/user_relate_back.go b/src/model/user_relate_back.go new file mode 100644 index 0000000..d220eb7 --- /dev/null +++ b/src/model/user_relate_back.go @@ -0,0 +1,13 @@ +package model + +import ( + "time" +) + +type UserRelateBack struct { + Id int64 `json:"id" xorm:"pk autoincr comment('主键') BIGINT(10)"` + ParentUid int64 `json:"parent_uid" xorm:"not null default 0 comment('上级会员ID') unique(idx_union_u_p_id) BIGINT(20)"` + Uid int64 `json:"uid" xorm:"not null default 0 comment('关联UserID') unique(idx_union_u_p_id) BIGINT(20)"` + Level int `json:"level" xorm:"not null default 1 comment('推广等级(1直属,大于1非直属)') INT(10)"` + InviteTime time.Time `json:"invite_time" xorm:"default CURRENT_TIMESTAMP comment('邀请时间') TIMESTAMP"` +} 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 2/2] =?UTF-8?q?=E6=B3=A8=E9=94=80=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=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"` +}