| category_id | string, UUID, 🔒 system | ✅ Yes | unique; generated by gen_random_uuid() at insert | — | Public immutable identifier for the category, used in all API surfaces and relationships. |
| name | string | ✅ Yes | varchar(255), NOT NULL | — | Human-readable label for the category (e.g. ‘SaaS’, ‘Payroll’, ‘Transport’). Must be unique within a given category_type in practice (enforced at the application layer, not at the DB level). |
| category_type | string (enum) | ✅ Yes | NOT NULL; native PG enum core_api.category_type_enum; default ‘company’ | company | transaction | Discriminator controlling which entity type this category tag applies to. company categories are attached to companies via CompanyCategory; transaction categories label bank transactions. |
| created_at | string (ISO 8601 datetime), 🔒 system | ✅ Yes | NOT NULL; set by MikroORM onCreate lifecycle hook | — | Timestamp of when the category record was first created. |
| updated_at | string (ISO 8601 datetime), 🔒 system | ⚪ No | nullable; set by MikroORM onCreate and onUpdate lifecycle hooks | — | Timestamp of the most recent update to this category record. |
| deleted_at | string (ISO 8601 datetime) | null, 🔒 system | ⚪ No | nullable; null means active | — | Soft-delete sentinel. When non-null, the category is considered deleted and must be excluded from all active queries via deleted_at IS NULL predicate. |