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


export class GenEventOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public DisplayName: string = '',
        public ID_Unit: number = 0,
        public Unit: string = '',
        public RegistrationNumber: string = '',
        public StartDate: string | Date = '',
        public EndDate: string | Date = '',
        public PersonLeader: string = '',
        public ID_EventGeneralState: string = '',
        public EventGeneralState: string = '',
        public ID_EventGeneralType: number = 0,
        public EventGeneralType: string = '',
        public ID_EventGeneralScope: number = 0,
        public EventGeneralScope: string = '',
    ) {
        super();
    }
    /* tslint:enable: variable-name */
}

export class GenEventType extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public DisplayName: string = '',
        public Note: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
    }
}
export class GenEventScope extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public DisplayName: string = '',
        public Note: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
    }
}
export class GenEventState extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: string = '',
        public DisplayName: string = '',
        public Note: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
    }
}


export class EventGeneralAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public Year: number = 0,
        public ID_EventGeneralType: number = 0,
        public ID_EventGeneralState: string = '',
        public ID_EventGeneralScope: number = 0,
        public IsFuture: boolean = false,
        public IsRelation: boolean = false,
        public IsChildDirect: boolean = false,
        public IsChildUnit: boolean = false,
        /* tslint:enable: variable-name */
    ) {
        super(APP_ID);
        if (!this.Year) {
            this.Year = undefined;
        }
        if (!ID_EventGeneralState) {
            this.ID_EventGeneralState = undefined;
        }
        if (!ID_EventGeneralType) {
            this.ID_EventGeneralType = undefined;
        }
        if (!ID_EventGeneralScope) {
            this.ID_EventGeneralScope = undefined;
        }
        if (!IsFuture && IsFuture === null) {
            this.IsFuture = undefined;
        }
        if (!IsRelation) {
            this.IsRelation = undefined;
        }
        if (!IsChildDirect) {
            this.IsChildDirect = undefined;
        }
        if (!IsChildUnit) {
            this.IsChildUnit = undefined;
        }

    }
}

export class EventGeneralTypeAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public DisplayName: string = '',
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}

export class EventGeneralScopeAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public DisplayName: string = '',
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}

export class EventGeneralStateAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public DisplayName: string = '',
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}
