Event
final class Event : Model, Searchable, @unchecked Sendable
extension Event: ContentFilterable
An Event
on the official schedule, imported from sched.com’s .ics
format.
See
See Also: EventData the DTO for returning info on Events.See
See Also: CreateEventSchema the Migration for creating the Event table in the database.See
See Also: EventType-
Declaration
Swift
static let schema: String
-
The event’s ID.
Declaration
Swift
@Event .ID var id: UUID? { get set }
-
The event’s official identifier. (sched.com “UID”)
Declaration
Swift
@Event .Field var uid: String { get set }
-
The start time of the event. (sched.com “DTSTART”)
Declaration
Swift
@Event .Field var startTime: Date { get set }
-
The end time of the event. (sched.com “DTEND”)
Declaration
Swift
@Event .Field var endTime: Date { get set }
-
The title of the event. (sched.com “SUMMARY”)
Declaration
Swift
@Event .Field var title: String { get set }
-
A description of the event. (sched.com “DESCRIPTION”)
Declaration
Swift
@Event .Field var info: String { get set }
-
The location of the event. (sched.com “LOCATION”)
Declaration
Swift
@Event .Field var location: String { get set }
-
The type of event. (sched.com “CATEGORIES”)
Declaration
Swift
@Event .Field var eventType: EventType { get set }
-
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@Event .Timestamp var createdAt: Date? { get set }
-
Timestamp of the model’s last update, set automatically.
Declaration
Swift
@Event .Timestamp var updatedAt: Date? { get set }
-
Timestamp of the model’s soft-deletion, set automatically.
Declaration
Swift
@Event .Timestamp var deletedAt: Date? { get set }
-
The ID of a forum associated with the event. I believe we want the forum to be the parent of the event so the forum can keep existing even if the event is deleted.
Declaration
Swift
@Event .OptionalParent var forum: Forum? { get set }
-
The users that have favorited this event.
Declaration
Swift
@Event .Siblings var favorites: [User] { get set }
-
The organizers or performers for the event
Declaration
Swift
@Event .Siblings var performers: [Performer] { get set }
-
Declaration
Swift
init()
-
Initializes a new Event.
Declaration
Swift
init( startTime: Date, endTime: Date, title: String, description: String, location: String, eventType: EventType, uid: String )
Parameters
startTime
The start time of the event.
endTime
The end time of the event.
title
The title of the event.
description
A description of the event.
location
The location of the event.
eventType
The designated type of event.
uid
The event’s sched.com identifier.
-
Declaration
Swift
func contentTextStrings() -> [String]