import { OptionalNullable } from '@humand-packages/common';
import { NotifiableIncidenceType } from '../../types/timeTracking/notifiableIncidenceType';

export class TimeTrackingIncidenceNotificationLogForCreation {
    constructor(properties: OptionalNullable<TimeTrackingIncidenceNotificationLogForCreation>) {
        this.instanceId = properties.instanceId;
        this.userId = properties.userId;
        this.dateString = properties.dateString;
        this.incidenceType = properties.incidenceType;
        this.entryId = properties.entryId ?? null;
    }

    readonly instanceId: number;
    readonly userId: number;
    readonly dateString: string;
    readonly incidenceType: NotifiableIncidenceType;
    readonly entryId: number | null;
}

export class TimeTrackingIncidenceNotificationLog extends TimeTrackingIncidenceNotificationLogForCreation {
    constructor(properties: OptionalNullable<TimeTrackingIncidenceNotificationLog>) {
        super(properties);
        this.id = properties.id;
        this.createdAt = properties.createdAt;
    }

    readonly id: string;
    readonly createdAt: Date;
}
