The User Model
The user model is the authentication and profile entity of the whole system. Every person โ admins, reporters, editors, managers โ is a user, with a level for role-based access control. Source: back/models/user.ts.
The File Model
The file model manages uploads โ images, videos, and documents โ with type-based directory routing, size limits, and mime validation. Source: back/models/file.ts.
Location Models (Country ยท Province ยท City)
ZiWound's geographic hierarchy is country โ province โ city, and each level carries extensive, localized war-history content. These three models share one important design decision: their rich text lives in nested localizedWarInfo objects ({ fa, en, ar, zh, pt, es, nl, tr, ru }), so they have no selected_language field. See the Localization pattern for the full reasoning.
Catalog Models (Category ยท Tag)
category and tag are the two small "catalog" models ZiWound uses for organizing reports and blog posts. They're near-identical, and both demonstrate Lesan's shared-relation pattern: they're referenced by many models, but each defines its own relatedRelations on those models rather than the catalog models carrying giant back-lists.
The Report Model
The report model is the heart of ZiWound โ the war crimes documentation entity. It's the deepest relation graph in the app (11 relations) and the model with the most acts. Source: back/models/report.ts.
The Document Model
A document is a supporting artifact attached to a war crime report โ something like a statement, an official file, or a source citation. Unlike the file model (which tracks the raw uploaded bytes), a document carries metadata about a piece of evidence and links to the files that back it. Source: back/models/document.ts.
Content Models (BlogPost ยท HeroSlide)
Two small content models power the marketing/editorial surface of ZiWound: blogPost (articles) and heroSlide (landing-page slider). Both share the same catalog relations seen in the Catalog Models page.
The War Criminal Model
warCriminal models accused individuals or entities. Reports link to them via the warCriminals relation, and each war criminal accumulates a bounded, sorted list of the reports that name them. Source: back/models/warCriminal.ts.
The Confirmation Model
confirmation is a small helper model that tracks verification tokens โ used for email confirmation and account/email verification flows. Source: back/models/confirmation.ts.