// some types for Ext.data.Store

function sroUserType(){
	return [{
        name : 'userId',
        mapping : 'id',
        type : 'int'
    }, {
        name : 'name',
        mapping : 'nam',
        type : 'string'
    }, {
        name : 'shortname',
        mapping : 'snam',
        type : 'string'
    }, {
        name : 'login',
        mapping : 'log',
        type : 'string'
    }, {
        name : 'domen',
        mapping : 'dom',
        type : 'string'
    }, {
        name : 'roleId',
        mapping : 'rId',
        type : 'int'
    }];
}

function sroType(){
	return [{
		name : 'sroId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'name',
		mapping : 'n',
		type : 'string'
	}, {
		name : 'fullName',
		mapping : 'fn',
		type : 'string'
	}, {
		name : 'domen',
		mapping : 'd',
		type : 'string'
	}, {
		name : 'region',
		mapping : 'r',
		type : 'string'
	}, {
		name : 'typeId',
		mapping : 't',
		type : 'int'
	}, {
		name : 'membersCount',
		mapping : 'mc',
		type : 'int'
	},{
		name : 'handMembersCount',
		mapping : 'hmc',
		type : 'boolean'
	}, {
		name : 'gosreestrId',
		mapping : 'gid',
		type : 'string'
	}, {
		name : 'stockSize',
		mapping : 'ss',
		type : 'int'
	}, {
		name : 'hasIcon',
		mapping : 'hi',
		type : 'boolean'
	}, {
		name : 'hasStatus',
		mapping : 'hs',
		type : 'boolean'
	}, {
		name : 'deleted',
		mapping : 'dd',
		type : 'boolean'
	}, {
		name : 'phone',
		mapping : 'p',
		type : 'string'
	}, {
		name : 'authPersonName',
		mapping : 'apn',
		type : 'string'
	}, {
		name : 'authPersonPosition',
		mapping : 'app',
		type : 'string'
	}, {
		name : 'address',
		mapping : 'a',
		type : 'string'
	}, {
		name : 'raiting',
		mapping : 'rg',
		type : 'int'
	}, {
		name : 'outerSite',
		type : 'string'
	}, {
		name : 'extendedView',
		mapping : 'extendedView',
		type : "boolean"
	}];
}

function domenType() {
	return [{
	    name : 'name',
	    mapping : 'n',
	    type : 'string'
	}, {
	    name : 'domen',
	    mapping : 'd',
	    type : 'string'
	}];
}

function sroPersonType() {
	return [{
		name : 'personId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'fio',
		mapping : 'f',
		type : 'string'
	}, {
		name : 'file',
		mapping : 'fd',
		type : 'int'
	}, {
		name : 'post',
		mapping : 'pt',
		type : 'string'
	}, {
		name : 'organization',
		mapping : 'o',
		type : 'string'
	}, {
		name : 'raiting',
		mapping : 'r',
		type : 'int'
	}];
}

