FieldInfo.id constructor

FieldInfo.id({
  1. required String name,
  2. String? columnName,
  3. String type = 'String',
})

Create a field for the primary key.

Implementation

factory FieldInfo.id({
  required String name,
  String? columnName,
  String type = 'String',
}) {
  return FieldInfo(
    name: name,
    columnName: columnName ?? name,
    type: type,
    isId: true,
  );
}