metatext-app-ios-iphone-ipad/Model/Poll.swift

22 lines
519 B
Swift
Raw Normal View History

2020-08-18 07:13:37 +02:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
struct Poll: Codable, Hashable {
struct Option: Codable, Hashable {
var title: String
var votesCount: Int
}
let id: String
let expiresAt: Date
let expired: Bool
let multiple: Bool
let votesCount: Int
let votersCount: Int?
2020-08-24 01:39:52 +02:00
@DecodableDefault.False private(set) var voted: Bool
@DecodableDefault.EmptyList private(set) var ownVotes: [Int]
2020-08-18 07:13:37 +02:00
let options: [Option]
let emojis: [Emoji]
}