40 lines
932 B
Swift
40 lines
932 B
Swift
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
|
|
}
|
|
|
|
}
|