2025-04-09 11:01:35 +05:30
|
|
|
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
|
2025-04-08 12:47:55 +05:30
|
|
|
import { SpContactsService } from './sp-contacts.service';
|
|
|
|
|
import { ApiTags } from '@nestjs/swagger';
|
2025-05-22 17:25:38 +05:30
|
|
|
import { InsertSPContactsDTO, UpdateSPContactsDTO } from 'src/dto/sp-contacts.dto';
|
|
|
|
|
import { SP_CONTACTID_DTO, SP_ID_DTO } from 'src/dto/property.dto';
|
2025-04-08 12:47:55 +05:30
|
|
|
|
|
|
|
|
@Controller('mssql')
|
|
|
|
|
export class SpContactsController {
|
|
|
|
|
|
|
|
|
|
constructor(private readonly spContactsService: SpContactsService) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
|
|
|
@Post('/InactivateSPContact')
|
2025-05-22 17:25:38 +05:30
|
|
|
inactivateSPContact(@Query() body: SP_CONTACTID_DTO) {
|
2025-04-08 12:47:55 +05:30
|
|
|
return this.spContactsService.inactivateSPContact(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
|
|
|
@Get('/GetSPDefaultContact')
|
2025-05-22 17:25:38 +05:30
|
|
|
getSPDefaultcontact(@Query() body: SP_ID_DTO) {
|
2025-04-08 12:47:55 +05:30
|
|
|
return this.spContactsService.getSPDefaultcontacts(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
|
|
|
@Get('/GetSPAllContacts')
|
2025-05-22 17:25:38 +05:30
|
|
|
getSPAllContacts(@Query() body: SP_ID_DTO) {
|
2025-04-08 12:47:55 +05:30
|
|
|
return this.spContactsService.getSpAllContacts(body);
|
|
|
|
|
}
|
2025-04-09 11:01:35 +05:30
|
|
|
|
2025-04-09 11:03:56 +05:30
|
|
|
@ApiTags('SPContacts - Mssql')
|
2025-04-09 11:01:35 +05:30
|
|
|
@Post('/InsertSPContacts')
|
|
|
|
|
insertSPContacts(@Body() body: InsertSPContactsDTO) {
|
|
|
|
|
return this.spContactsService.insertSPContacts(body);
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-09 11:03:56 +05:30
|
|
|
@ApiTags('SPContacts - Mssql')
|
2025-04-09 11:01:35 +05:30
|
|
|
@Post('/SetSPDefaultContact')
|
2025-05-22 17:25:38 +05:30
|
|
|
setSPDefaultcontact(@Query() body: SP_CONTACTID_DTO) {
|
2025-04-09 11:01:35 +05:30
|
|
|
return this.spContactsService.setSPDefaultcontact(body);
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-10 17:14:18 +05:30
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
|
|
|
@Put('/UpdateSPContacts')
|
|
|
|
|
updateSPContacts(@Body() body: UpdateSPContactsDTO) {
|
|
|
|
|
return this.spContactsService.updateSPContacts(body);
|
|
|
|
|
}
|
2025-04-08 12:47:55 +05:30
|
|
|
}
|