HOCO B2B
Team tasksAnis

SRV-42 — Store the fields the API defines but the database approximated

Give every V1 field the API reference defines its own column and enforce its rules, instead of approximating it from other data.

FieldDetails
Task codeSRV-42
PhaseP1 — V1 build & integration
Product scopeV1
StatusDone (Tue 20 Oct 2026)
StartTue 20 Oct 2026
DueTue 20 Oct 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort1.5 person-day(s) planned · 3 from scratch · size 1.5
Area · appServer · server
Depends onSRV-41
Unblocks—
Milestones—

Summary

Give every V1 field the API reference defines its own column and enforce its rules, instead of approximating it from other data.

Description

The audit after SRV-41 found fields the contract accepts but the database never stored. Each is stored with an additive migration, backfilled with the value the API used to derive, and its rules are enforced: promotion internal name, per-reseller cap (cart, checkout, release on refusal) and notify flag; banner draft, mobile image, countdown and audience; variant ARCHIVED vs HIDDEN and weight; announcement SMS/e-mail channels and named users; maintenance end time; delegate supervisor; visit report needs; reseller location source. Category images and versions of objectives/visit types are left as documented.

Subtasks

#SubtaskOwner
1Additive migration with backfillsAnis
2Rules enforced and testedAnis
3Database design and API pages updatedAnis

Deliverables

  • Migration 20261026090000_srv42_stored_api_fields
  • Server changes and tests
  • Docs updates

Acceptance criteria

  • No contract change (OpenAPI export identical)
  • Existing rows answer as before
  • Full test suite passes

Requirements covered

RequirementTitleRelease
PRO-03
CAT-06Product import/export (Excel/CSV) with a validation reportV1

API surface

Test measures

  • Integration tests per stored field and rule

Risks

  • Behaviour change: new promotions default to notifyResellers false

KPI

  • Delivered by Tue 20 Oct 2026 within 1.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page