import { APP_ID } from '~/constants/api.constants';
import { BaseInput } from '~/core/entities/input/baseInput';

export class EvaluationAll extends BaseInput {
    /* tslint:disable variable-name */
    ID_Login: string;
    ID_EvaluationState: string;
    Year: number;
    Unit: string;
    IsUnit: boolean;

    /* tslint:enable variable-name */

    constructor(appId = APP_ID, loginId = '', stateId = '', year = 0, unit = '', isUnit = true) {
        super(appId);
        this.ID_Login = loginId;
        this.Unit = unit;
        this.Year = year;
        this.ID_EvaluationState = stateId;
        this.IsUnit = isUnit;

        if (stateId === '') {
            this.ID_EvaluationState = undefined;
        }
        if (year === 0) {
            this.Year = undefined;
        }
    }
}
