DBModel class abstract

An abstract class that represents a database model with serialization capabilities.

The DBModel class provides a blueprint for creating database models that can be converted into a map of parameters for MongoDB operations. It also provides a utility method to convert a list of such models into a list of maps, which can be useful for batch operations.

Constructors

DBModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toParams({Db? db}) Future<Map<String, Object?>>
Converts the model instance to a map of parameters for MongoDB operations.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

toListParams(List<DBModel> list, {Db? db}) Future<List<Map<String, Object?>>>
Converts a list of DBModel instances to a list of maps for MongoDB operations.