This commit is contained in:
aozhiwei 2024-11-04 17:13:45 +08:00
parent 2ca134a077
commit fffea28bfb
2 changed files with 17 additions and 1 deletions

View File

@ -56,7 +56,7 @@ CREATE TABLE `t_user` (
`idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'accountid',
`avatar` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'avatar',
`name` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'name',
`nickname` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'nickname',
`score` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'score',
`dice` int(11) NOT NULL DEFAULT '0' COMMENT '骰子数',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',

View File

@ -0,0 +1,16 @@
package model
type User struct {
Idx int64 `gorm:"column:idx"`
AccountId string `gorm:"column:account_id"`
Avatar string `gorm:"column:avatar"`
NickName string `gorm:"column:nickname"`
Score string `gorm:"column:score"`
Dice int32 `gorm:"column:dice"`
CreateTime int32 `gorm:"column:createtime" json:"-"`
ModifyTime int32 `gorm:"column:modifytime" json:"-"`
}
func (this User) TableName() string {
return "t_user"
}