Tusker/Packages/Pachyderm/Sources/Pachyderm/Model/StatusEdit.swift

39 lines
908 B
Swift

//
// StatusEdit.swift
// Pachyderm
//
// Created by Shadowfacts on 5/11/23.
//
import Foundation
public struct StatusEdit: Decodable, Sendable {
public let content: String
public let spoilerText: String
public let sensitive: Bool
public let createdAt: Date
public let account: Account
public let poll: Poll?
public let attachments: [Attachment]
public let emojis: [Emoji]
enum CodingKeys: String, CodingKey {
case content
case spoilerText = "spoiler_text"
case sensitive
case createdAt = "created_at"
case account = "account"
case poll
case attachments = "media_attachments"
case emojis
}
public struct Poll: Decodable, Sendable {
public let options: [Option]
public struct Option: Decodable, Sendable {
public let title: String
}
}
}