Skip to content

Commit

Permalink
apply int64 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lawmicha committed Nov 14, 2023
1 parent 177f476 commit 33ec057
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public struct MutationSync<ModelType: Model>: Decodable {
self.syncMetadata = MutationSyncMetadata(modelId: modelIdentifier,
modelName: resolvedModelName,
deleted: deleted,
lastChangedAt: Int(lastChangedAt),
lastChangedAt: Int64(lastChangedAt),
version: Int(version))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public struct MutationSyncMetadata: Model {

public let id: MutationSyncIdentifier
public var deleted: Bool
public var lastChangedAt: Int
public var lastChangedAt: Int64
public var version: Int

static let deliminator = "|"
Expand All @@ -30,14 +30,14 @@ public struct MutationSyncMetadata: Model {
The format of the `id` has changed to support unique ids across mutiple model types.
Use init(modelId:modelName:deleted:lastChangedAt) to pass in the `modelName`.
""")
public init(id: MutationSyncIdentifier, deleted: Bool, lastChangedAt: Int, version: Int) {
public init(id: MutationSyncIdentifier, deleted: Bool, lastChangedAt: Int64, version: Int) {
self.id = id
self.deleted = deleted
self.lastChangedAt = lastChangedAt
self.version = version
}

public init(modelId: ModelId, modelName: String, deleted: Bool, lastChangedAt: Int, version: Int) {
public init(modelId: ModelId, modelName: String, deleted: Bool, lastChangedAt: Int64, version: Int) {
self.id = Self.identifier(modelName: modelName, modelId: modelId)
self.deleted = deleted
self.lastChangedAt = lastChangedAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public struct OutboxMutationEvent {
public struct OutboxMutationEventElement {
public let model: Model
public var version: Int?
public var lastChangedAt: Int?
public var lastChangedAt: Int64?
public var deleted: Bool?
}
}

0 comments on commit 33ec057

Please sign in to comment.