function requestType() {
	return [{
		name : 'memberId',
		mapping : 'mid',
		type : 'int'
	}, {
		name : 'protocolId',
		type : 'int'
	}, {
		name : 'sroId',
		mapping : 'sid',
		type : 'int'
	}, {
		name : 'numberBill',
		mapping : 'nb',
		type : 'string'
	}, {
		name : 'numberAct',
		mapping : 'na',
		type : 'int'
	}, {
		name : 'opf',
		mapping : 'opf',
		type : 'string'
	}, {
		name : 'idNumber',
		mapping : 'in',
		type : 'string'
	}, {
		name : 'name',
		mapping : 'n',
		type : 'string'
	}, {
		name : 'ogrn',
		mapping : 'ogrn',
		type : 'string'
	}, {
		name : 'address',
		mapping : 'adr',
		type : 'string'
	}, {
		name : 'legalAddress',
		mapping : 'ladr',
		type : 'string'
	}, {
		name : 'phone',
		mapping : 'p',
		type : 'string'
	}, {
		name : 'regAreaId',
		mapping : 'raid',
		type : 'int'
	}, {
		name : 'regArea',
		mapping : 'ra',
		type : 'string'
	}, {
		name : 'postalCode',
		mapping : 'pc',
		type : 'string'
	}, {
		name : 'year',
		type : 'int'
	}, {
		name : 'gain',
		type : 'float'
	}, {
		name : 'staffCount',
		type : 'int'
	}, {
		name : 'capital',
		type : 'float'
	}, {
		name : 'debtSum',
		type : 'float',
		convert : NotNaN
	}, {
		name : 'mainStock',
		type : 'float'
	}, {
		name : 'hasAssurance',
		type : 'boolean'
	}, {
		name : 'hasCertificate',
		type : 'boolean'
	}, {
		name : 'candidate',
		mapping : 'can',
		type : 'boolean'
	}, {
		name : 'datePaymentKf',
		mapping : 'datePaymentKf',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateIntroPayment',
		mapping : 'dateIntroPayment',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, /* request info */
	   {
		name : 'closed',
		type : 'boolean'
	}, {
		name : 'requestTypeId',
		type : 'int'
	}, {
		name : 'forOldWorks',
		mapping : 'fow',
		type : 'boolean'
	}, {
		name : 'requestType',
		type : 'string'
	}, {
		name : 'accepterName',
		type : 'string'
	}, {
		name : 'accepterId',
		type : 'int'
	}, {
		name : 'expert',
		type : 'string'
	}, {
		name : 'independentExpert',
		type : 'string'
	}, {
		name : 'docsInputMethod',
		type : 'string'
	}, {
		name : 'docsInputDate',
		mapping : 'docsInputDate',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'id',
		type : 'int'
	}, {
		name : 'dateWritingTask',
		mapping : 'dateWritingTask',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateTaskExpert',
		mapping : 'dateTaskExpert',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateReportExpert',
		mapping : 'dateReportExpert',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateMeetingSo',
		mapping : 'dateMeetingSo',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateTransferLawSection',
		mapping : 'dateTransferLawSection',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'remarks',
		type : 'string'
	}, {
		name : 'admissionDecisionId',
		type : 'int'
	}, {
		name : 'newNumberBill',
		type : 'string'
	}, {
		name : 'declaredFirstTimeStaffCount',
		type : 'int'
	}, {
		name : 'declaredAllStaffCount',
		type : 'int'
	}, {
		name : 'numberBlankBills',
		mapping : 'nbb',
		type : 'string'
	}];
}

function requestNumberBBType() {
	return [{
		name : 'adId',
		mapping : 'a',
		type : 'int'
	}, {
		name : 'mId',
		mapping : 'm',
		type : 'int'
	}, {	
		name : 'numberBB',
		mapping : 'n',
		type : 'string'
	}];
}

function areaType(){
	return [{
		name : 'areaId',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}, {
		name : 'shortName',
		type : 'string'
	}, {
		name : 'topParentId',
		type : 'int'
	}, {
		name : 'fullPath',
		type : 'string'
	}, {
		name : 'index',
		type : 'string'
	}];
}

function memberSubworkType(){
	return [{
		name : 'id',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'memberId',
		mapping : 'm',
		type : 'int'
	}, {
		name : 'opf',
		mapping : 'opf',
		type : 'string'
	}, {
		name : 'name',
		mapping : 'mn',
		type : 'string'
	}, {
		name : 'subworkId',
		mapping : 'sw',
		type : 'int'
	}, {
		name : 'workId',
		mapping : 'w',
		type : 'int'
	}, {
		name : 'actualStateId',
		mapping : 'as',
		type : 'int'
	}, {
		name : 'stateId',
		mapping : 's',
		type : 'int'
	}, {
		name : 'prevStateId',
		mapping : 'ps',
		type : 'int'
	}, {
		name : 'protocolId',
		mapping : 'p',
		type : 'int'
	}, {
		name : 'numberAct',
		mapping : 'na',
		type : 'int'
	}, {
		name : 'newWorks',
		mapping : 'n',
		type : 'boolean'
	}, {
		name : 'requestTypeId',
		mapping : 'r',
		type : 'int'
	}];
}

function memberNWorkType(){
	return memberSubworkType().concat([{
		name : 'typeId',
		mapping : 't',
		type : 'int'
	}]);
}

function subworkType() {
	return [{
		name : 'subworkId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'name',
		mapping : 'n',
		type : 'string'
	}, {
		name : 'code',
		mapping : 'c',
		type : 'string'
	}, {
		name : 'workId',
		mapping : 'w',
		type : 'int'
	}, {
		name : 'fullName',
		type : 'string',
		convert : function(value, record){
			var codeVal = Ext.DomQuery.selectValue('c', record);
			return ( codeVal ? codeVal + ' ' : '' ) + 
			 		Ext.DomQuery.selectValue('n', record);
		}
	}];
}

function nworkType() {
	return subworkType().concat([{
		name : 'typedName',
		mapping : 'n',
		type : 'string',
		convert : function(value, record){
			var nworkTypeName = Ext.DomQuery.selectValue('t', record);
			return nworkTypeName ? value + ' (' + nworkTypeName + ')' : value;
		}
	}, {
		name : 'isWork',
		mapping : 'i',
		type : 'boolean'
	}, {
		name : 'typeName',
		mapping : 't',
		type : 'string'
	}, {
		name : 'parentId',
		mapping : 'p',
		type : 'int'
	}, {
		name : 'nworks',
		convert : function(value, record){
			return [];
		}
	}]);
}

function workType(){
	return [{
		name : 'workId',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}];
}

function sroMemberType(){
	return [{
		name : 'memberId',
		mapping : 'mid',
		type : 'int'
	}, {
		name : 'numberBill',
		mapping : 'nb',
		type : 'string'
	}, {
		name : 'numberBillBlank',
		mapping : 'nbb',
		type : 'string'
	}, {
		name : 'numberAct',
		mapping : 'na',
		type : 'int'
	}, {
		name : 'opf',
		mapping : 'opf',
		type : 'string'
	}, {
		name : 'ogrn',
		mapping : 'ogrn',
		type : 'string'
	}, {
		name : 'debtSum',
		type : 'string'
	}, {
		name : 'active',
		mapping : 'a',
		type : 'boolean'
	}, {
		name : 'name',
		mapping : 'n',
		type : 'string'
	}, {
		name : 'phone',
		mapping : 'p',
		type : 'string'
	}, {
		name : 'regArea',
		mapping : 'ra',
		type : 'string'
	}, {
		name : 'regAreaId',
		mapping : 'raid',
		type : 'int'
	}, {
		name : 'candidate',
		mapping : 'can',
		type : 'boolean'
	}, {
		name : 'dateDenyStr',
		mapping : 'dd',
		type : 'string'
	}, {
		name : 'reasonDeny',
		mapping : 'rd',
		type : 'string'
	}, {
		name : 'idNumber',
		mapping : 'in', 
		type : 'string'
	}, {
		name : 'postalCode',
		mapping : 'pc',
		type : 'string'
	}, {
		name : 'address',
		mapping : 'adr',
		type : 'string'
	}, {
		name : 'legalAddress',
		mapping : 'ladr',
		type : 'string'
	}, {
		name : 'infoEditorId',
		mapping : 'cine',
		type : 'int'
	}, {
		name : 'requestEditorId',
		mapping : 'reqe',
		type : 'int'
	}, {
		name : 'inspectionEditorId',
		mapping : 'inspe',
		type : 'int'
	}];
}
		
function admissionDecisionType() {
	return [{
		name : 'id',
		mapping : 'id',
		type : 'int'	
	},{
		name : 'protocolId',
		mapping : 'pid',
		type : 'int'
	}, {
		name : 'date',
		mapping : 'd',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'protocolName',
		mapping : 'pn',
		type : 'string'
	}, {
		name : 'decisionKind',
		mapping : 'k',
		type : 'int'
	}];
}

function newsType(){
	return [{
        name : 'id',
        mapping : 'id',
        type : 'int'
    }, {
        name : 'date',
        mapping : 'd',
        dateFormat : MYSQL_DATETIME_FORMAT,
		type : 'date'
    }, {
        name : 'caption',
        mapping : 'c',
        type : 'string'
    }, {
        name : 'typeId',
        mapping : 't',
        type : 'int'
    }, {
        name : 'stateId',
        mapping : 'st',
        type : 'int'
    }, { 
    	name : 'author',
    	mapping : 'a',
    	type : 'string'
    }, { 
    	name : 'source',
    	mapping : 's',
    	type : 'string'
    }, { 
    	name : 'link',
    	mapping : 'l',
    	type : 'string'
    }, {
    	name : 'topEndDate',
    	mapping : 'ted',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
    }, {
    	name : 'tooltip',
    	mapping : 'tt',
    	type : 'string'
    }, {
    	name : 'pageTitle',
    	mapping : 'pt',
    	type : 'string'
    }, {
		name : 'weight',
		mapping : 'w',
		type : 'int'
	}, {
        name : 'print2Rss',
        mapping : 'p',
        type : 'boolean'
    }];
}

function newsSateType() {
	return [{
        name : 'stateId',
        mapping : 'id',
        type : 'int'
    }, {
        name : 'description',
        mapping : 'd',
        type : 'string'
    }];
}

function branchesType(){
	return [{
        name : 'branchId',
        mapping : 'id',
        type : 'int'
    }, {
        name : 'district',
        mapping : 'd',
        type : 'string'
    }, {
        name : 'region',
        mapping : 'r',
        type : 'string'
    }, {
        name : 'address',
        mapping : 'a',
        type : 'string'
    }, { 
    	name : 'phone',
    	mapping : 'p',
    	type : 'string'
    }, { 
    	name : 'email',
    	mapping : 'e',
    	type : 'string'
    }, {
    	name : 'delegate',
    	mapping : 'dt',
    	type : 'string'
    }, {
    	name : 'raiting',
    	mapping : 'rn',
    	type : 'int'
    }];
}

function institutionType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}, {
		name : 'email',
		type : 'string'
	}, {
		name : 'telephone',
		type : 'string'
	}, {
		name : 'site',
		type : 'string'
	}, {
		name : 'address',
		type : 'string'
	}, {
		name : 'cityId',
		type : 'int'
	}, {
		name : 'cityName',
		type : 'string'
	}, {
		name : 'regionId',
		type : 'int'
	}, {
		name : 'regionName',
		type : 'string'
	}, {
		name : 'postalCode',
		type : 'string'
	}, {
		name : 'licence',
		type : 'string',
		convert : notNull
	}];
}

