import { IListable } from '@iqser/common-ui';
import { ILegalBasis } from './legal-basis';

export class Justification implements ILegalBasis, IListable {
    readonly description?: string;
    readonly name: string;
    readonly reason?: string;

    constructor(justification: ILegalBasis) {
        this.description = justification.description;
        this.name = justification.name;
        this.reason = justification.reason;
    }

    get id(): string {
        return this.name;
    }

    get searchKey(): string {
        return this.name;
    }
}
