From 1d5ba86088c1080842eed25fa69040ceec3a6bc2 Mon Sep 17 00:00:00 2001 From: shaoyongjun Date: Wed, 2 Oct 2024 00:43:45 +0800 Subject: [PATCH] to:sync --- go.mod | 2 +- infrastructure/repository/user_base_repository.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c34e4be..c97174e 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.23 require ( github.com/go-playground/validator v9.31.0+incompatible github.com/go-redis/redis/v8 v8.11.5 + github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/uuid v1.6.0 github.com/imroc/req/v3 v3.46.1 github.com/labstack/echo/v4 v4.12.0 @@ -45,7 +46,6 @@ require ( github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134 // indirect diff --git a/infrastructure/repository/user_base_repository.go b/infrastructure/repository/user_base_repository.go index 6dbf25a..63d478e 100644 --- a/infrastructure/repository/user_base_repository.go +++ b/infrastructure/repository/user_base_repository.go @@ -28,13 +28,13 @@ type UserDO struct { VipType uint `gorm:"column:vip_type;type:smallint(4) unsigned;default:0;comment:会员类型:0:非会员;1:普通会员;2:永久会员;NOT NULL" json:"vip_type"` VipExpired *uint64 `gorm:"column:vip_expired;type:smallint(4) unsigned;default:0;comment:会员过期时间;NOT NULL" json:"vip_expired"` - RegisterSource string `gorm:"column:register_source;type:varchar(16);comment:注册来源" json:"register_source"` - LatestIp string `gorm:"column:latest_ip;type:varchar(32);comment:最近登录的ip" json:"latest_ip"` - LatestLoginTime uint64 `gorm:"column:latest_login_time;type:varchar(32);comment:最近登录的时间戳" json:"latest_login_time"` + RegisterSource *string `gorm:"column:register_source;type:varchar(16);comment:注册来源" json:"register_source"` + LatestIp *string `gorm:"column:latest_ip;type:varchar(32);comment:最近登录的ip" json:"latest_ip"` + LatestLoginTime uint64 `gorm:"column:latest_login_time;type:varchar(32);comment:最近登录的时间戳" json:"latest_login_time"` - Status uint `gorm:"column:status;type:smallint(4) unsigned;default:1;comment:是否有效。0:否;1:是;NOT NULL" json:"status"` + Status uint `gorm:"column:status;type:smallint(4) unsigned;default:0;comment:状态。0:正常;1:冻结;NOT NULL" json:"status"` Deleted bool `gorm:"column:deleted;type:smallint(4) unsigned;default:0;comment:逻辑删除。 0:未删除;1:已删除;NOT NULL" json:"deleted"` - Remark string `gorm:"column:remark;type:varchar(64);comment:备注" json:"remark"` + Remark *string `gorm:"column:remark;type:varchar(64);comment:备注" json:"remark"` CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP;comment:创建时间;NOT NULL" json:"create_time"` UpdateTime time.Time `gorm:"column:update_time;type:timestamp;default:CURRENT_TIMESTAMP;comment:更新时间;NOT NULL" json:"update_time"` }