Report
final class Report : ModelTwit-arr moderation relies in part on user-submitted reports of content and/or behavior
which does not conform to community standards. A Report can be submitted for Moderator
review on any of: an individual Twarrt or ForumPost, an entire Forum, a FezPost,
or a User (such as for general behavioral pattern, or their profile contents).
The .submitterID is always the user’s primary user ID. An individual post can only be
reported once per primary user. There is no per user restriction on the number of reports
of a particular Forum or User.
The .reportedID field is a string value, because the entity being reported may have
either a UUID or an integer based ID, which is determined via the .reportType.
The lifecycle flow of Reports is:
- Created by submitter
- Viewed by a moderator in a list of open reports
- Moderator takes the report (handledBy is set to the moderator’s UUID). Other mods should be able to see the report is being handled.
- Moderator modifies content, quarantines content, warns user, bans user, or takes some other action.
- Moderator fills in actionTaken field and closes the report.
- 
                  
                  DeclarationSwift static let schema: String
- 
                  
                  The report’s ID. DeclarationSwift @ID var id: UUID?
- 
                  
                  The type of entity reported. DeclarationSwift @Field var reportType: ReportType
- 
                  
                  The ID of the entity reported. Could resolve to an Int or a UUID, depending on the value of reportType.DeclarationSwift @Field var reportedID: String
- 
                  
                  An optional message from the submitter. DeclarationSwift @Field var submitterMessage: String
- 
                  
                  Set to a new UUID() when a Moderator starts handling one or more reports. Any mod actions the mod takes until these reports are closed get tagged with this UUID. Reports may be closed without ever setting an action group. DeclarationSwift @OptionalField var actionGroup: UUID?
- 
                  
                  The status of the report. DeclarationSwift @Field var isClosed: Bool
- 
                  
                  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?
- 
                  
                  DeclarationSwift init()
- 
                  
                  Initializes a new Report. DeclarationSwift init<T>(reportedContent: T, submitter: User, submitterMessage: String = "") throws where T : ReportableParametersreportTypeThe type of entity reported. reportedIDThe ID of the entity reported. submitterThe user submitting the report. submitterMessageAn optional message from the submitter. 
 View on GitHub
            View on GitHub
           Report Class Reference
      Report Class Reference