import { Controller, Get, Param } from '@nestjs/common'; import { ListsService } from './lists.service'; import { ApiParam, ApiTags } from '@nestjs/swagger'; @ApiTags('BackOffice') @Controller('api/v1/lists') export class ListsController { constructor(private readonly listsServices: ListsService) { } /** * Consulta todas filiais cadastradas */ @Get('store') async getAll() { return this.listsServices.GetStoreAll(); } /** * Consulta filiais autorizadas para o usuário */ @Get('store/user/:id') async getByUser(@Param('id') id: number) { return this.listsServices.GetStoreByUser(id); } /** * Consulta tabela de checkouts da filial informada */ @Get('checkout/:store') @ApiParam({name: 'Código da filial',}) async getCheckout(@Param('store') idStore: string) { return this.listsServices.GetCheckout(idStore); } /** * Consulta lista de funcionários para a filial informada nos parâmetros */ @Get('user/:store') async getUser(@Param('store') idStore: string) { return this.listsServices.GetUser(idStore); } /** * Consulta tabela de plano de pagamento para pedido de venda */ @Get('paymentplan/:billindid') async getPaymentPlan(@Param('billindid') billingId: string) { return this.listsServices.GetPaymentPlan(billingId); } /** * Consulta tabela de cobrança para pedido de venda */ @Get('billing/:customerid') async getBillingByCustomer(@Param('customerid') customerId: number) { return this.listsServices.GetBilling(customerId); } /** * Consulta cadastro de parceiros */ @Get('partners') async getPartners() { return this.listsServices.GetPartners(); } /** * Consulta praças para o cadastro de cliente / endereços */ @Get('places') async getPlaces() { return this.listsServices.GetPlaces(); } /** * Consulta praças para o cadastro de cliente / endereços para retira em loja (CODPRINCIPAL = 1004) */ @Get('store-places') async getStorePlaces() { return this.listsServices.GetStorePlaces(); } /** * Consulta ramos de atividade do cliente */ @Get('ramo') async getRamo() { return this.listsServices.GetRamo(); } @Get('supervisores') async getSupervisores() { return this.listsServices.getSupervisores(); } }