/* Table class. backendmaker.com by Enrique Gonzalez Alonso
*/
function Table() { // Table class
  this.table;     //Name of the table
  this.tableName;  //Description of the table or alias of the table
  this.keyfield;  //Main key field
  this.fields;   // Fields array
  this.listFields;  //Fields that will be used for paginated list
  this.order;   //Field that will be used for ordering, and direction
  this.bounds;  // Bounds for pagination
  this.relationFields; //array of fields that are linked with other tables with an '1 to many' or 'many to many' relation
  this.fieldHints; //this is used to add a description to the field
  this.tabs;  //tabbed content
  this.template;  //template that will be used
  this.istherekindof = function(kind) { //function that will tell us if is there a field of a given type
  	              var result=false;
                  $.each(this.fields, function(k,v){
                    		if (v.kindof==kind) { 
                    			result=true;
                    			return false;
                    		}
                  });
                  return result;
                  };                  
}

