# Schema Reference — Trades

Vertical schema for `businessType: "trades"` — home services, construction, and tradespeople (plumber, electrician, builder, decorator).

This reference extends the base schema. All base node types (Person, Organization, Order, Event, Invoice, Service, etc.) remain valid. Load `schema-base.md` first.

When loading this reference, confirm: "Using schema-base + schema-trades".

---

## Additional Node Types

| Entity | Neo4j Label | Schema.org Type | Required Properties |
|--------|-------------|-----------------|---------------------|
| Quote | `Quote` | `schema:Order` + `cdm:Opportunity` | `accountId`, `quoteNumber`, `customer` (id), `lineItems`, `validUntil`, `totalPrice` |
| SiteVisit | `SiteVisit` | `schema:Event` (subtype) | `accountId`, `address` (id), `engineer` (id), `startDate`, `purpose` |
| Inspection | `Inspection` | `cdm:Case` (subtype) | `accountId`, `address` (id), `findings`, `recommendations`, `photos` |
| Certification | `Certification` | `schema:DigitalDocument` | `accountId`, `type` (gas safe, NICEIC, etc.), `issuedDate`, `expiryDate` |
| Material | `Material` | `schema:Product` | `accountId`, `name`, `sku`, `unitCost`, `supplier` (id) |

### Quote vs base Order

`Quote` is the trades-specific label for estimates and quotes before acceptance. Use `Quote` (not `Order`) when the work is proposed but not yet confirmed. Once a quote is accepted, create a base `Order` node linked to it, or update the Quote's `orderStatus` to reflect acceptance.

---

## Relationship Patterns

```
(:Order)-[:REQUIRES_VISIT]->(:SiteVisit)
(:Order)-[:USES_MATERIAL]->(:Material)
(:SiteVisit)-[:AT_ADDRESS]->(:PostalAddress)
(:Certification)-[:HELD_BY]->(:Person)
```

The `(:Certification)-[:HELD_BY]->(:Person)` relationship tracks which staff member holds a trade certification (e.g., Gas Safe, NICEIC, Part P).
