mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-15 02:46:16 +01:00
32 lines
758 B
Swift
32 lines
758 B
Swift
//
|
|
// SyncStatus.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Maurice Parker on 5/14/19.
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Articles
|
|
import RSDatabase
|
|
|
|
public struct SyncStatus: Hashable, Equatable {
|
|
|
|
public let articleID: String
|
|
public let key: ArticleStatus.Key
|
|
public let flag: Bool
|
|
public let selected: Bool
|
|
|
|
public init(articleID: String, key: ArticleStatus.Key, flag: Bool, selected: Bool = false) {
|
|
self.articleID = articleID
|
|
self.key = key
|
|
self.flag = flag
|
|
self.selected = selected
|
|
}
|
|
|
|
public func databaseDictionary() -> DatabaseDictionary {
|
|
return [DatabaseKey.articleID: articleID, DatabaseKey.key: key.rawValue, DatabaseKey.flag: flag, DatabaseKey.selected: selected]
|
|
}
|
|
|
|
}
|