MercurModules.SELLER) owns the store, its business details, and its team. Every model also has the standard created_at, updated_at, and deleted_at columns, which the tables below leave out.
Seller
The store account and its public profile. Tableseller, id prefix sel.
Unique indexes on
name, handle, email, and external_id apply only to rows that aren’t deleted. An extra index on (status, closed_from, closed_to) serves the Store API visibility filter.
Relations:
professional_details: has oneProfessionalDetails, deleted with the selleraddress: has oneSellerAddress, deleted with the sellerpayment_details: has onePaymentDetails, deleted with the sellermembers: many-to-many withMemberthroughSellerMember, detached when the seller is deletedmember_invites: has manyMemberInvite, deleted with the seller
SellerStatus
The enum in@mercurjs/types that types Seller.status.
ProfessionalDetails
A store’s registered business identity. Tableprofessional_details, id prefix selprodet.
SellerAddress
A store’s postal address. Tableseller_address, id prefix seladdr.
PaymentDetails
A store’s bank account details. Tablepayment_details, id prefix selpaydet.
Member
A person who can work for one or more stores. Tablemember, id prefix mem.
Relations:
sellers, many-to-many with Seller through SellerMember.
SellerMember
One member’s membership in one store. Tableseller_member, id prefix selmem, unique on (seller_id, member_id).
SellerRole
The enum in@mercurjs/types whose values go in role_id.
MemberInvite
A pending invitation to join a store. Tablemember_invite, id prefix meminv.
A unique index on
(email, seller_id) covers invites that aren’t accepted or deleted, so a store has one open invite per email.
OrderGroup
The Seller module also holds theOrderGroup model, which groups the per-store orders split from one cart. See the order group data models for its fields.