Add categories and suppliers with CRUD routes

- category table with hierarchical parent_id, sort ordering, soft-delete
- supplier table with contact info, account number, payment terms
- CRUD routes for both with search on suppliers
- Zod validation schemas in @forte/shared
- Products will link to suppliers via join table (many-to-many)
- 26 tests passing
This commit is contained in:
Ryan Moon
2026-03-27 18:07:46 -05:00
parent 81894a5d23
commit 77a3a6baa9
12 changed files with 1345 additions and 1 deletions

View File

@@ -4,8 +4,9 @@ import postgres from 'postgres'
import * as storeSchema from '../db/schema/stores.js'
import * as userSchema from '../db/schema/users.js'
import * as accountSchema from '../db/schema/accounts.js'
import * as inventorySchema from '../db/schema/inventory.js'
const schema = { ...storeSchema, ...userSchema, ...accountSchema }
const schema = { ...storeSchema, ...userSchema, ...accountSchema, ...inventorySchema }
declare module 'fastify' {
interface FastifyInstance {