ModeratorAction
final class ModeratorAction : Model
Each time a moderator performs a moderation action–editing, locking, or deleting a post, forum, or fez, changing a user’s access level, issuing a temp quarantine, or other moderation-only activities, we log the action by creating one of these records in the database..
The data collected may only be viewed by moderators. The intent is to make it easier for mods to coordinate.
See
See Also: ModeratorActionLogData the DTO for returning data about moderator actions.See
See Also: CreateModeratorActionSchema the Migration for creating the ModeratorAction table in the database.-
Declaration
Swift
static let schema: String
-
The edit’s ID.
Declaration
Swift
@ID var id: UUID?
-
The action taken.
Declaration
Swift
@Field var actionType: ModeratorActionType
-
The type of content that got changed..
Declaration
Swift
@Field var contentType: ReportType
-
The ID of the content that was affected, converted into a string. The actuial @id could be an Int or a UUID, depending on the value of
contentType
.Declaration
Swift
@Field var contentID: String
-
If the mod is in the process of handling reports when taking this action, this gets set to the reports’ actionGroup, making it easier to correllate user reports amd mod actions.
Declaration
Swift
@OptionalField var actionGroup: UUID?
-
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@Timestamp var createdAt: Date?
-
Declaration
Swift
init()
-
Initializes a new ModeratorAction.
Declaration
Swift
init<T>(content: T, action: ModeratorActionType, moderator: User) throws where T : Reportable
Parameters
post
The Twarrt that will be edited.