ColumnDto.fromJson constructor

ColumnDto.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory ColumnDto.fromJson(Map<String, Object?> json) => ColumnDto(
      name: json['name'] as String,
      type: json['type'] as String,
      rawType: json['rawType'] as String,
      isNullable: json['isNullable'] as bool,
      isPrimaryKey: json['isPrimaryKey'] as bool,
      foreignKey: switch (json['foreignKey']) {
        final fk? => ForeignKeyDto.fromJson(fk as Map<String, Object?>),
        _ => null,
      },
    );