Match the server's rename: CollaborationSession uses labID, createLab / joinLab, ProjectCollaborationState's roomID field + its DB column become labID / lab_id, and UI strings / deep- link query param all track "lab". Since the app hasn't launched, the DB column rename is landed directly in the v1 migration rather than via a new migration — dev databases need to be wiped.
20 lines
479 B
Swift
20 lines
479 B
Swift
import Foundation
|
|
import GRDB
|
|
|
|
public struct ProjectCollaborationState: Codable, Identifiable, Sendable, FetchableRecord, PersistableRecord {
|
|
public static let databaseTableName = "project_collaboration_state"
|
|
|
|
public var id: UUID
|
|
public var labID: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case labID = "lab_id"
|
|
}
|
|
|
|
public init(id: UUID = UUID(), labID: String? = nil) {
|
|
self.id = id
|
|
self.labID = labID
|
|
}
|
|
}
|