import { createCrudRoutes } from '@/server/utils/generic-crud.routes';
import { MembershipPlan } from '@/server/modules/membership/membership-plan.entity';
import { MembershipPlanSchema, CreateMembershipPlanDto, UpdateMembershipPlanDto } from '@/server/modules/membership/membership-plan.schema';
import { authMiddleware } from '@/server/middleware/auth.middleware';

const membershipPlanRoutes = createCrudRoutes({
  entity: MembershipPlan,
  createSchema: CreateMembershipPlanDto,
  updateSchema: UpdateMembershipPlanDto,
  getSchema: MembershipPlanSchema,
  listSchema: MembershipPlanSchema,
  searchFields: ['name', 'description'],
  // middleware: [ authMiddleware ]
});

export default membershipPlanRoutes;