IceCubesApp/Packages/Models/Sources/Models/List.swift

26 lines
628 B
Swift
Raw Normal View History

import Foundation
public struct List: Codable, Identifiable, Equatable, Hashable {
public let id: String
public let title: String
2023-12-01 07:14:57 +00:00
public let repliesPolicy: RepliesPolicy?
public let exclusive: Bool?
2023-12-18 07:22:59 +00:00
2023-11-28 08:18:52 +00:00
public enum RepliesPolicy: String, Sendable, Codable, CaseIterable, Identifiable {
public var id: String {
rawValue
}
2023-12-18 07:22:59 +00:00
case followed, list, none
2023-11-28 08:18:52 +00:00
}
2024-02-14 11:48:14 +00:00
2023-12-30 14:40:04 +00:00
public init(id: String, title: String, repliesPolicy: RepliesPolicy? = nil, exclusive: Bool? = nil) {
self.id = id
self.title = title
self.repliesPolicy = repliesPolicy
self.exclusive = exclusive
}
}
extension List: Sendable {}