feat(partner): customers (#50) #155
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!155
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/partner-customers-50"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the customers part of #50: an organization keeps a private list of its travellers (customers) for itineraries (#51).
What
partner_customerstable (migration 0037): private per organization; ID number unique per organization, ignoring case, among live rows; expiry dates follow the customer type (CHECK); soft delete; name, email, phone, ID number and expiry dates kept out ofaudit_log.internal/partners(service, store, handler) and/v1/orgs/{id}/customers[/{customer_id}]: list with search and paging, create (Idempotency-Key), get, edit (version), delete (?version=). Permissionsbusiness_portal.customer.view|create|update|deletein the organization; writes need an active organization (ADR 0021); another organization's customer is 404.Checks
make cover: 91.6% (minimum 80%).golangci-lint: 0 issues.go test ./...all packages pass.scripts/web-e2e.sh partner34 passed; typecheck of partner, admin and ticket ok.Owner questions ([verify], ADR 0032)
Deferred minors
NUL byte in search or text gives a 500 (codebase-wide); create accepts a stray
version; lock-wait on write statements after the organization lock is a 500 not 503; list items and total are two queries; pager can point past the last page after others delete; e2e PUT mock keeps old fields; searching the typed 07xx phone finds nothing.Notes:
orgs.OrgRouteis a thin exported wrapper oforgRoute; all customer routes use thedefaultrate class (sensitiveallows 10 an hour).🤖 Generated with Claude Code