import { OptionalNullable } from '@humand-packages/common';

export class PublicApiTimeSlot {
    constructor(properties: PublicApiTimeSlot) {
        this.endTime = properties.endTime;
        this.startTime = properties.startTime;
    }

    endTime: string;
    startTime: string;
}

export class PublicApiShiftInfo {
    constructor(properties: OptionalNullable<PublicApiShiftInfo>) {
        this.color = properties.color ?? null;
        this.description = properties.description ?? null;
        this.id = properties.id;
        this.name = properties.name ?? null;
        this.templateId = properties.templateId ?? null;
        this.timeSlots = properties.timeSlots;
    }

    color: string | null;
    description: string | null;
    id: number;
    name: string | null;
    templateId: number | null;
    timeSlots: PublicApiTimeSlot[];
}

export class PublicApiAssignedShift {
    constructor(properties: OptionalNullable<PublicApiAssignedShift>) {
        this.date = properties.date;
        this.employeeId = properties.employeeId;
        this.id = properties.id;
        this.shifts = properties.shifts;
    }

    date: string;
    employeeId: string;
    id: number;
    shifts: PublicApiShiftInfo[];
}

export class PublicApiShiftTemplate {
    constructor(properties: OptionalNullable<PublicApiShiftTemplate>) {
        this.color = properties.color ?? null;
        this.description = properties.description ?? null;
        this.id = properties.id;
        this.name = properties.name ?? null;
        this.timeSlots = properties.timeSlots;
    }

    color: string | null;
    description: string | null;
    id: number;
    name: string | null;
    timeSlots: PublicApiTimeSlot[];
}