function courseType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}, {
		name : 'time',
		type : 'float'
	}, {
		name : 'institutionId',
		type : 'int'
	}, {
		name : 'institutionName',
		type : 'string'
	}, {
		name : 'region',
		type : 'string'
	}, {
		name : 'city',
		type : 'string'
	}, {
		name : 'time',
		type : 'int'
	}];
}

function courseSubworkType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'subworkId',
		type : 'int'
	}, {
		name : 'subworkCode',
		type : 'string'
	}, {
		name : 'subworkName',
		type : 'string'
	}, {
		name : 'workId',
		type : 'int'
	}, {
		name : 'courseId',
		type : 'int'
	}, {
		name : 'time',
		type : 'float'
	}];
}
function assurerType() {
	return[{
		name : 'assurerId',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}, {
		name : 'postalcode',
		type : 'string'
	}, {
		name : 'address',
		type : 'string'
	}, {
		name : 'site',
		type : 'string'
	}, {
		name : 'email',
		type : 'string'
	}, {
		name : 'telephone',
		type : 'string'
	}, {
		name : 'raiting',
		type : 'string'
	}, {
		name : 'sizeCapital',
		type : 'float',
		sortType : 'asFloat',
		convert : NotNaN
	}, {
		name : 'sizeOwnFunds',
		type : 'float',
		sortType : 'asFloat',
		convert : NotNaN
	}, {
		name : 'sizeInsuranceReserves',
		type : 'float',
		sortType : 'asFloat',
		convert : NotNaN
	}, {
		name : 'totalResponse',
		type : 'int',
		sortType: 'asInt',
		convert : NotNaN
	}, {
		name : 'sizePayment',
		type : 'int',
		sortType : 'asInt',
		convert : NotNaN
	}, {
		name : 'insuranceShare',
		type : 'float',
		sortType : 'asFloat'
	}, {
		name : 'regionId',
		type : 'int'
	}, {
		name : 'regionName',
		type : 'string'
	}, {
		name : 'cityId',
		type : 'int'
	}, {
		name : 'cityName',
		type : 'string'
	}, {
		name : 'bannerId',
		type : 'int'
		
	}, {
		name : 'bannerName',
		type : 'string'
	}];
}

