Model class

Model Document.

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

Constructors

Model({required String name, String? dbName, required List<Field> fields, Map<String, Field>? fieldsMap, required List<List<String>> uniqueFields, required List<UniqueIndex> uniqueIndexes, String? documentation, PrimaryKey? primaryKey})
Create a new model.
Model.fromJson(Map<String, dynamic> json)
Model from JSON factory constructor.
factory

Properties

dbName String?
Database name.
final
documentation String?
documentation.
final
extra Map<String, dynamic>?
safe net for additional new props
getter/setter pair
fields List<Field>
Model fields.
final
fieldsMap Map<String, Field>?
Field map.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Model name.
final
primaryKey PrimaryKey?
Primary key.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uniqueFields List<List<String>>
Unique fields.
final
uniqueIndexes List<UniqueIndex>
Unique indexes.
final

Methods

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

Operators

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