IceCubesApp/Packages/Models/Sources/Models/MediaAttachement.swift
Romain Vincens bb72327f52
Fixed typos & misspells (#88)
* Fixed typos and misspells

* Other typos
2023-01-17 15:14:50 +01:00

32 lines
694 B
Swift

import Foundation
public struct MediaAttachment: Codable, Identifiable, Hashable {
public struct MetaContainer: Codable, Equatable {
public struct Meta: Codable, Equatable {
public let width: Int?
public let height: Int?
}
public let original: Meta?
}
public enum SupportedType: String {
case image, gifv, video, audio
}
public func hash(into hasher: inout Hasher) {
hasher.combine(id)
}
public let id: String
public let type: String
public var supportedType: SupportedType? {
SupportedType(rawValue: type)
}
public let url: URL?
public let previewUrl: URL?
public let description: String?
public let meta: MetaContainer?
}