export type EventType = "clock_in" | "clock_out" | "break_start" | "break_end";

export interface Employee {
  id: number;
  email: string;
  name: string | null;
  active: 0 | 1;
  created_at: string;
}

export interface AttendanceEvent {
  id: number;
  employee_id: number;
  type: EventType;
  ts: string;
}

export type Role = "admin" | "employee";

export interface SessionUser {
  email: string;
  name: string | null;
  role: Role;
  employeeId: number | null;
}

declare global {
  namespace Express {
    interface Request {
      user?: SessionUser;
    }
  }
}
