{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Fixture Invoicing Data Model", "description": "Tables of the fixture-invoicing app — all data is obviously placeholder.", "version": "0.1.0", "meta": { "purpose": "Browse and QA fixture data while iterating on soleprint tools.", "modes": ["sql"] }, "definitions": { "Customer": { "type": "object", "description": "A fixture customer.", "table": "customer", "properties": { "id": {"type": "integer", "column": "id"}, "name": {"type": "string", "column": "name"}, "email": {"type": "string", "column": "email"}, "created_at": {"type": "string", "format": "date-time", "column": "created_at"} } }, "Invoice": { "type": "object", "description": "An invoice issued to a fixture customer.", "table": "invoice", "properties": { "id": {"type": "integer", "column": "id"}, "number": {"type": "string", "column": "number"}, "customer_id": {"type": "integer", "column": "customer_id", "fk": "Customer"}, "issued_at": {"type": "string", "format": "date-time", "column": "issued_at"}, "due_at": {"type": "string", "format": "date-time", "column": "due_at"}, "status": {"type": "string", "column": "status"} } }, "LineItem": { "type": "object", "description": "A billable line on an invoice.", "table": "line_item", "properties": { "id": {"type": "integer", "column": "id"}, "invoice_id": {"type": "integer", "column": "invoice_id", "fk": "Invoice"}, "description": {"type": "string", "column": "description"}, "quantity": {"type": "integer", "column": "quantity"}, "unit_price": {"type": "number", "column": "unit_price"} } }, "Payment": { "type": "object", "description": "A payment recorded against an invoice.", "table": "payment", "properties": { "id": {"type": "integer", "column": "id"}, "invoice_id": {"type": "integer", "column": "invoice_id", "fk": "Invoice"}, "amount": {"type": "number", "column": "amount"}, "method": {"type": "string", "column": "method"}, "paid_at": {"type": "string", "format": "date-time", "column": "paid_at"} } } } }