Forum
final class Forum : Model, Searchableextension Forum: ReportableA collection of ForumPosts on a single topic. Only the forum’s creator or a moderator can edit a forum’s title.
Only moderators can can change a forum’s moderationStatus.
See
See Also: ForumData the DTO for returning detailed info on Forums.See
See Also: ForumListData the DTO for returning basic info on Forums. Mostly, ForumListData does not include posts.See
See Also: ForumCreateData the DTO for creating forums.See
See Also: CreateForumSchema the Migration for creating the Forum table in the database.- 
                  
                  DeclarationSwift static let schema: String
- 
                  
                  The forum’s ID. DeclarationSwift @ID var id: UUID?
- 
                  
                  The title of the forum. DeclarationSwift @Field var title: String
- 
                  
                  The creation time of the last post added to this forum. Used to sort forums. Edits to posts don’t count. DeclarationSwift @Field var lastPostTime: Date
- 
                  
                  The ID of the last post added to this forum. Could be empty. DeclarationSwift @Field var lastPostID: Int?
- 
                  
                  Moderators can set several statuses on forums 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 forum pinned within the category. DeclarationSwift @Field var pinned: Bool
- 
                  
                  The ForumReaderspivots contain read counts for each user who has read this forum thread.DeclarationSwift @Siblings var readers: [User]
- 
                  
                  If this forum is for discussing an event on the schedule, this is the event that’s the topic of the forum. DeclarationSwift @OptionalChild var scheduleEvent: Event?
- 
                  
                  DeclarationSwift init()
- 
                  
                  Initializes a new Forum. DeclarationSwift init(title: String, category: Category, creatorID: UUID, isLocked: Bool = false) throwsParameterstitleThe title for the forum. categoryIDThe category to which the forum belongs. creatorIDThe ID of the creator of the forum. isLockedWhether the forum is administratively locked. 
- 
                  
                  The report type for Forumreports.DeclarationSwift var reportType: ReportType { get }
- 
                  
                  DeclarationSwift var authorUUID: UUID { get }
- 
                  
                  DeclarationSwift var autoQuarantineThreshold: Int { get }
 View on GitHub
            View on GitHub
           Forum Class Reference
      Forum Class Reference