mirror of
https://github.com/tappollo/WWDC.git
synced 2026-04-29 04:15:12 +08:00
42 lines
1000 B
Swift
42 lines
1000 B
Swift
//
|
|
// Room.swift
|
|
// WWDC
|
|
//
|
|
// Created by Guilherme Rambo on 06/02/17.
|
|
// Copyright © 2017 Guilherme Rambo. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
import RealmSwift
|
|
|
|
/// Represents a room or venue where sessions are held
|
|
public class Room: Object {
|
|
|
|
/// Name of the map file (maps are not present in the macOS app because they are embedded in the iOS app's binary, not given by the API)
|
|
public dynamic var mapName = ""
|
|
|
|
/// Name of the room
|
|
public dynamic var name = ""
|
|
|
|
/// Room floor name
|
|
public dynamic var floor = ""
|
|
|
|
/// Session instances held at this room
|
|
public let instances = List<SessionInstance>()
|
|
|
|
public override class func primaryKey() -> String? {
|
|
return "name"
|
|
}
|
|
|
|
public static func make(name: String, mapName: String, floor: String) -> Room {
|
|
let room = Room()
|
|
|
|
room.name = name
|
|
room.mapName = mapName
|
|
room.floor = floor
|
|
|
|
return room
|
|
}
|
|
|
|
}
|