MKSong

final class MKSong : Model, @unchecked Sendable
extension MKSong: Reportable

Properties

  • id

    The song’s ID.

    Declaration

    Swift

    @MKSong
    .ID var id: Int? { get set }
  • The name of the song

    Declaration

    Swift

    @MKSong
    .Field var songName: String { get set }
  • the artist/band that performed the original song

    Declaration

    Swift

    @MKSong
    .Field var artistName: String { get set }
  • The number of snippets required for this song

    Declaration

    Swift

    @MKSong
    .Field var totalSnippets: Int { get set }
  • bpm

    The beats per minute of the song; used to set the rate of the countdown timer that appears before recording.

    Declaration

    Swift

    @MKSong
    .Field var bpm: Int { get set }
  • TRUE if this song is being made in portrait mode, else landscape. Clients that upload video clips must ensure the correct orientation, as all clips in the same song need the same orientation.

    Declaration

    Swift

    @MKSong
    .Field var isPortrait: Bool { get set }
  • TRUE if this song video hass a video clip for each part of the song. This value could go back to FALSE for a song if a clip is deleted after completion.

    Declaration

    Swift

    @MKSong
    .Field var isComplete: Bool { get set }
  • TRUE if a mod has approved ths video. Once approved the video can be returned by methods that get the list of viewable videos.

    Declaration

    Swift

    @MKSong
    .Field var modApproved: Bool { get set }
  • Timestamp of the model’s creation, set automatically.

    Declaration

    Swift

    @MKSong
    .Timestamp var createdAt: Date? { get set }
  • Timestamp of the model’s last update, set automatically.

    Declaration

    Swift

    @MKSong
    .Timestamp var updatedAt: Date? { get set }
  • Timestamp of the model’s soft-deletion, set automatically.

    Declaration

    Swift

    @MKSong
    .Timestamp var deletedAt: Date? { get set }

Relations

  • The video clips that make up the song’s video presentation

    Declaration

    Swift

    @MKSong
    .Children var snippets: [MKSnippet] { get set }
  • In order for content to be reported on by users, there needs to be an author responsible for the content. For songs, however, users will report on the song as a whole, not individual video clips submitted by users. So, Micro Karaoke songs are always ‘authored’ by the ‘MicroKaraoke’ user and users will report against that user.

    Declaration

    Swift

    @MKSong
    .Parent var syntheticSongCreator: User { get set }

Initialization