MKSong

final class MKSong : Model
extension MKSong: Reportable

Properties

  • id

    The song’s ID.

    Declaration

    Swift

    @ID
    var id: Int?
  • The name of the song

    Declaration

    Swift

    @Field
    var songName: String
  • the artist/band that performed the original song

    Declaration

    Swift

    @Field
    var artistName: String
  • The number of snippets required for this song

    Declaration

    Swift

    @Field
    var totalSnippets: Int
  • bpm

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

    Declaration

    Swift

    @Field
    var bpm: Int
  • 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

    @Field
    var isPortrait: Bool
  • 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

    @Field
    var isComplete: Bool
  • 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

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @Timestamp
    var deletedAt: Date?

Relations

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

    Declaration

    Swift

    @Children
    var snippets: [MKSnippet]
  • 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

    @Parent
    var syntheticSongCreator: User

Initialization