61 lines
1.9 KiB
Go
61 lines
1.9 KiB
Go
package model
|
|
|
|
import (
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
"time"
|
|
)
|
|
|
|
// ResponseListSocialPostAppInfo ...
|
|
type ResponseListSocialPostAppInfo struct {
|
|
SocialPosts []SocialPostAppInfo `json:"socialPosts"`
|
|
}
|
|
|
|
// SocialPostAppInfo ...
|
|
type SocialPostAppInfo struct {
|
|
ID primitive.ObjectID `json:"_id"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
Statistic SocialPostStatistic `json:"statistic"`
|
|
Author *SocialPostSellerInfo `json:"author"`
|
|
Photos ListPhoto `json:"photos"`
|
|
PublishedAt time.Time `json:"publishedAt"`
|
|
IsLiked bool `json:"isLiked"`
|
|
IsPin bool `json:"isPin"`
|
|
Contributor *SocialPostSellerInfo `json:"contributor"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Status string `json:"status"`
|
|
HasUpdate bool `json:"hasUpdate"`
|
|
Order int `json:"order"`
|
|
Videos ListVideo `json:"videos"`
|
|
}
|
|
|
|
// SocialPostStatistic ...
|
|
type SocialPostStatistic struct {
|
|
Views int `json:"views"`
|
|
UniqueViews int `json:"uniqueViews"`
|
|
Likes int `json:"likes"`
|
|
Shares int `json:"shares"`
|
|
UniqueShares int `json:"uniqueShares"`
|
|
Comments int `json:"comments"`
|
|
}
|
|
|
|
// SocialPostSellerInfo ...
|
|
type SocialPostSellerInfo struct {
|
|
ID primitive.ObjectID `json:"_id"`
|
|
Name string `json:"name"`
|
|
Membership SellerMembershipInfo `json:"membership"`
|
|
Logo *FilePhoto `json:"logo"`
|
|
IsMine bool `json:"isMine"`
|
|
}
|
|
|
|
// ResponseDetailSocialPostAdminInfo ...
|
|
type ResponseDetailSocialPostAdminInfo struct {
|
|
SocialPosts SocialPostAdminInfo `json:"socialPosts"`
|
|
}
|
|
|
|
type SocialPostAdminInfo struct {
|
|
ID primitive.ObjectID `json:"_id"`
|
|
Title string `json:"title"`
|
|
Status string `json:"status"`
|
|
}
|