Documentation ¶
Index ¶
- type Comment
- type DeleteCommentReq
- type EditPasswordReq
- type EditUserReq
- type Follow
- type FollowUserReq
- type GetRemindListReq
- type GetSearchListReq
- type GetTopicListReq
- type GetUserHomeReq
- type Like
- type LikeReq
- type LoginReq
- type Node
- type NodeTree
- type Nodes
- type PublishTopicReq
- type RegisterReq
- type Remind
- type SubmitCommentReq
- type SubmitReportReq
- type SystemUserNotice
- type Topic
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { model.Comments Floor int `gorm:"-"` // 评论楼层 ReplyFloor int `gorm:"-"` // 回复楼层 Publisher model.Users `gorm:"foreignKey:user_id"` // 评论人 Responder *model.Users `gorm:"foreignKey:reply_id"` // 回复人 Topic model.Topics `gorm:"foreignKey:topic_id"` // 话题 Like *model.Likes `gorm:"foreignKey:source_id"` // 点赞 }
Comment 评论
type DeleteCommentReq ¶
type DeleteCommentReq struct {
ID uint64 `v:"required#参数错误" form:"id"`
}
DeleteCommentReq 删除评论
type EditPasswordReq ¶
type EditPasswordReq struct { OldPassword string `v:"required|length:6,20#旧密码错误|旧密码错误" form:"old_password"` Password string `v:"required|length:6,20|same:confirm_password#密码错误|密码长度错误|密码和确认密码不一致" form:"password"` ConfirmPassword string `v:"required|length:6,20#确认密码错误|密码长度错误" form:"confirm_password"` }
type EditUserReq ¶
type FollowUserReq ¶
type FollowUserReq struct {
UserID uint64 `v:"required#关注目标错误" form:"user_id"`
}
type GetRemindListReq ¶
type GetSearchListReq ¶
type GetTopicListReq ¶
type GetUserHomeReq ¶
type PublishTopicReq ¶
type RegisterReq ¶
type RegisterReq struct { Name string `v:"required|regex:^[\u4e00-\u9fa5a-zA-Z0-9]{2,8}$#用户名错误|用户名格式错误" form:"name"` Gender uint `v:"required|in:1,2#请选择性别|请选择性别" form:"gender"` Password string `v:"required|length:6,20|same:confirm_password#密码错误|密码长度错误|密码和确认密码不一致" form:"password"` ConfirmPassword string `v:"required|length:6,20#确认密码错误|密码长度错误" form:"confirm_password"` }
type SubmitCommentReq ¶
type SubmitCommentReq struct { ReplyId uint64 `form:"reply_id"` TargetId uint64 `form:"target_id"` TopicId uint64 `v:"required#帖子ID错误" form:"topic_id"` Content string `v:"required#请输入评论内容" form:"content"` MDContent string `v:"required#请输入评论内容" form:"md_content"` }
SubmitCommentReq 评论话题
type SubmitReportReq ¶
type SubmitReportReq struct { Remark string `v:"required|length:1,150#请输入举报内容|内容长度不能超过150个字符" form:"remark"` SourceID uint64 `v:"required#请输入资源ID" form:"source_id"` SourceType string `v:"required|in:comment,topic#资源类型错误|资源类型错误" form:"source_type"` TargetID uint64 `v:"required#请输入资源ID" form:"target_id"` }
type SystemUserNotice ¶
type SystemUserNotice struct { model.SystemUserNotices Notice model.SystemNotices `gorm:"foreignKey:notice_id"` }
Click to show internal directories.
Click to hide internal directories.