import type { CampusId } from '@/shared/types/app';

export type CampusAttendanceCampusKey = CampusId;

export interface CampusAttendanceConfigDto {
  readonly id: string;
  readonly campus_key: CampusAttendanceCampusKey;
  readonly attendance_link: string | null;
  readonly updated_by_label: string | null;
  readonly organizationId: string;
  readonly campusId: string | null;
  readonly createdById: string;
  readonly updatedById: string | null;
  readonly createdAt: string;
  readonly updatedAt: string;
}

export interface CampusAttendanceConfigMutationDto {
  readonly attendance_link: string | null;
}

export interface CampusAttendanceSummaryDto {
  readonly id: string;
  readonly campus_key: CampusAttendanceCampusKey;
  readonly date: string;
  readonly total_enrolled: number;
  readonly total_present: number;
  readonly total_absent: number;
  readonly total_tardy: number;
  readonly attendance_percentage: number;
  readonly recorded_by_label: string | null;
  readonly notes: string | null;
  readonly organizationId: string;
  readonly campusId: string | null;
  readonly createdById: string;
  readonly updatedById: string | null;
  readonly createdAt: string;
  readonly updatedAt: string;
}

export interface CampusAttendanceSummaryMutationDto {
  readonly total_enrolled: number;
  readonly total_present: number;
  readonly total_absent: number;
  readonly total_tardy: number;
  readonly notes: string | null;
}

export interface CampusAttendanceListFilter {
  readonly campusKey?: CampusAttendanceCampusKey;
  readonly startDate?: string;
  readonly endDate?: string;
  readonly limit?: number;
}
