import {
  AttendanceRegistration,
  Employee,
  PlannedTime,
  Tour,
  WorkTime,
} from '@prisma/client';

export interface AnomalyCreateDto {
  id: string;
  type: string;
  description: string;
  groupKey: string;
  groupDescription: string;
  workedOnBy: string;
  sleepTimer: number;
  sleepSince?: Date | string | null;
  resolvedAt?: Date | string | null;
  manuallyResolved?: boolean;
  createdAt?: Date | string;
  solution?: {
    create: {
      id?: string;
      name: string;
      steps?: {
        create?: { description: string }[];
      };
    };
  };
}

export interface AnomalyUpdateDto {
  resolvedAt: Date;
  manuallyResolved: boolean;
}

export interface AnomalyAsssociatedEntities {
  tour?: Tour[];
  plannedTime?: PlannedTime[];
  workTime?: WorkTime[];
  attendanceRegistration?: AttendanceRegistration[];
  employee?: Employee[];
}
