콘텐츠 추가

This commit is contained in:
Yu Sung
2023-08-13 20:59:49 +09:00
parent a8338e6fea
commit cf0607334a
63 changed files with 3935 additions and 10 deletions

View File

@@ -0,0 +1,29 @@
//
// PlaybackTrackingRepository.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import Foundation
import ObjectBox
final class PlaybackTrackingRepository {
private let objectBoxService = ObjectBoxService()
func savePlaybackTracking(data: PlaybackTracking) -> Id {
return try! objectBoxService.playbackTrackingBox.put(data)
}
func getPlaybackTracking(id: Id) -> PlaybackTracking? {
return try! objectBoxService.playbackTrackingBox.get(id)
}
func getAllPlaybackTracking() -> [PlaybackTracking] {
return try! objectBoxService.playbackTrackingBox.all()
}
func removeAllPlaybackTracking() {
try! objectBoxService.playbackTrackingBox.removeAll()
}
}