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:
2026-05-07 20:30:24 +03:30
parent 658496320b
commit fbe7230865
77 changed files with 2065 additions and 1846 deletions
@@ -190,9 +190,9 @@ export type LicenseAccountAllocationWhereInput = {
license_activation_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
account_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
credit_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
credit?: Prisma.XOR<Prisma.PartnerAccountQuotaCreditNullableScalarRelationFilter, Prisma.PartnerAccountQuotaCreditWhereInput> | null
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
}
export type LicenseAccountAllocationOrderByWithRelationInput = {
@@ -202,9 +202,9 @@ export type LicenseAccountAllocationOrderByWithRelationInput = {
license_activation_id?: Prisma.SortOrderInput | Prisma.SortOrder
account_id?: Prisma.SortOrderInput | Prisma.SortOrder
credit_id?: Prisma.SortOrderInput | Prisma.SortOrder
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
account?: Prisma.ConsumerAccountOrderByWithRelationInput
credit?: Prisma.PartnerAccountQuotaCreditOrderByWithRelationInput
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
_relevance?: Prisma.LicenseAccountAllocationOrderByRelevanceInput
}
@@ -218,9 +218,9 @@ export type LicenseAccountAllocationWhereUniqueInput = Prisma.AtLeast<{
created_at?: Prisma.DateTimeFilter<"LicenseAccountAllocation"> | Date | string
updated_at?: Prisma.DateTimeFilter<"LicenseAccountAllocation"> | Date | string
license_activation_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
credit?: Prisma.XOR<Prisma.PartnerAccountQuotaCreditNullableScalarRelationFilter, Prisma.PartnerAccountQuotaCreditWhereInput> | null
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
}, "id" | "account_id" | "credit_id">
export type LicenseAccountAllocationOrderByWithAggregationInput = {
@@ -251,9 +251,9 @@ export type LicenseAccountAllocationCreateInput = {
id?: string
created_at?: Date | string
updated_at?: Date | string
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccount_allocationInput
credit?: Prisma.PartnerAccountQuotaCreditCreateNestedOneWithoutAllocationInput
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
}
export type LicenseAccountAllocationUncheckedCreateInput = {
@@ -269,9 +269,9 @@ export type LicenseAccountAllocationUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
account?: Prisma.ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput
credit?: Prisma.PartnerAccountQuotaCreditUpdateOneWithoutAllocationNestedInput
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
}
export type LicenseAccountAllocationUncheckedUpdateInput = {
@@ -519,8 +519,8 @@ export type LicenseAccountAllocationCreateWithoutCreditInput = {
id?: string
created_at?: Date | string
updated_at?: Date | string
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccount_allocationInput
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
}
export type LicenseAccountAllocationUncheckedCreateWithoutCreditInput = {
@@ -551,8 +551,8 @@ export type LicenseAccountAllocationUpdateWithoutCreditInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
account?: Prisma.ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
}
export type LicenseAccountAllocationUncheckedUpdateWithoutCreditInput = {
@@ -567,8 +567,8 @@ export type LicenseAccountAllocationCreateWithoutAccountInput = {
id?: string
created_at?: Date | string
updated_at?: Date | string
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
credit?: Prisma.PartnerAccountQuotaCreditCreateNestedOneWithoutAllocationInput
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
}
export type LicenseAccountAllocationUncheckedCreateWithoutAccountInput = {
@@ -599,8 +599,8 @@ export type LicenseAccountAllocationUpdateWithoutAccountInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
credit?: Prisma.PartnerAccountQuotaCreditUpdateOneWithoutAllocationNestedInput
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
}
export type LicenseAccountAllocationUncheckedUpdateWithoutAccountInput = {
@@ -652,9 +652,9 @@ export type LicenseAccountAllocationSelect<ExtArgs extends runtime.Types.Extensi
license_activation_id?: boolean
account_id?: boolean
credit_id?: boolean
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
account?: boolean | Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>
credit?: boolean | Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
}, ExtArgs["result"]["licenseAccountAllocation"]>
@@ -670,17 +670,17 @@ export type LicenseAccountAllocationSelectScalar = {
export type LicenseAccountAllocationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "created_at" | "updated_at" | "license_activation_id" | "account_id" | "credit_id", ExtArgs["result"]["licenseAccountAllocation"]>
export type LicenseAccountAllocationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
account?: boolean | Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>
credit?: boolean | Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
}
export type $LicenseAccountAllocationPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "LicenseAccountAllocation"
objects: {
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
account: Prisma.$ConsumerAccountPayload<ExtArgs> | null
credit: Prisma.$PartnerAccountQuotaCreditPayload<ExtArgs> | null
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
@@ -1029,9 +1029,9 @@ readonly fields: LicenseAccountAllocationFieldRefs;
*/
export interface Prisma__LicenseAccountAllocationClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
license_activation<T extends Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
account<T extends Prisma.LicenseAccountAllocation$accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
credit<T extends Prisma.LicenseAccountAllocation$creditArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>>): Prisma.Prisma__PartnerAccountQuotaCreditClient<runtime.Types.Result.GetResult<Prisma.$PartnerAccountQuotaCreditPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
license_activation<T extends Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1414,25 +1414,6 @@ export type LicenseAccountAllocationDeleteManyArgs<ExtArgs extends runtime.Types
limit?: number
}
/**
* LicenseAccountAllocation.license_activation
*/
export type LicenseAccountAllocation$license_activationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the LicenseActivation
*/
select?: Prisma.LicenseActivationSelect<ExtArgs> | null
/**
* Omit specific fields from the LicenseActivation
*/
omit?: Prisma.LicenseActivationOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.LicenseActivationInclude<ExtArgs> | null
where?: Prisma.LicenseActivationWhereInput
}
/**
* LicenseAccountAllocation.account
*/
@@ -1471,6 +1452,25 @@ export type LicenseAccountAllocation$creditArgs<ExtArgs extends runtime.Types.Ex
where?: Prisma.PartnerAccountQuotaCreditWhereInput
}
/**
* LicenseAccountAllocation.license_activation
*/
export type LicenseAccountAllocation$license_activationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the LicenseActivation
*/
select?: Prisma.LicenseActivationSelect<ExtArgs> | null
/**
* Omit specific fields from the LicenseActivation
*/
omit?: Prisma.LicenseActivationOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.LicenseActivationInclude<ExtArgs> | null
where?: Prisma.LicenseActivationWhereInput
}
/**
* LicenseAccountAllocation without action
*/