ModelFieldDefinition class

Constructors

ModelFieldDefinition({required String name, required ModelFieldType type, required bool isRequired, bool isArray = false, bool isReadOnly = false, ModelAssociation? association, List<AuthRule>? authRules})
const

Properties

association ModelAssociation?
final
authRules List<AuthRule>?
final
hashCode int
The hash code for this object.
no setterinherited
isArray bool
final
isReadOnly bool
final
isRequired bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ModelFieldType
final

Methods

build() ModelField
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

Static Methods

belongsTo({required QueryField<Object?> key, bool isRequired = true, required String ofModelName, QueryField<Object?>? associatedKey, String? targetName, List<String>? targetNames}) ModelFieldDefinition
customTypeField({required String fieldName, bool isRequired = true, bool isArray = false, ModelFieldType ofType = const ModelFieldType(ModelFieldTypeEnum.string)}) ModelFieldDefinition
embedded({required String fieldName, bool isRequired = true, bool isArray = false, ModelFieldType ofType = const ModelFieldType(ModelFieldTypeEnum.string)}) ModelFieldDefinition
field({required QueryField<Object?> key, bool isRequired = true, bool isArray = false, bool isReadOnly = false, ModelFieldType ofType = const ModelFieldType(ModelFieldTypeEnum.string), ModelAssociation? association, List<AuthRule>? authRules}) ModelFieldDefinition
hasMany({required QueryField<Object?> key, bool isRequired = true, required String ofModelName, required QueryField<Object?> associatedKey}) ModelFieldDefinition
hasOne({required QueryField<Object?> key, bool isRequired = true, required String ofModelName, required QueryField<Object?> associatedKey}) ModelFieldDefinition
id({String name = 'id'}) ModelFieldDefinition
idKey(QueryField<Object?> key) ModelFieldDefinition
nonQueryField({required String fieldName, bool isRequired = true, bool isArray = false, bool isReadOnly = false, ModelFieldType ofType = const ModelFieldType(ModelFieldTypeEnum.string), ModelAssociation? association, List<AuthRule>? authRules}) ModelFieldDefinition