arch-atlas

Seller Product Model

products/models/seller_product_model.dart

domain

Overview

SellerProduct is the seller-side card slice: id, title, description, thumbnail, status, variants count, createdAt. Built from the raw /vendor/products map (not the customer Product entity) so seller-only fields (status='proposed') are surfaced.

User Flow

  1. SellerProduct.fromJson takes the raw map returned by getPhysicalProductsRaw.
  2. Consumed by SellerProductsScreen rows.

Cases & Edge Cases

  • Status defaults to 'proposed' on creation — admin moderation flips it to 'published'.
  • thumbnail can be empty — UI shows a placeholder.

Code References

  • lib/src/features/seller/products/models/seller_product_model.dart

API Calls

Empty — fill this in later. Open the manifest and add content here.

Notes

Distinct from the customer Product model (marketplace/models/product.dart) — keep both, they serve different surfaces.