Files
servicebase/pkg/res/app_user_moment.go
2025-11-18 17:48:20 +08:00

29 lines
1.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package res
import "servicebase/pkg/datasource/fields"
type UserMomentRes struct {
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
ClanID string `gorm:"column:clan_id;type:char(32);not null;comment:家" json:"clan_id"`
Title string `gorm:"column:title;type:varchar(64);not null;comment:标题" json:"title"`
TextContent string `gorm:"column:text_content;type:varchar(2048);not null;comment:内容" json:"text_content"`
CreateBy string `gorm:"column:create_by;type:char(32);not null;comment:创建人" json:"create_by"`
CreateAt fields.Time `gorm:"column:create_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_at"`
UpdateAt fields.Time `gorm:"column:update_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_at"`
UserNo string `gorm:"column:no;type:varchar(64);not null;index:uk,priority:1;comment:用户号、用户名" json:"user_no"`
UserNickname string `gorm:"column:nickname;type:varchar(64);not null;comment:昵称" json:"user_nickname"`
UserAvatar string `gorm:"column:avatar;type:varchar(255);not null;comment:头像" json:"user_avatar"`
Items []UserMomentItemRes `gorm:"-" json:"items"`
}
type UserMomentItemRes struct {
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
ClanID string `gorm:"column:clan_id;type:char(32);not null;comment:家" json:"clan_id"`
MomentID string `gorm:"column:moment_id;type:char(32);not null;comment:动态" json:"moment_id"`
Type string `gorm:"column:type;type:varchar(64);not null;comment:类型PIC=图片" json:"type"`
Content string `gorm:"column:content;type:varchar(255);not null;comment:内容、如图片id" json:"content"`
CreateBy string `gorm:"column:create_by;type:char(32);not null;comment:创建人" json:"create_by"`
}