import { PaginatedSerializationClass } from '@humand-packages/common';
import { HourCategory, HourCategoryIdentifier } from '../../business/models/hourCategorization';

export class TimeTrackingHourCategoriesSC extends PaginatedSerializationClass<HourCategory, HourCategoryIdentifier> {
    serialize(serializableObject: HourCategory): HourCategoryIdentifier {
        return mapHourCategoryToCategoryIdentifier(serializableObject);
    }
}

export const mapHourCategoryToCategoryIdentifier = (category: HourCategory): HourCategoryIdentifier => {
    return new HourCategoryIdentifier(category);
};
