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

export class WindreamSearchItem extends AppBaseEntity {
    typeName = EN_AppEntities.WindreamSearchItem;
    get entitytitle(): string {  //is used for messages
        return this.entityId ? `Windream Suchfeld "${this._name}"` : 'Neues Windream Suchfeld';
    }
    windreamSearchItemId: number;
    clientId: number;
    seq: number;
    name: string;
    comment: string;
    caption: string;
    placeHolder: string;
    searchTemplate: string;
    connectedList: string;
    get _name(): string {
        return this.caption;
    }

    public get entityId() {
        return this.windreamSearchItemId;
    }

    public set entityId(value) {
        this.windreamSearchItemId = value;
    }

}


export class WindreamSearchItemFilter extends AppBaseFilter {
    departmentId: number;
    windreamSearchToDepartmentId: number;
}
