Added the catalogue models and seed to support phase 5 of the POC prototype in the Persistence package.

This commit is contained in:
javier committed 2026-09-21 13:31:44 +02:00
1 parent 9403931109
commit 89a7a7b8e5
19 files changed
+990 -15

No files matched your search

@@ -0,0 +1,37 @@
/// 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
}
}