frontend

package
v0.0.0-...-9d2f815 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 EditUserReq struct {
	Name   string `v:"required|regex:[\u4e00-\u9fa5a-zA-Z0-9]{2,8}#用户名错误|用户名格式错误" form:"name"`
	Gender int    `form:"gender"`
	Email  string `form:"email"`
	City   string `form:"city"`
	Site   string `form:"site"`
	Job    string `form:"job"`
	Desc   string `form:"desc"`
	Tab    string `form:"tab"`
}

type Follow

type Follow struct {
	model.Follows
	Follower *model.Users `gorm:"foreignKey:user_id"`
	Fans     *model.Users `gorm:"foreignKey:target_id"`
}

type FollowUserReq

type FollowUserReq struct {
	UserID uint64 `v:"required#关注目标错误" form:"user_id"`
}

type GetRemindListReq

type GetRemindListReq struct {
	Page int    `form:"page"`
	Type string `form:"type"`
}

type GetSearchListReq

type GetSearchListReq struct {
	Page     int    `form:"page"`
	Keywords string `v:"required#搜索关键词不能为空" form:"keywords"`
}

type GetTopicListReq

type GetTopicListReq struct {
	Page int    `form:"page"`
	Type string `form:"type"`
}

type GetUserHomeReq

type GetUserHomeReq struct {
	Page int    `form:"page"`
	Tab  string `form:"tab"`
	ID   int    `form:"id"`
}

type Like

type Like struct {
	model.Likes
	User       model.Users `gorm:"foreignKey:user_id"`
	TargetUser model.Users `gorm:"foreignKey:target_user_id"`
}

type LikeReq

type LikeReq struct {
	SourceID     uint64 `v:"required#请输入资源ID" form:"source_id"`
	SourceType   string `v:"required|in:comment,topic#资源类型错误|资源类型错误" form:"source_type"`
	TargetUserID uint64 `v:"required#目标用户错误" form:"target_user_id"`
}

type LoginReq

type LoginReq struct {
	Name     string `v:"required|regex:^[\u4e00-\u9fa5a-zA-Z0-9]{2,8}$#用户名错误|用户名格式错误" form:"name"`
	Password string `v:"required|length:6,20#账号或密码错误|密码长度错误" form:"password"`
}

type Node

type Node struct {
	model.Nodes
}

type NodeTree

type NodeTree struct {
	Item  Node
	Child Nodes
}

type Nodes

type Nodes struct {
	List []Node
}

type PublishTopicReq

type PublishTopicReq struct {
	NodeId    int64  `v:"required|integer|min:1#请选择话题分类|请选择话题分类|请选择话题分类" form:"node_id"`
	Title     string `v:"required#请输入话题标题" form:"title"`
	Content   string `v:"required#请输入话题内容" form:"content"`
	MDContent string `v:"required#请输入话题内容" form:"md_content"`
	Tags      string `form:"tags"`
}

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 Remind

type Remind struct {
	model.Reminds
	ReceiverUser model.Users `gorm:"foreignKey:receiver"`
	SenderUser   model.Users `gorm:"foreignKey:sender"`
}

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"`
}

type Topic

type Topic struct {
	model.Topics
	Publisher User        `gorm:"foreignKey:user_id"`
	Responder model.Users `gorm:"foreignKey:reply_id"`
	Node      model.Nodes `gorm:"foreignKey:node_id"`
	Like      *Like       `gorm:"foreignKey:source_id"`
	Likes     []*Like     `gorm:"foreignKey:source_id"`
	PostDays  int         `gorm:"-"`
}

type User

type User struct {
	model.Users
	Follow  *model.Follows  `gorm:"foreignKey:target_id"`
	Checkin *model.Checkins `gorm:"foreignKey:user_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL