refactor: added more accurate types

Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
SoXX 2023-11-15 14:05:21 +01:00
parent 95e1db6ce6
commit 208b9a3baa

View File

@ -24,8 +24,8 @@ type Post struct {
Sources []string `json:"sources" csv:"source"`
Pools []interface{} `json:"pools" csv:"-"`
Relationships Relationships `json:"relationships" csv:"-"`
ApproverID interface{} `json:"approver_id" csv:"approver_id"`
UploaderID int64 `json:"uploader_id" csv:"uploader_id"`
ApproverID UserID `json:"approver_id" csv:"approver_id"`
UploaderID UserID `json:"uploader_id" csv:"uploader_id"`
Description string `json:"description" csv:"description"`
CommentCount int64 `json:"comment_count" csv:"comment_count"`
IsFavorited bool `json:"is_favorited" csv:"-"`
@ -58,10 +58,10 @@ type Preview struct {
}
type Relationships struct {
ParentID interface{} `json:"parent_id" csv:"parent_id"`
HasChildren bool `json:"has_children" csv:"-"`
HasActiveChildren bool `json:"has_active_children" csv:"-"`
Children []interface{} `json:"children" csv:"-"`
ParentID PostID `json:"parent_id" csv:"parent_id"`
HasChildren bool `json:"has_children" csv:"-"`
HasActiveChildren bool `json:"has_active_children" csv:"-"`
Children []PostID `json:"children" csv:"-"`
}
type Sample struct {