import { connect } from "mongoose";
import {
    PaginateServicesResults,
    SysAdminPaginateServicesParams,
    SysAdminSetServiceBannedParams,
} from "../../../Models/Services/Service.Interface";
import ServiceList from "../../../Models/Services/Service";

export class SA_ServicesService {
    public async sysAdminPaginate(data: SysAdminPaginateServicesParams): Promise<PaginateServicesResults> {
        await connect(`${process.env.DATABASE_CONNECTION}`);
        return await ServiceList.sysAdminPaginate(data);
    }

    public async sysAdminSetBanned(data: SysAdminSetServiceBannedParams): Promise<void> {
        await connect(`${process.env.DATABASE_CONNECTION}`);
        return await ServiceList.sysAdminSetBanned(data);
    }
}