function lawType(){
	return [{
		name : 'id',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'type',
		mapping : 'tp',
		type : 'int'
	}, {
		name : 'title',
		mapping : 'tl',
		type : 'string'
	}, {
		name : 'description',
		mapping : 'ds',
		type : 'string'
	}, {
		name : 'weight',
		mapping : 'w',
		type : 'int'
	}];
}

function bannerType(){
	return [{
		name : 'bannerId',
		mapping : 'bannerId',
		type : 'int'
	}, {
		name : 'description',
		mapping : 'description',
		type : 'string'
	}, {
		name : 'url',
		mapping : 'url',
		type : 'string'
	}, {
		name : 'fileId',
		mapping : 'fileId',
		type : 'int'
	}, {
		name : 'fileName',
		mapping : 'fileName',
		type : 'string'
	}, {
		name : 'realSize',
		mapping : 'realSize',
		type : 'boolean'
	}];
}

function banner2LocationType(){
	return [{
		name : 'id',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'locId',
		mapping : 'locId',
		type : 'int'
	}, {
		name : 'locName',
		mapping : 'locName',
		type : 'string'
	}, {
		name : 'locDesc',
		mapping : 'locDesc',
		type : 'string'
	}, {
		name : 'startDate',
		mapping : 'startDate',
		type : 'string'
	}, {
		name : 'endDate',
		mapping : 'endDate',
		type : 'string'
	}, {
		name : 'parentId',
		mapping : 'parentId',
		type : 'int'
	}, {
		name : 'parentName',
		mapping : 'parentName',
		type : 'string'
	}, {
		name : 'parentDesc',
		mapping : 'parentDesc',
		type : 'string'
	}, {
		name : 'disabled',
		mapping : 'disabled',
		type : 'boolean'
	}, {
		name : 'active',
		mapping : 'active',
		type : 'int'
	}, {
		name : 'showCount',
		mapping : 'showCount',
		type : 'int'		
	}];
}

