Field class

Annotations
  • @JsonSerializable(createFactory: true, createToJson: true, explicitToJson: true)

Constructors

Field({required FieldKind kind, required String name, required bool isRequired, required bool isList, required bool isUnique, required bool isId, required bool isReadOnly, bool? isGenerated, required bool? isUpdatedAt, required String type, List<String>? dbNames, required bool hasDefaultValue, dynamic $default, List<String>? relationFromFields, List? relationToFields, String? relationOnDelete, String? relationName, String? documentation})
Create a new field.
Field.fromJson(Map<String, dynamic> json)
Field from JSON factory constructor.
factory

Properties

$default → dynamic
default value.
final
additionalProperties Map<String, dynamic>?
Safe net for additional new props
getter/setter pair
dbNames List<String>?
Database names
final
documentation String?
documentation
final
hasDefaultValue bool
Has default value.
final
hashCode int
The hash code for this object.
no setterinherited
isGenerated bool?
Is a generated field.
final
isId bool
The field is Identifier.
final
isList bool
The Field is a list.
final
isReadOnly bool
The field is readonly.
final
isRequired bool
Is required.
final
isUnique bool
The field is unique.
final
isUpdatedAt bool?
Is updated at, Auto update DateTime field.
final
kind FieldKind
Field kind.
final
name String
Field name.
final
relationFromFields List<String>?
Relation from fields
final
relationName String?
relation name
final
relationOnDelete String?
Relation on delete
final
relationToFields List?
Relation to fields
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Describes the data type in the same the way is is defined in the Prisma schema:
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Field as JSON map.
toString() String
Field as JSON string.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String key) → dynamic
[] operator.