toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'name': name,
  if (schema != null) 'schema': schema,
  if (type != null) 'type': type,
  if (sizeBytes != null) 'sizeBytes': sizeBytes,
  if (comment != null) 'comment': comment,
  if (engine != null) 'engine': engine,
  if (fields.isNotEmpty)
    'fields': fields.map((column) => column.toJson()).toList(),
};