use generic db instead of mongoose in model