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:
@@ -385,6 +385,8 @@ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRe
|
||||
|
||||
export const ModelName = {
|
||||
Customer: 'Customer',
|
||||
CustomerIndividual: 'CustomerIndividual',
|
||||
CustomerLegal: 'CustomerLegal',
|
||||
Device: 'Device',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
@@ -409,7 +411,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "customer" | "device" | "good" | "goodCategory" | "triggerLog" | "salesInvoice" | "salesInvoiceItem" | "salesInvoicePayment" | "service" | "serviceCategory"
|
||||
modelProps: "customer" | "customerIndividual" | "customerLegal" | "device" | "good" | "goodCategory" | "triggerLog" | "salesInvoice" | "salesInvoiceItem" | "salesInvoicePayment" | "service" | "serviceCategory"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -479,6 +481,138 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
CustomerIndividual: {
|
||||
payload: Prisma.$CustomerIndividualPayload<ExtArgs>
|
||||
fields: Prisma.CustomerIndividualFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.CustomerIndividualFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.CustomerIndividualFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.CustomerIndividualFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.CustomerIndividualFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.CustomerIndividualFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.CustomerIndividualCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.CustomerIndividualCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.CustomerIndividualDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.CustomerIndividualUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.CustomerIndividualDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.CustomerIndividualUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.CustomerIndividualUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerIndividualPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.CustomerIndividualAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateCustomerIndividual>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.CustomerIndividualGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.CustomerIndividualGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.CustomerIndividualCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.CustomerIndividualCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
CustomerLegal: {
|
||||
payload: Prisma.$CustomerLegalPayload<ExtArgs>
|
||||
fields: Prisma.CustomerLegalFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.CustomerLegalFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.CustomerLegalFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.CustomerLegalFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.CustomerLegalFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.CustomerLegalFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.CustomerLegalCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.CustomerLegalCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.CustomerLegalDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.CustomerLegalUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.CustomerLegalDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.CustomerLegalUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.CustomerLegalUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$CustomerLegalPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.CustomerLegalAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateCustomerLegal>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.CustomerLegalGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.CustomerLegalGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.CustomerLegalCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.CustomerLegalCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Device: {
|
||||
payload: Prisma.$DevicePayload<ExtArgs>
|
||||
fields: Prisma.DeviceFieldRefs
|
||||
@@ -1114,22 +1248,42 @@ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
email: 'email',
|
||||
mobile_number: 'mobile_number',
|
||||
address: 'address',
|
||||
is_active: 'is_active',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at'
|
||||
deleted_at: 'deleted_at',
|
||||
type: 'type',
|
||||
complex_id: 'complex_id',
|
||||
is_favorite: 'is_favorite'
|
||||
} as const
|
||||
|
||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualScalarFieldEnum = {
|
||||
customer_id: 'customer_id',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualScalarFieldEnum = (typeof CustomerIndividualScalarFieldEnum)[keyof typeof CustomerIndividualScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalScalarFieldEnum = {
|
||||
customer_id: 'customer_id',
|
||||
company_name: 'company_name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||
|
||||
|
||||
export const DeviceScalarFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
@@ -1197,7 +1351,9 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
total_amount: 'total_amount',
|
||||
description: 'description',
|
||||
notes: 'notes',
|
||||
unknown_customer: 'unknown_customer',
|
||||
invoice_date: 'invoice_date',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
customer_id: 'customer_id',
|
||||
@@ -1215,6 +1371,9 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
||||
unit_price: 'unit_price',
|
||||
total_amount: 'total_amount',
|
||||
created_at: 'created_at',
|
||||
discount: 'discount',
|
||||
notes: 'notes',
|
||||
pricingModel: 'pricingModel',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id',
|
||||
@@ -1296,18 +1455,37 @@ export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
email: 'email',
|
||||
mobile_number: 'mobile_number',
|
||||
address: 'address',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualOrderByRelevanceFieldEnum = {
|
||||
customer_id: 'customer_id',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualOrderByRelevanceFieldEnum = (typeof CustomerIndividualOrderByRelevanceFieldEnum)[keyof typeof CustomerIndividualOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalOrderByRelevanceFieldEnum = {
|
||||
customer_id: 'customer_id',
|
||||
company_name: 'company_name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const DeviceOrderByRelevanceFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
@@ -1362,18 +1540,6 @@ export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
description: 'description',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: DbNull,
|
||||
JsonNull: JsonNull,
|
||||
@@ -1391,8 +1557,21 @@ export const QueryMode = {
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
notes: 'notes',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceItemOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
notes: 'notes',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id'
|
||||
@@ -1450,16 +1629,23 @@ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel,
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Boolean'
|
||||
* Reference to a field of type 'DateTime'
|
||||
*/
|
||||
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
|
||||
export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'DateTime'
|
||||
* Reference to a field of type 'CustomerType'
|
||||
*/
|
||||
export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
|
||||
export type EnumCustomerTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CustomerType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Boolean'
|
||||
*/
|
||||
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
|
||||
|
||||
|
||||
|
||||
@@ -1477,13 +1663,6 @@ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'In
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'UnitType'
|
||||
*/
|
||||
export type EnumUnitTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UnitType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Json'
|
||||
*/
|
||||
@@ -1498,6 +1677,20 @@ export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$Prisma
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'UnitType'
|
||||
*/
|
||||
export type EnumUnitTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UnitType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'SalesInvoiceItemPricingModel'
|
||||
*/
|
||||
export type EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SalesInvoiceItemPricingModel'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'PaymentMethodType'
|
||||
*/
|
||||
@@ -1607,6 +1800,8 @@ export type PrismaClientOptions = ({
|
||||
}
|
||||
export type GlobalOmitConfig = {
|
||||
customer?: Prisma.CustomerOmit
|
||||
customerIndividual?: Prisma.CustomerIndividualOmit
|
||||
customerLegal?: Prisma.CustomerLegalOmit
|
||||
device?: Prisma.DeviceOmit
|
||||
good?: Prisma.GoodOmit
|
||||
goodCategory?: Prisma.GoodCategoryOmit
|
||||
|
||||
Reference in New Issue
Block a user