ForumPost
final class ForumPost : Model, Searchableextension ForumPost: ContentFilterableextension ForumPost: ReportableAn individual post within a Forum. A ForumPost must contain text content and may also contain image content.
Posts have a moderationStatus that moderators can change to perform moderation actdions.
When a post is edited, a ForumPostEdit is created to save the pre-edit state of the post.
See
See Also: PostData the DTO for returning basic data on ForumPosts.See
See Also: PostDetailData the DTO for returning extended data on ForumPosts.See
See Also: PostContentData the DTO for creating ForumPosts.See
See Also: CreateForumPostSchema the Migration for creating the ForumPost table in the database.- 
                  
                  DeclarationSwift static let schema: String
- 
                  
                  The post’s ID. Sorting posts in a thread by ID should produce the correct ordering, but post IDs are unique through all forums, and won’t be sequential in any forum. DeclarationSwift @ID var id: Int?
- 
                  
                  The text content of the post. DeclarationSwift @Field var text: String
- 
                  
                  The filenames of any images for the post. DeclarationSwift @OptionalField var images: [String]?
- 
                  
                  Moderators can set several statuses on forumPosts that modify editability and visibility. DeclarationSwift @Enum var moderationStatus: ContentModerationStatus
- 
                  
                  Timestamp of the model’s creation, set automatically. DeclarationSwift @Timestamp var createdAt: Date?
- 
                  
                  Timestamp of the model’s last update, set automatically. DeclarationSwift @Timestamp var updatedAt: Date?
- 
                  
                  Timestamp of the model’s soft-deletion, set automatically. DeclarationSwift @Timestamp var deletedAt: Date?
- 
                  
                  Is the post pinned within the forum. DeclarationSwift @Field var pinned: Bool
- 
                  
                  The child ForumPostEditaccountability records of the post.DeclarationSwift @Children var edits: [ForumPostEdit]
- 
                  
                  The sibling Users who have “liked” the post.DeclarationSwift @Siblings var likes: <<error type>>
- 
                  
                  DeclarationSwift init()
- 
                  
                  Initializes a new ForumPost. DeclarationSwift init( forum: Forum, authorID: UUID, text: String, images: [String]? = nil ) throwsParametersforumThe post’s forum. authorThe author of the post. textThe text content of the post. imageThe filename of any image content of the post. 
- 
                  
                  DeclarationSwift func contentTextStrings() -> [String]
- 
                  
                  DeclarationSwift var reportType: ReportType { get }
- 
                  
                  DeclarationSwift var authorUUID: UUID { get }
- 
                  
                  DeclarationSwift var autoQuarantineThreshold: Int { get }
 View on GitHub
            View on GitHub
           ForumPost Class Reference
      ForumPost Class Reference