Files
iOS/Sources/Shared/API/Models/Scene.swift
Zac West 640cca884b Add SwiftFormat to project (#1463)
Adds new fastlane lanes:
- `fastlane lint` which checks the linters
- `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat)

Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run.

Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
2021-02-05 22:06:25 -08:00

22 lines
732 B
Swift

import Foundation
import ObjectMapper
public class Scene: Entity {
@objc dynamic var entityIDs = [String]()
@objc dynamic var backgroundColor: String?
@objc dynamic var textColor: String?
@objc dynamic var iconColor: String?
public static let backgroundColorKey = "background_color"
public static let textColorKey = "text_color"
public static let iconColorKey = "icon_color"
override public func mapping(map: Map) {
super.mapping(map: map)
entityIDs <- map["attributes.entity_id"]
backgroundColor <- map["attributes." + Self.backgroundColorKey]
textColor <- map["attributes." + Self.textColorKey]
iconColor <- map["attributes." + Self.iconColorKey]
}
}