Skip to content

[Closes #1] Setting up initial data model - #2

Open
francisli wants to merge 10 commits into
mainfrom
agents
Open

[Closes #1] Setting up initial data model#2
francisli wants to merge 10 commits into
mainfrom
agents

Conversation

@francisli

Copy link
Copy Markdown
Contributor

No description provided.

francisli added 10 commits June 30, 2026 18:42
Keeps User/Invite model and field names camelCase in JS while the
underlying tables and columns follow snake_case DB convention.
…models

Adds the core case-management domain per dsas.dbml: 7 enums and 7 models,
following the camelCase-JS/snake_case-DB mapping convention established for
User/Invite. Action.type uses the ACTION enum (dbml has this as a
copy/paste bug pointing at action_status); BARRIER/ACTION enums are
renamed to BarrierType/ActionType to avoid colliding with the Barrier/
Action model names, with @@Map to keep the underlying Postgres type names
matching dbml.
…Barrier, Action, and Igac

Bare Base-wrapper classes (constructor + ResponseSchema only, mirroring
Invite's minimal style) so future route work has a model layer to build
on. No derived business-logic getters or input-side schemas are added
yet since that behavior isn't designed. Also re-exports the new Prisma
enums from server/prisma/client.js so model files can import them
alongside Prisma, consistent with the existing pattern.
Adds the Profile model and its 10 supporting enums plus a CrisisFlag
enum for TriageAssessment.flags, matching dsas.dbml. income_sources,
immediate_needs, and flags are modeled as Postgres enum arrays since
their column names are plural against a singular enum type.
Bare Base-wrapper class (constructor + ResponseSchema only), mirroring
the other new model wrappers. Re-exports the 10 Profile-related enums
from server/prisma/client.js needed by its ResponseSchema.

server/models/profile.js was being silently excluded by the .gitignore
"profile*" rule (intended for Node clinic profiling output) -- added a
scoped negation so the model file is tracked without weakening that rule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant