import PlansList from "../../Models/Plans/Plans";
import { FindPlansParams, IPlan } from "../../Models/Plans/Plans.interface";
import { connect } from "mongoose";

export class PlanService {
    public async findPlans(data: FindPlansParams): Promise<IPlan[]> {
        await connect(`${process.env.DATABASE_CONNECTION}`);
        const plans = await PlansList.find(data);
        return plans;
    }
}
