Data model
The concepts a theme binds to. You never query these directly — you read view-models derived from them — but the relationships explain why the loaders are shaped the way they are.
Store
One merchant, one store. The store carries branding, business configuration, tax identity, business hours and the chosen theme. Everything else hangs off it, and every read is scoped to it.
Listing
What a customer buys. A listing may be one-time or subscription, and may be bookable — in which case it carries availability derived from business hours, blocked times and existing bookings. Listings belong to categories.
Order
A completed purchase. Orders reference a listing snapshot taken at checkout rather than the live listing, so a later price edit never rewrites history. Bookable orders carry a scheduled time and can be rescheduled or cancelled within the merchant’s cutoff rules.
Customer
Scoped to a store — the same person buying from two Mecsto merchants is two customer records, deliberately. Carries loyalty balance and addresses.
Snapshots over references. Orders, subscriptions and invoices all snapshot what was agreed at the time. It is why a merchant can edit a listing freely without corrupting past sales — and why the shapes you read on an order are not the same as the shapes you read on a listing.