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

export class TimeTrackingPolicyApprovalStepResponsibleSegmentationItemForCreation {
    constructor(properties: OptionalNullable<TimeTrackingPolicyApprovalStepResponsibleSegmentationItemForCreation>) {
        this.approvalStepId = properties.approvalStepId;
        this.segmentationItemId = properties.segmentationItemId;
    }

    public readonly approvalStepId: string;
    public readonly segmentationItemId: number;
}

export class TimeTrackingPolicyApprovalStepResponsibleSegmentationItem extends TimeTrackingPolicyApprovalStepResponsibleSegmentationItemForCreation {
    constructor(properties: OptionalNullable<TimeTrackingPolicyApprovalStepResponsibleSegmentationItem>) {
        super(properties);
        this.id = properties.id;
        this.createdAt = properties.createdAt;
        this.updatedAt = properties.updatedAt;
        this.deletedAt = properties.deletedAt ?? null;
        this.approvalStep = properties.approvalStep ?? null;
    }

    public readonly id: string;
    public readonly createdAt: Date;
    public readonly updatedAt: Date;
    public readonly deletedAt: Date | null;
    public readonly approvalStep: TimeTrackingPolicyApprovalStep | null;
}
