toTable method

Convert defined constant tables into SqfEntityTableBase

Implementation

SqfEntityTableBase toTable(SqfEntityTable table) {
  return SqfEntityTableBase()
    ..tableName = table.tableName
    ..modelName = table.modelName
    ..primaryKeyName = table.primaryKeyName
    ..primaryKeyType = table.primaryKeyType
    ..useSoftDeleting = table.useSoftDeleting ?? false
    ..defaultJsonUrl = table.defaultJsonUrl
    ..customCode = table.customCode
    ..objectType = table.objectType
    ..fields = toFields(table)
    ..abstractModelName = table.abstractModelName
    ..init();
}