38 lines
939 B
Swift
38 lines
939 B
Swift
//
|
|
// AudioRecordDto.swift
|
|
// AutoCatCore
|
|
//
|
|
// Created by Selim Mustafaev on 12.06.2024.
|
|
// Copyright © 2024 Selim Mustafaev. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct AudioRecordDto: Decodable {
|
|
|
|
public var path: String = ""
|
|
public var number: String?
|
|
public var rawText: String = ""
|
|
public var addedDate: TimeInterval = 0
|
|
public var duration: TimeInterval = 0
|
|
public var event: VehicleEventDto?
|
|
|
|
public init(path: String, number: String?, raw: String, duration: TimeInterval, event: VehicleEventDto?) {
|
|
self.path = path
|
|
self.number = number
|
|
self.duration = duration
|
|
self.rawText = raw
|
|
self.event = event
|
|
self.addedDate = Date().timeIntervalSince1970
|
|
}
|
|
|
|
public func getAddedDate() -> TimeInterval {
|
|
addedDate
|
|
}
|
|
}
|
|
|
|
extension AudioRecordDto: Identifiable {
|
|
|
|
public var id: TimeInterval { addedDate }
|
|
}
|