import {
    IsBoolean
} from "class-validator";
import { Donor } from '../entities/Donor';
import { ResponseParticipant } from './ResponseParticipant';

/**
 * Defines the donor response.
*/
export class ResponseDonor extends ResponseParticipant {

    /**
     * Does this donor need a receipt?
     */
    @IsBoolean()
    receiptNeeded: boolean;

    /**
     * Creates a ResponseRunner object from a runner.
     * @param runner The user the response shall be build for.
     */
    public constructor(donor: Donor) {
        super(donor);
        this.receiptNeeded = donor.receiptNeeded;
    }
}
