import { Module } from '@nestjs/common';
import { UsersService } from './users.service';
import { UsersController } from './users.controller';
import { MongooseModule } from '@nestjs/mongoose';
import { User, UserSchema } from 'src/schema/user.schema';
import { Otp, OtpSchema } from 'src/schema/otp.schema';
import {
  Map_User_Device,
  Map_User_Device_Schema,
} from '../schema/map-user-device.schema';
import { JwtService } from '@nestjs/jwt';
import { Shipment, ShipmentSchema } from 'src/schema/shipment.schema';
import { Inquiry, InquirySchema } from 'src/schema/inquiry.schema';
import {
  Map_Company_Employee,
  Map_Company_Employee_Schema,
} from 'src/schema/map-company-employees.schema';
import {
  Notification,
  NotificationSchema,
} from 'src/schema/notifications.schema';
import {
  Map_Shipment_Attachment,
  Map_Shipment_Attachment_Schema,
} from 'src/schema/map-shipment-attachment';
import { TwilioProviderModule } from '../twilio/twilio-provider.module';
import { SendMsg91OtpService } from 'src/utils/send-msg91-otp.helper';
import { Admin, AdminSchema } from 'src/schema/admin.schema';

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: User.name, schema: UserSchema },
      { name: Otp.name, schema: OtpSchema },
      { name: Map_User_Device.name, schema: Map_User_Device_Schema },
      { name: Shipment.name, schema: ShipmentSchema },
      { name: Inquiry.name, schema: InquirySchema },
      { name: Map_Company_Employee.name, schema: Map_Company_Employee_Schema },
      { name: Notification.name, schema: NotificationSchema },
      {
        name: Map_Shipment_Attachment.name,
        schema: Map_Shipment_Attachment_Schema,
      },
      {
        name: Admin.name,
        schema: AdminSchema,
      },
    ]),
    TwilioProviderModule,
  ],
  controllers: [UsersController],
  providers: [UsersService, JwtService, SendMsg91OtpService],
})
export class UsersModule {}
