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

This commit is contained in:
javier committed 2026-09-21 12:11:01 +02:00
1 parent 43dcc03da6
commit b1ceed7790
20 files changed
+2035 -8

No files matched your search

@@ -0,0 +1,19 @@
/// Why a step towards a sale was turned down.
public enum TradeError: Error, Equatable, Sendable {
/// The amount is not a positive number of cents at or under the asking price.
case invalidAmount
/// The listing does not exist, or is sold.
case listingUnavailable
/// The account is not a party to the conversation, offer, or sale — or the step is not theirs to take now.
case notAllowed
/// The buyer already has an open offer on the listing.
case offerAlreadyOpen
/// The offer is under the floor the seller hears offers from, in euro cents.
case offerTooLow(floorCents: Int)
/// The listing's seller takes no offers.
case offersNotAccepted
/// The listing, shop, conversation, or sale belongs to the account itself.
case ownListing
/// The shop has no owner to sell on its behalf.
case shopUnattended
}