private function mapScalarFields(array $fullFields)
    {
        $fields = [];
        foreach ($fullFields as $field) {
            if (!empty($field['id'])) {
                $type = 'IdType';
            } else {
                switch ($field['type']) {
                    case "integer":
                        $type = 'IntType';
                        break;

                    case "datetime":
                        $type = 'DateTimeType';
                        break;

                    case "float":
                        $type = 'FloatType';
                        break;

                    case "boolean":
                        $type = 'BooleanType';
                        break;

                    case "date":
                        $type = 'DateType';
                        break;

                    case "timestamp":
                        $type = 'TimestampType';
                        break;

                    default:
                        $type = 'StringType';
                }
            }

            $fields[] = [
                'fieldName' => $field['fieldName'],
                'fieldType' => $type,
                'fieldRequired' => $field['nullable']
            ];
        }

        return $fields;
    }
private function mapScalarFields(array $fullFields)
    {
        $fields = [];
        foreach ($fullFields as $field) {
            if (!empty($field['id'])) {
                $type = 'IdType';
            } else {
                switch ($field['type']) {
                    case "integer":
                        $type = 'IntType';
                        break;

                    case "datetime":
                        $type = 'DateTimeType';
                        break;

                    case "float":
                        $type = 'FloatType';
                        break;

                    case "boolean":
                        $type = 'BooleanType';
                        break;

                    case "date":
                        $type = 'DateType';
                        break;

                    case "timestamp":
                        $type = 'TimestampType';
                        break;

                    default:
                        $type = 'StringType';
                }
            }

            $fields[] = [
                'fieldName' => $field['fieldName'],
                'fieldType' => $type,
                'fieldRequired' => $field['nullable']
            ];
        }

        return $fields;
    }
private function mapScalarFields ( array $ fullFields ) { $ fields = [ ] ; foreach ( $ fullFields as $ field ) { if ( ! empty ( $ field [ 'id' ] ) ) { $ type = 'IdType' ; } else { switch ( $ field [ 'type' ] ) { case "integer" : $ type = 'IntType' ; break ; case "datetime" : $ type = 'DateTimeType' ; break ; case "float" : $ type = 'FloatType' ; break ; case "boolean" : $ type = 'BooleanType' ; break ; case "date" : $ type = 'DateType' ; break ; case "timestamp" : $ type = 'TimestampType' ; break ; default : $ type = 'StringType' ; } } $ fields [ ] = [ 'fieldName' => $ field [ 'fieldName' ] , 'fieldType' => $ type , 'fieldRequired' => $ field [ 'nullable' ] ] ; } return $ fields ; }
Map fields type and required

@param array $fullFields
@return array
Map fields type and required