CommunitySupportReport
final class CommunitySupportReport : Model, @unchecked Sendable
A report written up by a Community Support team member about something an attendee told them.
Deliberately not Reportable or ContentFilterable: these records aren’t public user content, must never enter the moderator
report queue, and need no image uploads, alertword scanning, or mention processing. They’re readable only by Community Support
role holders and TwitarrTeam and above.
See
See Also:CommunitySupportAction, the append-only log of what the team did with each report.
-
Declaration
Swift
static let schema: String
-
Declaration
Swift
@CommunitySupportReport .ID var id: UUID? { get set } -
The name of the team member filing the report, as they want it to appear.
Declaration
Swift
@CommunitySupportReport .Field var memberName: String { get set } -
Name of the person who experienced or witnessed the thing being reported. Optional.
Declaration
Swift
@CommunitySupportReport .Field var reporterName: String { get set } -
Free-text handle for the reporter, for when they’re not picked from the user list.
Declaration
Swift
@CommunitySupportReport .Field var reporterHandleText: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var reporterCabin: String { get set } -
Free-text name of the person the report is about.
Declaration
Swift
@CommunitySupportReport .Field var subjectName: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var reporterExperienced: Bool { get set } -
Declaration
Swift
@CommunitySupportReport .Field var reporterWitnessed: Bool { get set } -
Whether the reporter wants follow-up. Stored as a string; see
CommunitySupportReportIntent.Declaration
Swift
@CommunitySupportReport .Field var intent: CommunitySupportReportIntent { get set } -
May JoCo Cruise contact the reporter about this?
Declaration
Swift
@CommunitySupportReport .Field var mayContact: Bool { get set } -
Free text rather than a
Date: people recounting an incident rarely have an exact timestamp. SeeEventFeedback.attendancefor the same reasoning.Declaration
Swift
@CommunitySupportReport .Field var experienceTime: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var experienceLocation: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var experienceDescription: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var preferredOutcome: String { get set } -
Declaration
Swift
@CommunitySupportReport .Field var livedExperiences: String { get set } -
See
CommunitySupportReportStatus. Stored as a string.Declaration
Swift
@CommunitySupportReport .Field var status: CommunitySupportReportStatus { get set } -
Declaration
Swift
@CommunitySupportReport .Timestamp var createdAt: Date? { get set } -
Declaration
Swift
@CommunitySupportReport .Timestamp var updatedAt: Date? { get set }
-
The team member who filed the report.
Declaration
Swift
@CommunitySupportReport .Parent var author: User { get set } -
The reporter, if they have an account and the team member picked it. Set to nil if that account is deleted.
Declaration
Swift
@CommunitySupportReport .OptionalParent var reporter: User? { get set } -
The person the report is about, if picked from the user list.
Declaration
Swift
@CommunitySupportReport .OptionalParent var subject: User? { get set } -
The discussion thread in the private Community Support forum, if someone has started one. If the thread is deleted this goes back to nil and a new one can be started. Follows the precedent of
Event.forum.Declaration
Swift
@CommunitySupportReport .OptionalParent var forum: Forum? { get set } -
The log entries about this report.
Declaration
Swift
@CommunitySupportReport .Children var actions: [CommunitySupportAction] { get set }
-
Declaration
Swift
init() -
Creates a report from a submitted form. A report whose intent is “information only” starts out as
.infoOnly; anything else starts.new.Declaration
Swift
init(author: UUID, data: CommunitySupportReportCreateData) -
The longest post text the forum accepts is 2048 characters (see
PostContentData.validations()). Stay comfortably under it.Declaration
Swift
static let discussionPostCharacterLimit: Int -
A descriptive title for the report: “Name - Location - When”, where the name is that of the person the report is about. That’s the typed subject name, falling back to the linked account’s username, then to “Unspecified” when neither was given.
Declaration
Swift
func displayTitle(subjectUsername: String? = nil) -> StringParameters
subjectUsernameThe username of the linked subject account, if there is one. The model only has its ID, so the caller looks it up.
-
The title for the discussion thread started from this report: its
displayTitle, cut to the 100 character forum title limit.Declaration
Swift
func discussionTitle(subjectUsername: String? = nil) -> String -
The address of this report’s page on the site, as a full URL on the server’s canonical address.
Declaration
Swift
var reportURL: String { get } -
The text of the first post of the discussion thread: a full copy of the report, ending with a link back to it.
Forum posts are limited in length and a report may not fit. When it doesn’t, the free-text fields are cut down together (the longest are trimmed first) so that no field is dropped entirely, and a note points to the full report. The report table stays the record of truth.
Declaration
Swift
func discussionPostText() -> String
View on GitHub