feat(counter): registration links and QR self-registration capture

Registration links (event code and personal codes, oldest wins on a
duplicate), lookup by token, the caller's own codes, and the capture that
matches by mobile then email, never edits a matched lead, and records the
source and consent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-01 12:15:16 +08:00
1 parent 9c9469f5e5
commit 85b40424ce
12 files changed
+877 -2

No files matched your search

@@ -48,6 +48,13 @@ public class EventLead {
private String capturedBy;
/** STAFF (captured in the portal) or QR (self-registered). */
private String source = "STAFF";
private LocalDateTime consentAt;
private Long consentNoticeId;
@Column(updatable = false)
private LocalDateTime capturedAt = LocalDateTime.now();
@@ -0,0 +1,40 @@
package com.solvway.services.counter.model;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/** A QR registration code: salespersonUserId null is the event code, otherwise a salesperson's personal code. */
@Getter
@Setter
@Entity
@Table(name = "registration_link")
public class RegistrationLink {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private long companyId;
@Column(name = "event_uuid")
private long eventUuid;
@Column(name = "salesperson_user_id")
private Long salespersonUserId;
private String token;
private boolean enabled = true;
@Column(updatable = false)
private String createdBy;
@Column(updatable = false)
private LocalDateTime createdAt = LocalDateTime.now();
private String updatedBy;
private LocalDateTime updatedAt;
}