package activity

import (
	"time"

	"system-altrak/internal/domain"
)

type ModuleCard struct {
	ModuleKey    string     `json:"module_key"`
	ModuleLabel  string     `json:"module_label"`
	Total        int64      `json:"total"`
	LatestAction string     `json:"latest_action,omitempty"`
	LatestActor  string     `json:"latest_actor,omitempty"`
	LatestAt     *time.Time `json:"latest_at,omitempty"`
}

type DeletedRecord struct {
	ModuleKey     string    `json:"module_key"`
	ModuleLabel   string    `json:"module_label"`
	ResourceKey   string    `json:"resource_key"`
	ResourceLabel string    `json:"resource_label"`
	ID            uint      `json:"id"`
	Title         string    `json:"title"`
	Subtitle      string    `json:"subtitle"`
	BranchID      uint      `json:"branch_id"`
	DeletedAt     time.Time `json:"deleted_at"`
	Restorable    bool      `json:"restorable"`
}

type DashboardResponse struct {
	Cards        []ModuleCard         `json:"cards"`
	Logs         []domain.ActivityLog `json:"logs"`
	Deleted      []DeletedRecord      `json:"deleted"`
	TotalLogs    int                  `json:"total_logs"`
	TotalDeleted int                  `json:"total_deleted"`
}
