Audience: Engineers. What this answers: the survey model, the template split, and the two scope facts (no AI, Conversations = Performance).
Source:
SurveyService.cs(1,649),AdminSurveysService.cs(925),Employee/SurveysService.cs(133), theSurvey*entities (TenantDb + MembershipDb),SurveyModel.cs, plus a live pass 2026-07-20.
── TenantDb (company's own) ──
SurveyTemplate ──< SurveyTemplateQuestion ──< SurveyTemplateResponseOption
│ (auto-populates ▼)
Survey SurveyTypeId, SurveyStatusId, Description, IsAnonymous
├──< SurveyQuestion ──> ReviewResponseTypeId, ──< SurveyResponseOption
└──(Assign)──▶ EmployeeSurvey PersonId, EmployeeSurveyStatusId
└──< SurveyResponse
── MembershipDb (platform-provided) ──
SurveyTemplate (+Question, +ResponseOption, +Type, +Status) ← the "Default" templates
Read models: ViewSurvey, ViewEmployeeSurvey, ViewSurveyResponse(+Option), ViewSurveyTemplateResponseOption.
Note the dual home: survey templates exist in both MembershipDb (platform defaults) and TenantDb (custom). Surveys themselves are TenantDb only.
SurveyModel.cs)| Enum | Values |
|---|---|
SurveyTypeParams / SurveyTemplateTypeParams |
General · Confirmation · Exit |
SurveyStatuParams / SurveyTemplateStatuParams |
New · Ready |
EmployeeSurveyStatuParams |
Not started · In progress · Completed |
Question response types reuse ReviewResponseTypeId — surveys and reviews share the response-type vocabulary (text/rating/choice/etc.).
| Custom | Default | |
|---|---|---|
| Store | TenantDb | MembershipDb |
| Owner | The company | PaidHR (platform) |
| Endpoint | SelectCustomTemplates |
SelectDefaultTemplates |
| Live | "Custom" sub-tab | "Default" sub-tab |
Building a survey from a template copies its questions into the survey (Add with a template id), which you can then edit — the survey is decoupled from the template after creation.
Template: Add_Template → Add_Template_Question (×n) → Finish_Template
Survey: Add [templateId?] → Add_Question/Edit_Question/Move_Question → Finish
Assign: Assign → EmployeeSurvey (per person)
Take: (employee) Save_Response (×n) → Submit → SurveyResponse
Manage: Delete/Restore/Remove (soft delete), Move_Question (reorder)
Save_Response persists progress (status In progress); Submit finalises (Completed).
Survey.IsAnonymous is set at creation. Enforcement is on the response read path — an anonymous survey's ViewSurveyResponse must not join back to Person. Treat this as a privacy invariant: any code path that surfaces responses must honour the flag. (RFD-001)
The survey list loaded from middleware-dev.paidhr.com/admin/surveys/select. Core-backend also exposes Admin/Surveys/* (27). Which serves which screen isn't fully mapped — treat changes as potentially cross-service.