Added the catalogue models and seed to support phase 5 of the POC prototype in the Persistence package.
This commit is contained in:
1 parent
9403931109
commit
89a7a7b8e5
19 files changed
+990
-15
No files matched your search
@@ -0,0 +1,57 @@
|
||||
/// What an account fills in to open a shop.
|
||||
public struct ShopDraft: Sendable, Equatable {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// The shop's name.
|
||||
public var name: String
|
||||
/// The shop's handle: its URL slug.
|
||||
public var handle: String
|
||||
/// The city the shop ships from.
|
||||
public var city: String
|
||||
/// The ISO 3166-1 alpha-2 code of the country the shop ships from.
|
||||
public var country: String
|
||||
/// The shop's description of itself.
|
||||
public var about: String
|
||||
/// Whether the seller sells as a private collector or as a business.
|
||||
public var kind: Shop.Kind
|
||||
/// The business's KvK number.
|
||||
public var kvkNumber: String?
|
||||
/// The business's VAT identifier.
|
||||
public var vatID: String?
|
||||
/// The business's registered name.
|
||||
public var legalName: String?
|
||||
/// The shop's returns policy, in a few words.
|
||||
public var returnsNote: String
|
||||
/// The shop's handling time, in business days.
|
||||
public var handlingDays: Int
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
public init(
|
||||
name: String,
|
||||
handle: String,
|
||||
city: String,
|
||||
country: String,
|
||||
about: String,
|
||||
kind: Shop.Kind,
|
||||
kvkNumber: String?,
|
||||
vatID: String?,
|
||||
legalName: String?,
|
||||
returnsNote: String,
|
||||
handlingDays: Int
|
||||
) {
|
||||
self.name = name
|
||||
self.handle = handle
|
||||
self.city = city
|
||||
self.country = country
|
||||
self.about = about
|
||||
self.kind = kind
|
||||
self.kvkNumber = kvkNumber
|
||||
self.vatID = vatID
|
||||
self.legalName = legalName
|
||||
self.returnsNote = returnsNote
|
||||
self.handlingDays = handlingDays
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user