public function withTypeInColumnMap(string $columnName, array $columnValueClassTypeMap)
    {
        foreach ($columnValueClassTypeMap as $columnValue => $classType) {
            $this->withTypeInColumn($columnName, $columnValue)->asType($classType);
        }

        if (!isset($this->parentDefinition->getAllColumns()[$columnName])) {
            $this->parentDefinition->column($columnName)->asEnum(array_keys($columnValueClassTypeMap));
        }
    }
public function withTypeInColumnMap(string $columnName, array $columnValueClassTypeMap)
    {
        foreach ($columnValueClassTypeMap as $columnValue => $classType) {
            $this->withTypeInColumn($columnName, $columnValue)->asType($classType);
        }

        if (!isset($this->parentDefinition->getAllColumns()[$columnName])) {
            $this->parentDefinition->column($columnName)->asEnum(array_keys($columnValueClassTypeMap));
        }
    }
public function withTypeInColumnMap ( string $ columnName , array $ columnValueClassTypeMap ) { foreach ( $ columnValueClassTypeMap as $ columnValue => $ classType ) { $ this -> withTypeInColumn ( $ columnName , $ columnValue ) -> asType ( $ classType ) ; } if ( ! isset ( $ this -> parentDefinition -> getAllColumns ( ) [ $ columnName ] ) ) { $ this -> parentDefinition -> column ( $ columnName ) -> asEnum ( array_keys ( $ columnValueClassTypeMap ) ) ; } }
Defines the of class type of the object to be determined
via the value of a column. This is a shortcut for a group
of subclasses without any extra properties. This will create
an ENUM column with the supplied

This is the using the single table inheritance pattern.

**Example:**
<code>
$map->type(Car::class);
$map->toTable('cars');

$map->idToPrimaryKey('id');
$map->property('brand')->to('brand')->asVarchar(255);

$map->subclass()->withTypeInColumnMap('type', [
'sedan'       => SedanCar::class,
'hatch'       => HatchCar::class,
'convertible' => ConvertibleCar::class,
'family'      => FamilyCar::class,
]);

</code>

**This will create a schema as such:**
<code>
| players                                                  |
|--------|-------------------------------------------------|
| id     | INT PRIMARY KEY                                 |
| brand  | VARCHAR(255)                                    |
| type   | ENUM('sedan', 'hatch', 'convertible', 'family') |
</code>

@param string   $columnName
@param string[] $columnValueClassTypeMap

@return void
Defines the of class type of the object to be determined via the value of a column . This is a shortcut for a group of subclasses without any extra properties . This will create an ENUM column with the supplied