MKSnippet
final class MKSnippet : Model, @unchecked Sendable
extension MKSnippet: Reportable
-
Declaration
Swift
static let schema: String
-
The snippet’s ID.
Declaration
Swift
@MKSnippet .ID var id: UUID? { get set } -
Each ‘song’ is a sequence of video snippets spliced together. Each snippet offered to a user for recording has a index into hat sequence. Snippet 0 is the first snippet in a song.
Declaration
Swift
@MKSnippet .Field var songSnippetIndex: Int { get set } -
The URL of the snippet media. Nil upon creation. Gets filled in once the user uploads their video clip for this snippet offer. Its host is the one the server had when the clip was saved; use
canonicalMediaURLfor the externally-visible URL.Declaration
Swift
@MKSnippet .Field var mediaURL: String? { get set } -
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@MKSnippet .Timestamp var createdAt: Date? { get set } -
Timestamp of the model’s last update, set automatically.
Declaration
Swift
@MKSnippet .Timestamp var updatedAt: Date? { get set } -
Timestamp of the model’s soft-deletion, set automatically.
Declaration
Swift
@MKSnippet .Timestamp var deletedAt: Date? { get set }
-
The song that this snippet will be/is a part of.
Declaration
Swift
@MKSnippet .Parent var song: MKSong { get set }
-
Used by Fluent
Declaration
Swift
init() -
Initializes a new MKSnippet object.
Declaration
Swift
init(song: MKSong, songSnippetIndex: Int, author: UserCacheData) throwsParameters
songsnippetNumber -
The externally-visible URL of the snippet media, on the server’s current canonical scheme, host and port.
mediaURLkeeps the host the server had when the clip was saved. This keeps its percent-encoded path, query and fragment and replaces the rest, so clips follow the server when its URL changes or its database is restored elsewhere. A path from the server root works too. Nil if there’s no media yet, or if the stored value has no path from the server root.Declaration
Swift
var canonicalMediaURL: URL? { get } -
The type for
MKSongreports.Declaration
Swift
var reportType: ReportType { get } -
Declaration
Swift
var authorUUID: UUID { get } -
Declaration
Swift
var autoQuarantineThreshold: Int { get } -
Declaration
Swift
var moderationStatus: ContentModerationStatus { get set }
View on GitHub