function fileType(){
	return [{
		name : 'fileId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'realFileName',
		mapping : 'fn',
		type : 'string'
	}, {
		name : 'fileName',
		mapping : 'n',
		type : 'string'
	}, {
		name : 'subfolder',
		mapping : 's',
		type : 'string'
	}, {
		name : 'isDirectory',
		mapping : 'd',
		type : 'int'
	}, {
		name : 'parent',
		mapping : 'p',
		type : 'string'
	}, {
		name : 'ext',
		mapping : 'n',
		type : 'string',
		convert : function(val, record) {
			var ext = '';
			// isDirectory field the forth field in the array
			// so we gets the forth element of the n.childNodes
			if (Ext.DomQuery.selectValue('d', record) == '1') {
				ext = '&lt;DIR&gt;';
			} else {
				var dotPos = val.lastIndexOf('.');
				if (dotPos != -1) {
					ext = val.substring(dotPos + 1);
				}
			}
			return ext;
		}
	}];
}

function exhibitionType(){
	return [{
		name : 'bannerId',
		mapping : 'bId',
		type : 'int'
	}, {
		name : 'address',
		mapping : 'add',
		type : 'string'
	}, {
		name : 'email',
		mapping : 'e',
		type : 'string'
	}, {
		name : 'specialization',
		mapping : 'sp',
		type : 'string'
	}, {
		name : 'phone',
		mapping : 'ph',
		type : 'string'
	}, {
		name : 'contact',
		mapping : 'ct',
		type : 'string'
	}, {
		name : 'site',
		mapping : 'st',
		type : 'string'
	}, {
		name : 'hidden',
		mapping : 'h',
		type : 'boolean'
	}, {
		name : 'event',
		mapping : 'ev',
		type : 'boolean'
	}, {
		name : 'raiting',
		mapping : 'r',
		type : 'int'
			
	}].concat( announcementType() );
}

