FriendlyFezEdit
final class FriendlyFezEdit : Model
When the TEXT FIELDS of a FriendlyFez
are edited, a FriendlyFezEdit
is created to save the previous values of its text fields.
Edits that only modify other fields of a fez–start/end time, type of fez, min/max number of participants–do not cause a FriendlyFezEdit to be created.
This is done for accountability purposes and the data collected is intended to be viewable only by moderators.
See
See Also: FezModerationData the DTO for returning data moderators need to moderate fezzes. Specifically, the sub-struct FezEditLogData delivers values from theFriendlyFezEdit
.
See
See Also: CreateFriendlyFezEditSchema the Migration for creating the FriendlyFezEdit table in the database.-
Declaration
Swift
static let schema: String
-
The edit’s ID.
Declaration
Swift
@ID var id: UUID?
-
The previous title of the fez.
Declaration
Swift
@Field var title: String
-
The previous info string for the fez.
Declaration
Swift
@Field var info: String
-
The previous location string for the fez.
Declaration
Swift
@Field var location: String
-
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@Timestamp var createdAt: Date?
-
The parent
FriendlyFez
that was edited..Declaration
Swift
@Parent var fez: FriendlyFez
-
Declaration
Swift
init()
-
Initializes a new FriendlyFezEdit with the current title of a
FriendlyFez
. Call on the post BEFORE editing it to save previous contents.Declaration
Swift
init(fez: FriendlyFez, editorID: UUID) throws
Parameters
forum
The Forum that will be edited.
editor
The User making the change.