Every database model must implment MongoDbModel.
Define your table name in geTableName method.
Example of the implementation of MongoDbModel.
public class MyUser implements MongoDbModel, User {
@Id
private final UUID uuid;
private double coins;
public static final String COLLECTION_NAME = "users";
public MyUser(UUID uuid, double coins) {
this.uuid = uuid;
this.coins = coins;
}
//getters and setters
@Override
public String getCollectionName() {
return COLLECTION_NAME;
}
@Override //you can create your own DAO (optional)
public Dao getDao() {
return new MongoDbMyUserDao(this);
}
}