Adds support for syncing Cheats
This commit is contained in:
parent
fb9272cd6c
commit
5b64ca7c7b
@ -4,7 +4,7 @@
|
|||||||
<attribute name="code" attributeType="String" syncable="YES"/>
|
<attribute name="code" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="creationDate" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="creationDate" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="identifier" attributeType="String" syncable="YES"/>
|
<attribute name="identifier" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="isEnabled" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="isEnabled" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="modifiedDate" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="modifiedDate" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
|
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="type" attributeType="Transformable" syncable="YES">
|
<attribute name="type" attributeType="Transformable" syncable="YES">
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import DeltaCore
|
import DeltaCore
|
||||||
|
import Harmony
|
||||||
|
|
||||||
@objc(Cheat)
|
@objc(Cheat)
|
||||||
public class Cheat: _Cheat, CheatProtocol
|
public class Cheat: _Cheat, CheatProtocol
|
||||||
@ -29,3 +30,18 @@ public class Cheat: _Cheat, CheatProtocol
|
|||||||
self.primitiveModifiedDate = date
|
self.primitiveModifiedDate = date
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Cheat: Syncable
|
||||||
|
{
|
||||||
|
public static var syncablePrimaryKey: AnyKeyPath {
|
||||||
|
return \Cheat.identifier
|
||||||
|
}
|
||||||
|
|
||||||
|
public var syncableKeys: Set<AnyKeyPath> {
|
||||||
|
return [\Cheat.code, \Cheat.creationDate, \Cheat.modifiedDate, \Cheat.name, \Cheat.type]
|
||||||
|
}
|
||||||
|
|
||||||
|
public var syncableRelationships: Set<AnyKeyPath> {
|
||||||
|
return [\Cheat.game as AnyKeyPath]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user