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

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

    public readonly approvalStepId: string;
    public readonly relation: string;
}

export class TimeTrackingPolicyApprovalStepResponsibleRelation extends TimeTrackingPolicyApprovalStepResponsibleRelationForCreation {
    constructor(properties: OptionalNullable<TimeTrackingPolicyApprovalStepResponsibleRelation>) {
        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;
}
