From 90bd8002834dead46f936efa6db13a03b3b24c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Fri, 30 Dec 2022 01:44:31 -0500 Subject: [PATCH] Implemented Reply model --- models/post/post.go | 14 ++++++++++++++ models/reply/reply.go | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 models/reply/reply.go diff --git a/models/post/post.go b/models/post/post.go index 53b3f0b..d4a2065 100644 --- a/models/post/post.go +++ b/models/post/post.go @@ -1,9 +1,23 @@ package post +import ( + "github.com/mrusme/gobbs/models/author" + "github.com/mrusme/gobbs/models/reply" +) + type Post struct { ID string Subject string + Body string + Type string // "post", "url" + + Pinned bool + Closed bool + + Author author.Author + + Replies []reply.Reply } func (post Post) FilterValue() string { diff --git a/models/reply/reply.go b/models/reply/reply.go new file mode 100644 index 0000000..7008cf7 --- /dev/null +++ b/models/reply/reply.go @@ -0,0 +1,11 @@ +package reply + +import "github.com/mrusme/gobbs/models/author" + +type Reply struct { + ID string + + Body string + + Author author.Author +}