catface_backend_go/app/model/encounter_result.go

19 lines
754 B
Go
Raw Normal View History

2024-10-20 21:01:12 +08:00
package model
import "time"
2024-10-20 21:02:22 +08:00
// TIP 用这种方式绑定 GORM 的 Raw 就会比较有效了。
2024-10-20 21:01:12 +08:00
type EncounterList struct {
2024-10-21 00:24:48 +08:00
Id int `form:"id" json:"id"`
UserId int `form:"user_id" json:"user_id"`
Title string `form:"title" json:"title"`
Avatar string `form:"avatar" json:"url"`
AvatarHeight int `form:"avatar_height" json:"height"`
AvatarWidth int `form:"avatar_width" json:"width"`
UpdatedAt *time.Time `form:"updated_at" json:"time"` // TIP 设为 *time.Timeomitempty 和 autoUpdated 就都可以生效
2024-10-21 01:24:01 +08:00
Like bool `form:"ue_like" json:"like"`
2024-10-20 21:01:12 +08:00
2024-10-21 00:24:48 +08:00
UserName string `form:"user_name" json:"userName"`
UserAvatar string `form:"user_avatar" json:"userAvatar"`
2024-10-20 21:01:12 +08:00
}