Switch to plural table names

This commit is contained in:
Jon Staab
2026-03-25 16:54:30 -07:00
parent cb2e37c74a
commit 6f407fd681
3 changed files with 53 additions and 52 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ Notes:
- All public write methods should be run in a transaction so they're atomic
- All writes should be accompanied by an activity log entry of `(activity_type, identifier)`
- Database table names are singular: `activity`, `tenant`, `relay`, `invoice`, `invoice_item`
## `pub fn new() -> Self`
@@ -75,7 +76,7 @@ Notes:
## `pub fn create_invoice(&self, invoice: &Invoice, invoice_items: [&InvoiceItem]) -> Result<()>`
- Saves invoice and invoice_items
- Saves an `invoice` row and related `invoice_item` rows
- Logs activity as `(invoice_created, invoice_id)`
## `pub fn list_invoices(tenant_id: Option<&str>) -> Result<Vec<Invoice>>`