콘텐츠 추가
This commit is contained in:
44
SodaLive/Sources/Content/PlaybackTracking.swift
Normal file
44
SodaLive/Sources/Content/PlaybackTracking.swift
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// PlaybackTracking.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/08/11.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import ObjectBox
|
||||
|
||||
class PlaybackTracking: Entity {
|
||||
var id: Id = 0
|
||||
var audioContentId: Int
|
||||
var totalDuration: Int
|
||||
var startPosition: Int
|
||||
var isFree: Bool
|
||||
var isPreview: Bool
|
||||
var endPosition: Int? = nil
|
||||
var playDateTime: String = Date().convertDateFormat(dateFormat: "yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
required init() {
|
||||
audioContentId = 0
|
||||
totalDuration = 0
|
||||
startPosition = 0
|
||||
isFree = true
|
||||
isPreview = true
|
||||
endPosition = nil
|
||||
}
|
||||
|
||||
convenience init(
|
||||
audioContentId: Int,
|
||||
totalDuration: Int,
|
||||
startPosition: Int,
|
||||
isFree: Bool,
|
||||
isPreview: Bool
|
||||
) {
|
||||
self.init()
|
||||
self.audioContentId = audioContentId
|
||||
self.totalDuration = totalDuration
|
||||
self.startPosition = startPosition
|
||||
self.isFree = isFree
|
||||
self.isPreview = isPreview
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user