Prompt file imported from teejaymt/OpticalBus (
.github/prompts/module-01.prompt.md). Copyright stays with the author.
Prompt 1.1 — Implement full Prisma schema Prompt: Generate backend/prisma/schema.prisma for SQL Server implementing:
Locations: City, Warehouse, Factory, Branch, Store, CityWarehouseMap, LabCalendar Parties: Customer (type + VAT rules), Vendor, Payer, Plan Catalog: Product, ProductBarcode, SerialUnit, InventoryBatch Inventory: InventoryLedger (append-only), GRN, Transfer, StockCount Sales: Quote, Reservation, Order, Prescription Lab: LabJob, LabStep, Consumption, Wastage, DispatchNote, BranchReceive Finance: Invoice, CreditNote, Payment ZATCA: ZatcaDocument (Phase 1+2) Notifications: NotificationTemplate, NotificationLog Migration: ImportJob, ExternalIdMap Audit: AuditLog Include indexes and enums; ensure Factory is integrated:
StoreType includes Factory Store has optional factoryId (required when store_type=Factory by app validation) Create migrations and a seed script with minimal reference data. Definition of Done:
prisma validate passes prisma migrate dev creates tables prisma studio shows tables seed runs idempotently