func GetModelTableName(model interface{}) (result string) {
	// reflect model method TableName() error, try TypeName
	defer func() {
		err := recover()
		if err != nil {
			//typ := reflect.TypeOf(model)
			//typeName := fmt.Sprintf("%v", typ)
			typeName := mcore.GetTypeName(model)
			//type name to table name
			result = mcore.ToTableName(typeName)
			logger.Debugf("Model not implements TableName() function. Cast model name to table name. Model:%s, Table: %s", typeName, result)
		}
	}()

	in := make([]reflect.Value, 0)
	method := reflect.ValueOf(model).MethodByName("TableName")
	r := method.Call(in)
	result = fmt.Sprintf("%v", r[0])
	return
}
// GetModelTableName
// Model Should has TableName() method.
// If TableName() function not present, cast model name
// to table name.
GetModelTableName
Model Should has TableName() method.
If TableName() function not present, cast model name
to table name.
// GetModelTableName // Model Should has TableName () method . // If TableName () function not present cast model name // to table name .
func GetModelTableName(model interface{}) (result string) {
	defer func() {
		err := recover()
		if err != nil {
			typeName := mcore.GetTypeName(model)
			result = mcore.ToTableName(typeName)
			logger.Debugf("Model not implements TableName() function. Cast model name to table name. Model:%s, Table: %s", typeName, result)
		}
	}()
	in := make([]reflect.Value, 0)
	method := reflect.ValueOf(model).MethodByName("TableName")
	r := method.Call(in)
	result = fmt.Sprintf("%v", r[0])
	return
}
func GetModelTableName ( model interface { } ) ( result string ) { defer func ( ) { err := recover ( ) if err != nil { typeName := mcore . GetTypeName ( model ) result = mcore . ToTableName ( typeName ) logger . Debugf ( " " , typeName , result ) } } ( ) in := make ( [ ] reflect . Value , 0 ) method := reflect . ValueOf ( model ) . MethodByName ( " " ) r := method . Call ( in ) result = fmt . Sprintf ( " " , r [ 0 ] ) return }
GetModelTableName
Model Should has TableName() method.
GetModelTableName Model Should has TableName () method .
// reflect model method TableName() error, try TypeName //typ := reflect.TypeOf(model) //typeName := fmt.Sprintf("%v", typ) //type name to table name