import { EN_AppEntities } from '@app_consts';
import { AppBaseEntity } from './generic/app.baseentity';
import { AppBaseFilter } from './generic/app.baseentityfilter';


export class WindreamIndex extends AppBaseEntity {

    typeName = EN_AppEntities.WindreamIndex;
    get entitytitle(): string {  //is used for messages
        return this.entityId ? `WindreamIndex "${this._name}"` : 'New WindreamIndex';
    }
    windreamIndexId: number;
    clientId: number;
    attributeDwAttrId: number;
    attributeSzColumnName: string;
    comment: string;
    comumnLength: number;
    attributeDwAttrType: number;
    objectTypeAttributeSzName: string;

    get _name(): string {
        return this.attributeSzColumnName;
    }
    get selectionName(): string {
        return this.comment + ' (' + this.attributeSzColumnName + ')';
    }
    public get entityId() {
        return this.windreamIndexId;
    }
    public set entityId(value) {
        this.windreamIndexId = value;
    }

}


export class ClientIdFilter extends AppBaseFilter {
    clientId: number;
}
