feat: add stock keeping units management
- Created migration to drop `type` column from `stock_keeping_units` table. - Added `Guild` model to Prisma schema. - Implemented `BusinessActivitiesQueryService` for querying business activities. - Developed `GoodsSharedService` for handling goods creation and updates. - Introduced DTOs for creating and updating stock keeping units. - Created controller and service for managing stock keeping units. - Implemented response DTOs for stock keeping units service. - Established module for stock keeping units management.
This commit is contained in:
@@ -416,13 +416,13 @@ export const ModelName = {
|
||||
Pos: 'Pos',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
Guild: 'Guild',
|
||||
MeasureUnits: 'MeasureUnits',
|
||||
StockKeepingUnits: 'StockKeepingUnits',
|
||||
TriggerLog: 'TriggerLog',
|
||||
Customer: 'Customer',
|
||||
CustomerIndividual: 'CustomerIndividual',
|
||||
CustomerLegal: 'CustomerLegal',
|
||||
Guild: 'Guild',
|
||||
SalesInvoice: 'SalesInvoice',
|
||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||
SaleInvoiceTspAttempts: 'SaleInvoiceTspAttempts',
|
||||
@@ -445,7 +445,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "good" | "goodCategory" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "guild" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceTspAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "good" | "goodCategory" | "guild" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceTspAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -2561,6 +2561,72 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Guild: {
|
||||
payload: Prisma.$GuildPayload<ExtArgs>
|
||||
fields: Prisma.GuildFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.GuildFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.GuildFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.GuildFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.GuildFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.GuildFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.GuildCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.GuildCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.GuildDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.GuildUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.GuildDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.GuildUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.GuildUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.GuildAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateGuild>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.GuildGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.GuildGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.GuildCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.GuildCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
MeasureUnits: {
|
||||
payload: Prisma.$MeasureUnitsPayload<ExtArgs>
|
||||
fields: Prisma.MeasureUnitsFieldRefs
|
||||
@@ -2957,72 +3023,6 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Guild: {
|
||||
payload: Prisma.$GuildPayload<ExtArgs>
|
||||
fields: Prisma.GuildFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.GuildFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.GuildFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.GuildFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.GuildFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.GuildFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.GuildCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.GuildCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.GuildDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.GuildUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.GuildDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.GuildUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.GuildUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$GuildPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.GuildAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateGuild>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.GuildGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.GuildGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.GuildCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.GuildCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
SalesInvoice: {
|
||||
payload: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
fields: Prisma.SalesInvoiceFieldRefs
|
||||
@@ -3695,10 +3695,10 @@ export const PartnerScalarFieldEnum = {
|
||||
name: 'name',
|
||||
code: 'code',
|
||||
status: 'status',
|
||||
tsp_provider: 'tsp_provider',
|
||||
logo_url: 'logo_url',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
updated_at: 'updated_at',
|
||||
tsp_provider: 'tsp_provider'
|
||||
} as const
|
||||
|
||||
export type PartnerScalarFieldEnum = (typeof PartnerScalarFieldEnum)[keyof typeof PartnerScalarFieldEnum]
|
||||
@@ -3939,6 +3939,18 @@ export const GoodCategoryScalarFieldEnum = {
|
||||
export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum]
|
||||
|
||||
|
||||
export const GuildScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
invoice_template: 'invoice_template',
|
||||
code: 'code',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type GuildScalarFieldEnum = (typeof GuildScalarFieldEnum)[keyof typeof GuildScalarFieldEnum]
|
||||
|
||||
|
||||
export const MeasureUnitsScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
@@ -3955,9 +3967,9 @@ export const StockKeepingUnitsScalarFieldEnum = {
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
VAT: 'VAT',
|
||||
type: 'type',
|
||||
is_public: 'is_public',
|
||||
is_domestic: 'is_domestic',
|
||||
guild_id: 'guild_id',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
@@ -4013,18 +4025,6 @@ export const CustomerLegalScalarFieldEnum = {
|
||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||
|
||||
|
||||
export const GuildScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
invoice_template: 'invoice_template',
|
||||
code: 'code',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type GuildScalarFieldEnum = (typeof GuildScalarFieldEnum)[keyof typeof GuildScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
@@ -4517,6 +4517,15 @@ export const GoodCategoryOrderByRelevanceFieldEnum = {
|
||||
export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GuildOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldEnum)[keyof typeof GuildOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const MeasureUnitsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
@@ -4529,7 +4538,8 @@ export type MeasureUnitsOrderByRelevanceFieldEnum = (typeof MeasureUnitsOrderByR
|
||||
export const StockKeepingUnitsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
guild_id: 'guild_id'
|
||||
} as const
|
||||
|
||||
export type StockKeepingUnitsOrderByRelevanceFieldEnum = (typeof StockKeepingUnitsOrderByRelevanceFieldEnum)[keyof typeof StockKeepingUnitsOrderByRelevanceFieldEnum]
|
||||
@@ -4576,15 +4586,6 @@ export const CustomerLegalOrderByRelevanceFieldEnum = {
|
||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GuildOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldEnum)[keyof typeof GuildOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
@@ -4853,9 +4854,9 @@ export type EnumGoodPricingModelFieldRefInput<$PrismaModel> = FieldRefInputType<
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'SKUGuildType'
|
||||
* Reference to a field of type 'InvoiceTemplateType'
|
||||
*/
|
||||
export type EnumSKUGuildTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SKUGuildType'>
|
||||
export type EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'InvoiceTemplateType'>
|
||||
|
||||
|
||||
|
||||
@@ -4866,13 +4867,6 @@ export type EnumCustomerTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$Pri
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'InvoiceTemplateType'
|
||||
*/
|
||||
export type EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'InvoiceTemplateType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'TspProviderRequestType'
|
||||
*/
|
||||
@@ -5027,13 +5021,13 @@ export type GlobalOmitConfig = {
|
||||
pos?: Prisma.PosOmit
|
||||
good?: Prisma.GoodOmit
|
||||
goodCategory?: Prisma.GoodCategoryOmit
|
||||
guild?: Prisma.GuildOmit
|
||||
measureUnits?: Prisma.MeasureUnitsOmit
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsOmit
|
||||
triggerLog?: Prisma.TriggerLogOmit
|
||||
customer?: Prisma.CustomerOmit
|
||||
customerIndividual?: Prisma.CustomerIndividualOmit
|
||||
customerLegal?: Prisma.CustomerLegalOmit
|
||||
guild?: Prisma.GuildOmit
|
||||
salesInvoice?: Prisma.SalesInvoiceOmit
|
||||
salesInvoiceItem?: Prisma.SalesInvoiceItemOmit
|
||||
saleInvoiceTspAttempts?: Prisma.SaleInvoiceTspAttemptsOmit
|
||||
|
||||
Reference in New Issue
Block a user