feat: add response DTOs for various services across modules
- Created response DTOs for ConfigService, AppService, AuthService, CatalogsService, AccountsService, BusinessActivityComplexesService, ComplexPosesService, SalesInvoicesService, BusinessActivitiesService, ConsumerBusinessActivityGoodsService, and others. - Implemented Create, FindAll, FindOne, and Update response types for services in consumer, partners, and POS modules. - Added request DTOs for creating and updating goods in the consumer business activities module. - Introduced filtering DTO for partner licenses. - Enhanced response mapping for partner license activations.
This commit is contained in:
@@ -16,7 +16,7 @@ export class consumerCustomersService {
|
||||
type: true,
|
||||
is_favorite: true,
|
||||
created_at: true,
|
||||
customer_individual: {
|
||||
individual: {
|
||||
select: {
|
||||
first_name: true,
|
||||
last_name: true,
|
||||
@@ -25,7 +25,7 @@ export class consumerCustomersService {
|
||||
economic_code: true,
|
||||
},
|
||||
},
|
||||
customer_legal: {
|
||||
legal: {
|
||||
select: {
|
||||
company_name: true,
|
||||
registration_number: true,
|
||||
@@ -39,20 +39,16 @@ export class consumerCustomersService {
|
||||
return {
|
||||
OR: [
|
||||
{
|
||||
customer_individual: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
individual: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
customer_legal: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
legal: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -95,17 +91,15 @@ export class consumerCustomersService {
|
||||
const customer = await this.prisma.customer.update({
|
||||
where: {
|
||||
id: customer_id,
|
||||
customer_legal: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
legal: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
data: {
|
||||
is_favorite: data.is_favorite,
|
||||
customer_legal: {
|
||||
legal: {
|
||||
update: {
|
||||
...data,
|
||||
},
|
||||
@@ -124,18 +118,16 @@ export class consumerCustomersService {
|
||||
const customer = await this.prisma.customer.update({
|
||||
where: {
|
||||
id: customer_id,
|
||||
customer_individual: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
individual: {
|
||||
business_activity: {
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
data: {
|
||||
is_favorite: data.is_favorite,
|
||||
|
||||
customer_individual: {
|
||||
individual: {
|
||||
update: {
|
||||
...data,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user