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

import { TIME_OFF_POLICY_TYPE_ACTIVITY_TYPES } from '../../../timeOff/business/types/policyTypes/activityTypes';
import { TIME_OFF_REQUEST_CONSUMPTION_TYPES } from '../../../timeOff/business/types/requests/timeOffRequestConsumptionTypes';
export class TimeTrackingDaySummaryTimeOff {
    constructor(properties: OptionalNullable<TimeTrackingDaySummaryTimeOff>) {
        this.id = properties.id;
        this.daySummaryId = properties.daySummaryId;
        this.timeOffRequestId = properties.timeOffRequestId;
        this.timeOffPolicyTypeName = properties.timeOffPolicyTypeName;
        this.timeOffPolicyTypeIcon = properties.timeOffPolicyTypeIcon ?? null;
        this.hours = properties.hours ?? null;
        this.fromTime = properties.fromTime ?? null;
        this.toTime = properties.toTime ?? null;
        this.consumptionType = properties.consumptionType ?? null;
        this.activityType = properties.activityType ?? TIME_OFF_POLICY_TYPE_ACTIVITY_TYPES.NON_WORK;
        this.fromDate = properties.fromDate ?? null;
        this.toDate = properties.toDate ?? null;
    }

    id: number;
    hours: number | null;
    daySummaryId: number;
    timeOffRequestId: number;
    timeOffPolicyTypeName: string;
    timeOffPolicyTypeIcon: string | null;
    fromTime: string | null;
    toTime: string | null;
    consumptionType: TIME_OFF_REQUEST_CONSUMPTION_TYPES | null;
    fromDate: string | null;
    toDate: string | null;
    activityType: TIME_OFF_POLICY_TYPE_ACTIVITY_TYPES | null;
}

export class TimeTrackingDaySummaryTimeOffApi {
    constructor(properties: OptionalNullable<TimeTrackingDaySummaryTimeOffApi>) {
        this.id = properties.id;
        this.name = properties.name;
        this.hours = properties.hours ?? null;
        this.fromTime = properties.fromTime ?? null;
        this.toTime = properties.toTime ?? null;
        this.consumptionType = properties.consumptionType ?? null;
        this.activityType = properties.activityType ?? TIME_OFF_POLICY_TYPE_ACTIVITY_TYPES.NON_WORK;
        this.fromDate = properties.fromDate ?? null;
        this.toDate = properties.toDate ?? null;
    }

    id: number;
    name: string;
    hours: number | null;
    fromTime: string | null;
    toTime: string | null;
    consumptionType: TIME_OFF_REQUEST_CONSUMPTION_TYPES | null;
    activityType: TIME_OFF_POLICY_TYPE_ACTIVITY_TYPES | null;
    fromDate: string | null;
    toDate: string | null;
}
