From 208b9a3baafd12e0182066b39bdb985021384e4b Mon Sep 17 00:00:00 2001 From: SoXX Date: Wed, 15 Nov 2023 14:05:21 +0100 Subject: [PATCH] refactor: added more accurate types Signed-off-by: SoXX --- pkg/e621/model/post.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/e621/model/post.go b/pkg/e621/model/post.go index 45f502e..82f6baf 100644 --- a/pkg/e621/model/post.go +++ b/pkg/e621/model/post.go @@ -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 {