feat(customers): add DTOs for individual and legal customer creation
- Created CreateCustomerIndividualDto for individual customer data with fields: first_name, last_name, national_code, postal_code, is_favorite, and economic_code. - Created CreateCustomerLegalDto for legal customer data with fields: company_name, economic_code, registration_number, and postal_code.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { reqTokenPayload } from '../auth/current-user.decorator'
|
||||
import { CreateSalesInvoiceDto } from './dto/create-sales-invoice.dto'
|
||||
import { SalesInvoicesService } from './sales-invoices.service'
|
||||
|
||||
@Controller('sales_invoices')
|
||||
@@ -16,7 +18,7 @@ export class SalesInvoicesController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() data: any) {
|
||||
return this.salesInvoicesService.create(data)
|
||||
create(@Body() data: CreateSalesInvoiceDto, @reqTokenPayload() account) {
|
||||
return this.salesInvoicesService.create(data, account)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user