common

package
v0.0.0-...-76f8149 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LikeTypeAnswer  = 1
	LikeTypeComment = 2
)
View Source
const (
	UserSexMan   = 1
	UserSexWomen = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	AnswerId     int64     `json:"answer_id" db:"answer_id"`
	Content      string    `json:"content" db:"content"`
	CommentCount int32     `json:"comment_count" db:"comment_count"`
	VoteupCount  int32     `json:"voteup_count" db:"voteup_count"`
	AuthorId     int64     `json:"author_id" db:"author_id"`
	Status       int32     `json:"status" db:"status"`
	CanComment   int32     `json:"can_comment" db:"can_comment"`
	CreateTime   time.Time `json:"create_time" db:"create_time"`
	UpdateTime   time.Time `json:"update_time" db:"update_time"`
}

type ApiAnswer

type ApiAnswer struct {
	Answer
	AuthorName string `json:"answer_name" db:"answer_name"`
}

type ApiAnswerList

type ApiAnswerList struct {
	AnswerList []*ApiAnswer `json:"answer_list"`
	TotalCount int32        `json:"total_count"`
}

type ApiCommentList

type ApiCommentList struct {
	CommentList []*Comment `json:"comment_list"`
	Count       int64      `json:"count"`
}

type ApiQuestion

type ApiQuestion struct {
	Question
	AuthorName string `json:"author_name"`
}

type ApiQuestionDetail

type ApiQuestionDetail struct {
	Question
	AuthorName   string `json:"author_name"`
	CategoryName string `json:"category_name"`
}

type Category

type Category struct {
	CategoryId   int64  `json:"id" db:"category_id"`
	CategoryName string `json:"name" db:"category_name"`
}

type Comment

type Comment struct {
	CommentId       int64     `db:"comment_id" json:"comment_id"`
	Content         string    `db:"content" json:"content"`
	AuthorId        int64     `db:"author_id" json:"author_id"`
	LikeCount       int       `db:"like_count" json:"like_count"`
	CommentCount    int       `db:"comment_count" json:"comment_count"`
	CreateTime      time.Time `db:"create_time" json:"create_time"`
	ParentId        int64     `db:"parent_id" json:"parent_id"`
	QuestionId      int64     `db:"question_id" json:"question_id"`
	ReplyAuthorId   int64     `db:"reply_author_id" json:"reply_author_id"`
	ReplyCommentId  int64     `db:"reply_comment_id" json:"reply_comment_id"`
	AuthorName      string    `json:"author_name"`
	ReplyAuthorName string    `json:"reply_author_name"`
}

type Favorite

type Favorite struct {
	AnswerId int64 `db:"answer_id" json:"answer_id"`
	UserId   int64 `db:"user_id" json:"user_id"`
	DirId    int64 `db:"dir_id" json:"dir_id"`
}

type FavoriteDir

type FavoriteDir struct {
	DirId   int64  `db:"dir_id" json:"dir_id"`
	DirName string `db:"dir_name" json:"dir_name"`
	Count   int32  `db:"count" json:"count"`
	UserId  int64  `db:"user_id" json:"user_id"`
}

type Like

type Like struct {
	Id       int64 `json:"id"`
	LikeType int   `json:"type"`
}

type Question

type Question struct {
	QuestionId    int64     `json:"question_id" db:"question_id"`
	Caption       string    `json:"caption" db:"caption"`
	Content       string    `json:"content" db:"content"`
	AuthorId      int64     `json:"author_id" db:"author_id"`
	CategoryId    int64     `json:"category_id" db:"category_id"`
	Status        int32     `json:"status" db:"status"`
	CreateTime    time.Time `json:"-" db:"create_time"`
	CreateTimeStr string    `json:"create_time"`
}

type UserInfo

type UserInfo struct {
	UserId   int64  `json:"user_id" db:"user_id"`
	Nickname string `json:"nickname" db:"nickname"`
	Sex      int    `json:"sex" db:"sex"`
	Username string `json:"user" db:"username"`
	Email    string `json:"email" db:"email"`
	Password string `json:"password" db:"password"`
}

Jump to

Keyboard shortcuts

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