function announcementType(){
	return [{
		name : 'id',		
		mapping : 'id',
		type : 'int'
	}, {
		name : 'dateStart',
		mapping : 'ds',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateEnd',
		mapping : 'de',
		dateFormat : MYSQL_DATE_FORMAT,
		type : 'date'
	}, {
		name : 'place',
		mapping : 'p',
		type : 'string',
		convert : NotNaN
	}, {
		name : 'caption',
		mapping : 'c',
		type : 'string'
	}, { 
    	name : 'source',
		mapping : 's',
    	type : 'string',
		convert : NotNaN
    }, { 
    	name : 'link',
		mapping : 'l',
    	type : 'string'
    }, {
    	name : 'tooltip',
		mapping : 'tt',
    	type : 'string',
		convert : NotNaN
    }, {
    	name : 'pageTitle',
		mapping : 'pt',
    	type : 'string',
		convert : NotNaN
    }, {
    	name : 'weight',
		mapping : 'w',
    	type : 'int'
	}];
}

function bannerLocationType() {
	return [{
		name : 'locId',
		mapping : 'locId',
		type : 'int'
	}, {
		name : 'locName',
		mapping : 'locName',
		type : 'string'
	}, {
		name : 'locDesc',
		mapping : 'locDesc',
		type : 'string'
	}, {
		name : 'fileId',
		mapping : 'fileId',
		type : 'string'
	}];
}

function massMediaType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'name',
		type : 'string'
	}, {
		name : 'bannerId',
		type : 'int'
	}, {
		name : 'region',
		type : 'string'
	}, {
		name : 'type',
		type : 'string'
	}, {
		name : 'themes',
		type : 'string'
	}, {
		name : 'address',
		type : 'string'
	}, {
		name : 'phone',
		type : 'string'
	}, {
		name : 'site',
		type : 'string'
	}, {
		name : 'email',
		type : 'string'
	}, {
		name : 'raiting',
		type : 'int'
	}, {
		name : 'hidden',
		type : 'boolean'
	}];
}

function vacancyType() {
	return [{
		name : 'vacancyId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'position',
		mapping : 'p',
		type : 'string'
	},{
		name : 'qualification',
		mapping : 'q',
		type : 'string'
	},{
		name : 'description',
		mapping : 'd',
		type : 'string'
	}, {
		name : 'appSalary',
		mapping : 'as',
		type : 'int',
		convert : NotNaN
	}, {
		name : 'sroName',
		mapping : 'sn',
		type : 'string'
	}, {
		name : 'contacts',
		mapping : 'c',
		type : 'string'
	}, {
		name : 'dateStartStr',
		mapping : 'ds',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'dateEndStr',
		mapping : 'de',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'domen',
		mapping : 'dom',
		type : 'string'
	}];
}

