37 lines
1.0 KiB
Swift
37 lines
1.0 KiB
Swift
/// 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
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|