Closed vladaman closed 3 years ago
So far I have found this solution to our requirement:
class UserModel extends Document<UserModel> {
@override
String get collectionPath => "users";
}
@vladaman Can be set model name.
class UserModel extends Document<UserModel> {
@override
String get modelName => 'users';
}
We'd like to customize the collection name which model class uses. For example we use file name
user_model.dart
withUserModel class
inside. We'd like the collection to be namedusers
.It would be handy to specify collection name using class annotation.