// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1

package types

type Comment struct {
	Id        int64       `json:"id,string"`
	Content   string      `json:"content"`
	Author    UserProfile `json:"author"`
	LikeCount int64       `json:"likeCount"`
	Liked     bool        `json:"liked"`
	CreatedAt string      `json:"createdAt"`
}

type CommentListResp struct {
	Items []Comment `json:"items"`
	Meta  PageMeta  `json:"meta"`
}

type CreateCommentReq struct {
	PostId  int64  `json:"-"`
	Content string `json:"content"`
}

type CreatePostReq struct {
	Title         string   `json:"title"`
	Content       string   `json:"content"`
	Images        []string `json:"images"`
	Tags          []string `json:"tags"`
	LinkedOrderId string   `json:"linkedOrderId,optional"`
}

type EmptyResp struct {
}

type ListCommentsReq struct {
	PathId
	PageReq
}

type PageMeta struct {
	Total  int64 `json:"total"`
	Offset int64 `json:"offset"`
	Limit  int64 `json:"limit"`
}

type PageReq struct {
	Offset int64 `form:"offset,default=0"`
	Limit  int64 `form:"limit,default=20"`
}

type PathId struct {
	Id int64 `path:"id"`
}

type Post struct {
	Id            int64       `json:"id,string"`
	Title         string      `json:"title"`
	Content       string      `json:"content"`
	Images        []string    `json:"images"`
	Tags          []string    `json:"tags"`
	LinkedOrderId int64       `json:"linkedOrderId,string,optional"`
	Pinned        bool        `json:"pinned"`
	LikeCount     int64       `json:"likeCount"`
	CommentCount  int64       `json:"commentCount"`
	Liked         bool        `json:"liked"`
	Author        UserProfile `json:"author"`
	CreatedAt     string      `json:"createdAt"`
}

type PostListReq struct {
	PageReq
	Tags   string `form:"tags,optional"`
	SortBy string `form:"sortBy,optional"`
}

type PostListResp struct {
	Items []Post   `json:"items"`
	Meta  PageMeta `json:"meta"`
}

type SimpleUser struct {
	Id       string `json:"id"`
	Nickname string `json:"nickname"`
	Avatar   string `json:"avatar"`
}

type UserProfile struct {
	Id                 string            `json:"id"`
	Username           string            `json:"username"`
	Nickname           string            `json:"nickname"`
	Avatar             string            `json:"avatar"`
	Role               string            `json:"role"` // consumer, player, owner, admin
	VerifiedRoles      []string          `json:"verifiedRoles"`
	VerificationStatus map[string]string `json:"verificationStatus"`
	Phone              string            `json:"phone,optional"`
	Bio                string            `json:"bio,optional"`
	CreatedAt          string            `json:"createdAt"`
}
