Files
ccn/Packages/Persistence/Sources/Public/Models/Series.swift
T

38 lines
1.0 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/// A `Sendable` snapshot of a series in the catalogue: a run of issues, which is what lets a gap in it show.
public struct Series: Sendable, Equatable {
// MARK: Properties
/// The series' URL slug: its name, slugged.
public let slug: String
/// The series' name, e.g. `Nightward`.
public let name: String
/// The publisher's name.
public let publisher: String
/// The years the series ran, e.g. `2019–2021`.
public let years: String
/// The number of issues in the run; zero for a series the catalogue only knows from its listings.
public let issueCount: Int
/// The series in a sentence or two.
public let blurb: String
// MARK: Initializers
public init(
slug: String,
name: String,
publisher: String,
years: String,
issueCount: Int,
blurb: String
) {
self.slug = slug
self.name = name
self.publisher = publisher
self.years = years
self.issueCount = issueCount
self.blurb = blurb
}
}