Files
ddys-client/DDYSClient/Models/ContentItem.swift
2026-02-26 22:15:35 +08:00

23 lines
590 B
Swift

import Foundation
struct ContentItem: Identifiable, Hashable, Codable {
let id: String // slug ID
let title: String
let year: Int
let category: ContentCategory
let rating: Double?
let posterURL: URL?
let badges: [String] // ///
let onlineCount: Int
let netdiskCount: Int
let detailURL: String // /movie/slug
static func == (lhs: ContentItem, rhs: ContentItem) -> Bool {
lhs.id == rhs.id
}
func hash(into hasher: inout Hasher) {
hasher.combine(id)
}
}