post

package
v0.0.0-...-139547c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 2 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.BaseModel
}

帖子评论

type CommentReplay

type CommentReplay struct {
	model.BaseModel
}

帖子评论回复

type Image

type Image struct {
	ID       uint   `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	PostID   uint   `json:"-" gorm:"column:post_id;not null;index:post_image_post_id_idx"`
	ImageURL string `json:"image_url" gorm:"column:image_url;not null"`
	Index    int    `json:"index" gorm:"column:index;not null;default:0"`
	Type     string `json:"type" gorm:"column:type;not null"`
}

帖子图片

type Like

type Like struct {
	model.BaseModel
	UserID     uint `json:"user_id" gorm:"index:plk_user_id_idx;column:user_id;not null"`
	PostID     uint `json:"post_id" gorm:"column:post_id;not null;index:plk_post_id_idx"`
	LikeStatus int  `json:"like_status" gorm:"column:like_status;not null;default 0"`
}

帖子点赞

type Post

type Post struct {
	model.BaseModel
	UserID   uint   `json:"user_id" gorm:"index:post_user_id_idx;column:user_id;not null"`
	CircleID uint   `json:"circle_id" gorm:"index:post_circle_id_idx;column:circle_id;not null"`
	Content  string `json:"content" gorm:"column:content;size:500"`
	Type     string `json:"type" gorm:"column:type;size:20"`
}

type Share

type Share struct {
	model.BaseModel
	UserID           uint   `json:"user_id" gorm:"index:psr_user_id_idx;column:user_id;not null"`
	PostID           uint   `json:"post_id" gorm:"column:post_id;not null;index:psr_post_id_idx"`
	ShareDestination string `json:"share_destination" gorm:"column:share_destination;default null;size:15"`
}

帖子分享

type Video

type Video struct {
	ID       uint   `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	PostID   uint   `json:"post_id" gorm:"column:post_id;not null;index:post_video_post_id_idx"`
	VideoURL string `json:"video_url" gorm:"column:video_url;not null"`
}

帖子视频

type Vote

type Vote struct {
	model.BaseModel
	PostID    uint      `json:"post_id" gorm:"column:post_id;not null;index:post_vote_post_id_idx"`
	Title     string    `json:"title" gorm:"column:title;not null;size:50"`
	CloseDate time.Time `json:"close_date"`
}

帖子投票

type VoteMember

type VoteMember struct {
	model.BaseModel
	UserID           uint `json:"user_id" gorm:"index:pvm_user_id_idx;column:user_id;not null"`
	PostID           uint `json:"post_id" gorm:"column:post_id;not null;index:pvm_post_id_idx"`
	PostVoteID       uint `json:"post_vote_id" gorm:"column:post_vote_id;not null;index:pvm_post_vote_id_idx"`
	PostVoteOptionID uint `json:"post_vote_option_id" gorm:"column:post_vote_option_id;not null"`
}

帖子投票参与人

type VoteOption

type VoteOption struct {
	model.BaseModel
	Content string `json:"content" gorm:"column:content;not null;size:30"`
	VoteID  uint   `json:"vote_id" gorm:"column:vote_id;not null;index:vote_option_vote_id_idx"`
	Count   uint   `json:"count" gorm:"column:count;default:0"`
	Index   int    `json:"index" gorm:"column:index;"`
}

投票选项

Jump to

Keyboard shortcuts

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