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

This commit is contained in:
javier committed 2026-09-21 13:52:52 +02:00
1 parent 31d2d98d49
commit 256d22df40
10 files changed
+473 -4

No files matched your search

@@ -0,0 +1,39 @@
import Foundation
/// A `Sendable` snapshot of a con where shops trade in person, so a sale agreed on the site can be collected there.
public struct Event: Sendable, Equatable {
// MARK: Properties
/// The event's URL slug.
public let slug: String
/// The event's name.
public let name: String
/// Where it is held, e.g. `Jaarbeurs, Utrecht`.
public let venue: String
/// The first day.
public let startsOn: Date
/// The last day.
public let endsOn: Date
/// The shops trading there.
public let shops: [Shop]
// MARK: Initializers
public init(
slug: String,
name: String,
venue: String,
startsOn: Date,
endsOn: Date,
shops: [Shop] = []
) {
self.slug = slug
self.name = name
self.venue = venue
self.startsOn = startsOn
self.endsOn = endsOn
self.shops = shops
}
}