FieldInfo class

Information about a model field.

Constructors

FieldInfo({required String name, required String columnName, required String type, bool isId = false, bool isUnique = false, bool isNullable = false, bool isRelation = false, String? defaultValue})
const
FieldInfo.id({required String name, String? columnName, String type = 'String'})
Create a field for the primary key.
factory

Properties

columnName String
The column name in the database (e.g., 'user_id').
final
defaultValue String?
Default value expression (if any).
final
hashCode int
The hash code for this object.
no setterinherited
isId bool
Whether this field is a primary key.
final
isNullable bool
Whether this field is nullable.
final
isRelation bool
Whether this field is a relation (not stored in DB).
final
isUnique bool
Whether this field is a unique key.
final
name String
The field name in Dart (e.g., 'userId').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The Dart type (e.g., 'String', 'int', 'DateTime').
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited