feat(counter): event lead status history and lead dashboard endpoint

Capture and status edits append to event_lead_status_change. POST
/counter/dashboard/leads aggregates captures, wins, overdue follow-ups
and the breakdowns for a Malaysian-day period (at most 731 days).

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 10:21:36 +08:00
1 parent 8d5f3747bf
commit a482a3a6d0
15 files changed
+745 -3

No files matched your search

@@ -0,0 +1,31 @@
package com.solvway.services.counter.model;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/** Append-only status history of an event lead; rows are never updated or deleted. */
@Getter
@Setter
@Entity
@Table(name = "event_lead_status_change")
public class EventLeadStatusChange {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private long companyId;
private long eventLeadId;
/** Null for the first row written at capture. */
private String fromStatus;
private String toStatus;
private LocalDateTime changedAt;
private String changedBy;
}