import { TimeTrackingDaySummaryTimeOff } from '../../business/models/timeTrackingDaySummaryTimeOff';
import { TimeTrackingDaySummaryTimeOffDAO } from '../dataAccessObjects/daySummaryTimeOff';

export const mapTimeOffAssociationDaoToModel = (dao: TimeTrackingDaySummaryTimeOffDAO): TimeTrackingDaySummaryTimeOff => {
    return new TimeTrackingDaySummaryTimeOff({
        activityType: dao.activityType ?? null,
        consumptionType: dao.consumptionType ?? null,
        daySummaryId: dao.daySummaryId,
        fromDate: dao.fromDate ?? null,
        fromTime: dao.fromTime ?? null,
        hours: dao.hours ?? null,
        id: dao.id,
        timeOffPolicyTypeIcon: dao.timeOffPolicyTypeIcon,
        timeOffPolicyTypeName: dao.timeOffPolicyTypeName,
        timeOffRequestId: dao.timeOffRequestId,
        toDate: dao.toDate ?? null,
        toTime: dao.toTime ?? null,
    });
};
