🐛 fix bug
This commit is contained in:
@@ -4,11 +4,11 @@ import "miniapp/global"
|
||||
|
||||
type Favorite struct {
|
||||
global.GVA_MODEL
|
||||
UserId int `json:"userId" gorm:"not null;column:user_id;comment:'用户id'"` // 用户id
|
||||
WzId int `json:"wzId" gorm:"not null;comment:收藏id"` // 收藏id
|
||||
Cover string `json:"cover" gorm:"size:50;comment:封面"`
|
||||
Titte string `json:"title" comment:"收藏商品名称"` // 收藏商品名称
|
||||
Introduction string `json:"introduction" comment:"简介"` // 简介
|
||||
UserId int `json:"userId" form:"userId" gorm:"not null;column:user_id;comment:'用户id'"` // 用户id
|
||||
WzId int `json:"wzId" form:"wzId" gorm:"not null;comment:收藏id"` // 收藏id
|
||||
Cover string `json:"cover" form:"cover" gorm:"comment:封面"`
|
||||
Titte string `json:"title" form:"title" comment:"收藏商品名称"` // 收藏商品名称
|
||||
Introduction string `json:"introduction" form:"introduction" comment:"简介"` // 简介
|
||||
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,6 @@ package request
|
||||
import (
|
||||
"miniapp/model/common/constant"
|
||||
"miniapp/model/common/request"
|
||||
"miniapp/model/types"
|
||||
)
|
||||
|
||||
type BindingWeChat struct {
|
||||
@@ -47,8 +46,8 @@ type SaveUser struct {
|
||||
}
|
||||
|
||||
type ChangeUserHospital struct {
|
||||
UserId int `json:"userId" form:"userId" binding:"required"` // 用户ID
|
||||
HospitalId int `json:"hospitalId" form:"hospitalId" binding:"required"` // 医院ID
|
||||
IsSurgery int `json:"isSurgery" form:"isSurgery"` // 是否已经手术 0未手术 1已手术
|
||||
SurgeryTime *types.DateTime `json:"surgeryTime" form:"surgeryTime"` // 手术时间
|
||||
UserId int `json:"userId" form:"userId" binding:"required"` // 用户ID
|
||||
HospitalId int `json:"hospitalId" form:"hospitalId" binding:"required"` // 医院ID
|
||||
IsSurgery int `json:"isSurgery" form:"isSurgery"` // 是否已经手术 0未手术 1已手术
|
||||
SurgeryTime string `json:"surgery_time" form:"surgery_time"` // 手术时间
|
||||
}
|
||||
|
@@ -2,10 +2,11 @@ package response
|
||||
|
||||
import (
|
||||
"miniapp/model/app"
|
||||
"miniapp/model/common"
|
||||
"miniapp/model/common/constant"
|
||||
"miniapp/model/types"
|
||||
"miniapp/utils"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
type UserItem struct {
|
||||
@@ -26,14 +27,16 @@ type UserVO struct {
|
||||
Phone string `json:"phone"`
|
||||
Status constant.UserStatus `json:"status"`
|
||||
Avatar string `json:"avatar"`
|
||||
LastLoginAt *types.DateTime `json:"lastLoginAt"`
|
||||
LastLoginAt *time.Time `json:"lastLoginAt"`
|
||||
LastLoginIp *string `json:"lastLoginIp"`
|
||||
CreatedAt types.DateTime `json:"createdAt"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
TimeNote string `json:"timeNote"`
|
||||
IsSurgery int `json:"isSurgery" gorm:"default:0;comment:是否已经手术 0未手术 1已手术"`
|
||||
IsInfo int `json:"isInfo" gorm:"default:0;comment:是否已经填写信息 0未填写 1已填写"`
|
||||
HospitalId int `json:"hospital_id" gorm:"comment:手术医院"`
|
||||
SurgeryTime *types.DateTime `json:"surgery_time" gorm:"comment:手术时间"`
|
||||
SurgeryTime time.Time `json:"surgery_time" gorm:"comment:手术时间"`
|
||||
Todos []common.UserTodo `json:"todos" gorm:"comment:用户待办事项"`
|
||||
Notes []common.Notes `json:"notes" gorm:"comment:用户须知"`
|
||||
}
|
||||
|
||||
func (auv *UserVO) ParseOrdinary(u app.User) {
|
||||
@@ -43,7 +46,7 @@ func (auv *UserVO) ParseOrdinary(u app.User) {
|
||||
auv.Status = u.Status
|
||||
auv.LastLoginAt = u.LastLoginAt
|
||||
auv.Avatar = u.Avatar
|
||||
auv.CreatedAt = types.DateTime(u.CreatedAt)
|
||||
auv.CreatedAt = u.CreatedAt
|
||||
auv.IsSurgery = u.IsSurgery
|
||||
auv.IsInfo = u.IsInfo
|
||||
auv.HospitalId = u.HospitalId
|
||||
|
@@ -3,7 +3,7 @@ package app
|
||||
import (
|
||||
"miniapp/global"
|
||||
"miniapp/model/common/constant"
|
||||
"miniapp/model/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
@@ -17,8 +17,8 @@ type User struct {
|
||||
IsSurgery int `json:"isSurgery" gorm:"default:0;comment:是否已经手术 0未手术 1已手术"`
|
||||
IsInfo int `json:"isInfo" gorm:"default:0;comment:是否已经填写信息 0未填写 1已填写"`
|
||||
HospitalId int `json:"hospital_id" gorm:"comment:手术医院"`
|
||||
SurgeryTime *types.DateTime `json:"surgery_time" gorm:"comment:手术时间"`
|
||||
LastLoginAt *types.DateTime `json:"last_login_at" gorm:"comment:'最后登录时间'"`
|
||||
SurgeryTime time.Time `json:"surgery_time" gorm:"comment:手术时间"`
|
||||
LastLoginAt *time.Time `json:"last_login_at" gorm:"comment:'最后登录时间'"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
|
Reference in New Issue
Block a user