import { BaseInput } from '~/core/entities/input/baseInput';
import { BaseOutput } from '~/core/entities/output/baseOutput';
import { APP_ID } from '~/constants/api.constants';
export class EventGeneralInsert extends BaseInput {
    constructor(
        public ID_Login: string = '',
        public DisplayName: string = '',
        public StartDate: string = '',
        public EndDate: string = '',
        public ID_Unit: number = 0,
        public Note: string = '',
        public ID_EventGeneralType: number = 0,
        public ID_EventGeneralScope: number = 0,
        public Street: string = '',
        public Location: string = '',
        public Postcode: string = '',
        public Region: string = '',
        public State: string = '',
        public GpsLatitude: number = 0,
        // // public GpsLatitudeText: string = '',
        public GpsLongitude: number = 0,
        // // public GpsLongitudeText: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
        this.wrapper = "eventGeneral";
        if (!this.GpsLatitude)
            delete this.GpsLatitude
        if (!this.GpsLongitude)
            delete this.GpsLongitude

    }
}

export class EventGeneralUpdate extends EventGeneralInsert {
    constructor(public ID: number = 0, ...args) {
        super(...args)
    }
}

export class RegionOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public DisplayName: string = '',
        public Note: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
    }
}
export class UnitOutput extends BaseOutput {
    /* tslint:disable: variable-name */
    constructor(
        public ID: number = 0,
        public ID_Group: number = 0,
        public ID_UnitType: string = '',
        public UnitType: string = '',
        public DisplayName: string = '',
        public SortName: string = '',
        public RegistrationNumber: string = '',
        public ShortRegistrationNumber: string = '',
        public Location: string = '',
        public IC: string = '',
        public DIC: string = '',
        public Street: string = '',
        public PostalState: string = '',
        public City: string = '',
        public Postcode: string = '',
        public State: string = '',
        public PostalFirstLine: string = '',
        public PostalStreet: string = '',
        public PostalCity: string = '',
        public PostalPostcode: string = '',
        public Note: string = '',
        public FullDisplayName: string = '',
        /* tslint:enable: variable-name */
    ) {
        super();
    }
}

export class EventGeneralDelete extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public ID: number = 0,
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}
export class RegionAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        public DisplayName: string = '',
        /* tslint:enable: variable-name */

    ) {
        super();
    }
}
export class UnitAll extends BaseInput {
    constructor(
        /* tslint:disable: variable-name */
        public ID_Login: string = '',
        // public ID: number = 0,
        // public ID_Group: number = 0,
        public RegistrationNumber: string = '',
        public DisplayName: string = '',
        public Location: string = '',
        public ID_UnitType: string = undefined,
        // public AccountNumber: string = '',
        // public IC: string = '',
        // public ID_UnitParent: number = 0,
        // public ID_UnitChild: number = 0,
        // public ID_UnitTree: number = 0,
        // public RegistrationNumberStartWith: boolean = false,
        // public ID_AlignmentType: number = 0,
        /* tslint:enable: variable-name */

    ) {
        super(APP_ID);
        if (!this.RegistrationNumber) {
            delete this.RegistrationNumber
        }
        if (!this.DisplayName) {
            delete this.DisplayName
        }
        if (!this.Location) {
            delete this.Location
        }
    }
}