function pollQType() {
	return [{
		name : 'questionId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'question',
		mapping : 'q',
		type : 'string'
	}, {
		name : 'type',
		mapping : 't',
		type : 'int'
	}, {
		name : 'totalVotes',
		mapping : 'tv',
		type : 'int'
	}, {
		name : 'totalVoters',
		mapping : 'tvs',
		type : 'int'
	}, {
		name : 'domen3Lvl',
		mapping : 'd',
		type : 'string'
	}, {
		name : 'active',
		mapping : 'a',
		type : 'boolean'
	}];
}

function pollAType() {
	return [{
		name : 'questionId',
		mapping : 'questionId',
		type : 'int'
	}, {
		name : 'answerId',
		mapping : 'answerId',
		type : 'int'
	}, {
		name : 'answer',
		mapping : 'answer',
		type : 'string'
	}, {
		name : 'votes',
		mapping : 'votes',
		type : 'int'
	}];
}

function memberReceiptsType() {
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'memberId',
		type : 'int'
	}, {
		name : 'yearId',
		type : 'int'
	}, {
		name : 'yearReceipts',
		type : 'int'
	}, {
		name : 'yearReceiptsSMR',
		type : 'int'
	}, {
		name : 'yearReceiptsState',
		type : 'int'
	}];	
}

function inspectionType(){
	return [{
		name : 'inspectionId',
		mapping : 'id',
		type : 'int'
	}, {
		name : 'admissionDecisionId',
		mapping : 'did',
		type : 'int'
	}, {
		name : 'memberId',
		mapping : 'sm',
		type : 'int'
	}, {
		name : 'inspectionAppointmentStr',
		mapping : 'inspap',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'inspectionBeginStr',
		mapping : 'inspbeg',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'inspectionBase',
		mapping : 'base',
		type : 'int'
	}, {
		name : 'inspectionForm',
		mapping : 'form',
		type : 'int'
	}, {
		name : 'inspectionSubject',
		mapping : 'subj',
		type : 'int'
	}, {
		name : 'taskPreparingExpert',
		mapping : 'tpexp',
		type : 'string'
	}, {
		name : 'executiveExpert',
		mapping : 'exexp',
		type : 'string'
	}, {
		name : 'lettersPreparationStr',
		mapping : 'letprep',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'docsRequestStr',
		mapping : 'docsrq',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'docsReceivingStr',
		mapping : 'docsrc',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'taskPreparationStr',
		mapping : 'taskprep',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'expertReportStr',
		mapping : 'exprep',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'controlOrganDecisionDateStr',
		mapping : 'codd',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'controlOrganDecision',
		mapping : 'cod',
		type : 'int'
	}, {
		name : 'regardingOrganDecisionDateStr',
		mapping : 'rodd',
		dateFormat : DATE_FORMAT,
		type : 'date'
	}, {
		name : 'regardingOrganDecision',
		mapping : 'rod',
		type : 'int'
	}, {
		name : 'result',
		mapping : 'r',
		type : 'boolean'
	}];
}

function inspectionBaseType(){
	return [{
		name : 'baseId',
		type : 'int'
	}, {
		name : 'text',
		type : 'string'
	}];
}

function inspectionControlOrganDecisionType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'text',
		type : 'string'
	}];
}

function inspectionFormType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'text',
		type : 'string'
	}];
}

function inspectionRegardingOrganDecisionType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'text',
		type : 'string'
	}];
}

function inspectionSubjectType(){
	return [{
		name : 'id',
		type : 'int'
	}, {
		name : 'text',
		type : 'string'
	}];
}


