77 lines
2.1 KiB
Swift
77 lines
2.1 KiB
Swift
|
|
import Foundation
|
||
|
|
|
||
|
|
public struct Project: Identifiable, Sendable, Equatable {
|
||
|
|
public let id: UUID
|
||
|
|
public var name: String
|
||
|
|
public var createdAt: Date
|
||
|
|
|
||
|
|
public init(id: UUID = UUID(), name: String, createdAt: Date = Date()) {
|
||
|
|
self.id = id
|
||
|
|
self.name = name
|
||
|
|
self.createdAt = createdAt
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public struct Day: Identifiable, Sendable, Equatable {
|
||
|
|
public let id: UUID
|
||
|
|
public var projectID: UUID
|
||
|
|
public var label: String
|
||
|
|
/// Shooting date, ISO yyyy-MM-dd.
|
||
|
|
public var date: String
|
||
|
|
|
||
|
|
public init(id: UUID = UUID(), projectID: UUID, label: String, date: String) {
|
||
|
|
self.id = id
|
||
|
|
self.projectID = projectID
|
||
|
|
self.label = label
|
||
|
|
self.date = date
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public struct Shot: Identifiable, Sendable, Equatable {
|
||
|
|
public let id: UUID
|
||
|
|
public var dayID: UUID
|
||
|
|
public var clipName: String
|
||
|
|
public var cameraSlot: String
|
||
|
|
public var timecodeIn: String?
|
||
|
|
public var timecodeOut: String?
|
||
|
|
public var exposureIndex: Int?
|
||
|
|
public var whiteBalance: Int?
|
||
|
|
public var tint: Int?
|
||
|
|
public var fps: Double?
|
||
|
|
/// Serialized GradeSnapshot JSON at rec start.
|
||
|
|
public var gradeSnapshot: Data?
|
||
|
|
/// Path to still grab, if any.
|
||
|
|
public var stillPath: String?
|
||
|
|
public var createdAt: Date
|
||
|
|
|
||
|
|
public init(
|
||
|
|
id: UUID = UUID(),
|
||
|
|
dayID: UUID,
|
||
|
|
clipName: String,
|
||
|
|
cameraSlot: String,
|
||
|
|
timecodeIn: String? = nil,
|
||
|
|
timecodeOut: String? = nil,
|
||
|
|
exposureIndex: Int? = nil,
|
||
|
|
whiteBalance: Int? = nil,
|
||
|
|
tint: Int? = nil,
|
||
|
|
fps: Double? = nil,
|
||
|
|
gradeSnapshot: Data? = nil,
|
||
|
|
stillPath: String? = nil,
|
||
|
|
createdAt: Date = Date()
|
||
|
|
) {
|
||
|
|
self.id = id
|
||
|
|
self.dayID = dayID
|
||
|
|
self.clipName = clipName
|
||
|
|
self.cameraSlot = cameraSlot
|
||
|
|
self.timecodeIn = timecodeIn
|
||
|
|
self.timecodeOut = timecodeOut
|
||
|
|
self.exposureIndex = exposureIndex
|
||
|
|
self.whiteBalance = whiteBalance
|
||
|
|
self.tint = tint
|
||
|
|
self.fps = fps
|
||
|
|
self.gradeSnapshot = gradeSnapshot
|
||
|
|
self.stillPath = stillPath
|
||
|
|
self.createdAt = createdAt
|
||
|
|
}
|
||
|
|
}
|