/** * Interface to help Typescript determine what is allowed within the field schema */ export interface IFieldSchema { /** * Determine if the field is a required field */ required?: boolean; /** * Determine if the field needs to be trimmed before inserted into the database */ trim?: boolean; /** * Determine if a default should be used if no data exists on inserting into the database * if boolean is used it will be the default of the type used for this field, if function is used * it will build out the default based on what the result of the function is. */ default?: Function | boolean; /** * Determine if this field is ultimatly a reference field */ ref?: string; /** * If the type being saved to the database is different than the type being used to store on the objec * itself. */ type?: any; /** * The internal name of the property */ name?: string; }