Files
apskel-pos-backend/internal/models
efrilmandClaude Opus 5.5 2bd53ee4a4 feat(loyalty): outlet loyalty settings API
Adds GET and PUT /outlets/:id/loyalty-settings (docs/prd-point-coin.md F1,
PC-201) on top of the typed settings processor.

The response shows every setting with its default when unset, the
organization's point value, and the effective EnakPoint cashback
(earn_value × point_value / earn_per_amount), so an owner cannot misread
the scale. PUT applies the body on top of the current settings: fields left
out keep their value, null clears an optional limit, and unknown fields are
refused so a typo cannot be ignored silently. The read-only fields of the
GET response are accepted and ignored, so a client can send back what it
received. It returns the keys that changed. Values outside the F1 bounds
answer 400, and an outlet of another organization 404.

RequireAdminOrManager also lets the purchasing role through, so loyalty
settings and the manual wallet adjustment from PC-107 now use a stricter
RequireLoyaltyManager (superadmin, admin, manager, owner).

Adds a test that registers every route, since gin panics at startup when
two routes name the same path parameter differently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:28:40 +07:00
..
2026-06-08 12:30:39 +07:00
2026-08-13 14:38:28 +07:00
2026-08-05 19:28:38 +07:00
2025-09-12 16:37:16 +07:00
2025-09-18 01:32:01 +07:00
2025-09-18 12:42:07 +07:00
2025-09-17 19:30:17 +07:00
2026-06-08 12:30:39 +07:00
2026-08-13 14:38:28 +07:00
…
2025-09-17 19:30:17 +07:00
2025-09-18 12:01:20 +07:00
2025-09-17 19:30:17 +07:00
2025-09-12 01:12:11 +07:00
2026-05-10 10:57:38 +07:00
2025-09-17 19:30:17 +07:00
2026-06-08 12:30:39 +07:00
…
2026-06-08 12:30:39 +07:00
2026-06-08 12:30:39 +07:00
2026-06-08 12:29:59 +07:00
2026-08-13 14:38:28 +07:00
2025-09-17 23:55:11 +07:00
2025-09-18 13:39:37 +07:00
…
2025-09-17 19:30:17 +07:00
…
2026-05-10 10:42:09 +07:00
2026-06-19 13:31:33 +07:00
2025-09-12 01:12:11 +07:00