feat: implement purchase receipt items management with create, update, find, and delete functionalities
feat: add purchase receipts management with create, update, find, and delete functionalities feat: implement sales invoice items management with create, update, find, and delete functionalities feat: add sales invoices management with create, update, find, and delete functionalities feat: implement stock adjustments management with create, update, find, and delete functionalities feat: add stock balance retrieval functionality feat: implement stock movements management with create, update, find, and delete functionalities
This commit is contained in:
@@ -0,0 +1,803 @@
|
||||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This file exports the `stock_cardex` model and its related types.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
import type * as runtime from "@prisma/client/runtime/client"
|
||||
import type * as $Enums from "../enums.js"
|
||||
import type * as Prisma from "../internal/prismaNamespace.js"
|
||||
|
||||
/**
|
||||
* Model stock_cardex
|
||||
*
|
||||
*/
|
||||
export type stock_cardexModel = runtime.Types.Result.DefaultSelection<Prisma.$stock_cardexPayload>
|
||||
|
||||
export type AggregateStock_cardex = {
|
||||
_count: Stock_cardexCountAggregateOutputType | null
|
||||
_avg: Stock_cardexAvgAggregateOutputType | null
|
||||
_sum: Stock_cardexSumAggregateOutputType | null
|
||||
_min: Stock_cardexMinAggregateOutputType | null
|
||||
_max: Stock_cardexMaxAggregateOutputType | null
|
||||
}
|
||||
|
||||
export type Stock_cardexAvgAggregateOutputType = {
|
||||
productId: number | null
|
||||
movement_id: number | null
|
||||
quantity: runtime.Decimal | null
|
||||
fee: runtime.Decimal | null
|
||||
totalCost: runtime.Decimal | null
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type Stock_cardexSumAggregateOutputType = {
|
||||
productId: number | null
|
||||
movement_id: number | null
|
||||
quantity: runtime.Decimal | null
|
||||
fee: runtime.Decimal | null
|
||||
totalCost: runtime.Decimal | null
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type Stock_cardexMinAggregateOutputType = {
|
||||
productId: number | null
|
||||
movement_id: number | null
|
||||
type: $Enums.stock_cardex_type | null
|
||||
quantity: runtime.Decimal | null
|
||||
fee: runtime.Decimal | null
|
||||
totalCost: runtime.Decimal | null
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
createdAt: Date | null
|
||||
}
|
||||
|
||||
export type Stock_cardexMaxAggregateOutputType = {
|
||||
productId: number | null
|
||||
movement_id: number | null
|
||||
type: $Enums.stock_cardex_type | null
|
||||
quantity: runtime.Decimal | null
|
||||
fee: runtime.Decimal | null
|
||||
totalCost: runtime.Decimal | null
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
createdAt: Date | null
|
||||
}
|
||||
|
||||
export type Stock_cardexCountAggregateOutputType = {
|
||||
productId: number
|
||||
movement_id: number
|
||||
type: number
|
||||
quantity: number
|
||||
fee: number
|
||||
totalCost: number
|
||||
balance_quantity: number
|
||||
balance_avg_cost: number
|
||||
createdAt: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
|
||||
export type Stock_cardexAvgAggregateInputType = {
|
||||
productId?: true
|
||||
movement_id?: true
|
||||
quantity?: true
|
||||
fee?: true
|
||||
totalCost?: true
|
||||
balance_quantity?: true
|
||||
balance_avg_cost?: true
|
||||
}
|
||||
|
||||
export type Stock_cardexSumAggregateInputType = {
|
||||
productId?: true
|
||||
movement_id?: true
|
||||
quantity?: true
|
||||
fee?: true
|
||||
totalCost?: true
|
||||
balance_quantity?: true
|
||||
balance_avg_cost?: true
|
||||
}
|
||||
|
||||
export type Stock_cardexMinAggregateInputType = {
|
||||
productId?: true
|
||||
movement_id?: true
|
||||
type?: true
|
||||
quantity?: true
|
||||
fee?: true
|
||||
totalCost?: true
|
||||
balance_quantity?: true
|
||||
balance_avg_cost?: true
|
||||
createdAt?: true
|
||||
}
|
||||
|
||||
export type Stock_cardexMaxAggregateInputType = {
|
||||
productId?: true
|
||||
movement_id?: true
|
||||
type?: true
|
||||
quantity?: true
|
||||
fee?: true
|
||||
totalCost?: true
|
||||
balance_quantity?: true
|
||||
balance_avg_cost?: true
|
||||
createdAt?: true
|
||||
}
|
||||
|
||||
export type Stock_cardexCountAggregateInputType = {
|
||||
productId?: true
|
||||
movement_id?: true
|
||||
type?: true
|
||||
quantity?: true
|
||||
fee?: true
|
||||
totalCost?: true
|
||||
balance_quantity?: true
|
||||
balance_avg_cost?: true
|
||||
createdAt?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
export type Stock_cardexAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Filter which stock_cardex to aggregate.
|
||||
*/
|
||||
where?: Prisma.stock_cardexWhereInput
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
||||
*
|
||||
* Determine the order of stock_cardexes to fetch.
|
||||
*/
|
||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Take `±n` stock_cardexes from the position of the cursor.
|
||||
*/
|
||||
take?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Skip the first `n` stock_cardexes.
|
||||
*/
|
||||
skip?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||
*
|
||||
* Count returned stock_cardexes
|
||||
**/
|
||||
_count?: true | Stock_cardexCountAggregateInputType
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||
*
|
||||
* Select which fields to average
|
||||
**/
|
||||
_avg?: Stock_cardexAvgAggregateInputType
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||
*
|
||||
* Select which fields to sum
|
||||
**/
|
||||
_sum?: Stock_cardexSumAggregateInputType
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||
*
|
||||
* Select which fields to find the minimum value
|
||||
**/
|
||||
_min?: Stock_cardexMinAggregateInputType
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||
*
|
||||
* Select which fields to find the maximum value
|
||||
**/
|
||||
_max?: Stock_cardexMaxAggregateInputType
|
||||
}
|
||||
|
||||
export type GetStock_cardexAggregateType<T extends Stock_cardexAggregateArgs> = {
|
||||
[P in keyof T & keyof AggregateStock_cardex]: P extends '_count' | 'count'
|
||||
? T[P] extends true
|
||||
? number
|
||||
: Prisma.GetScalarType<T[P], AggregateStock_cardex[P]>
|
||||
: Prisma.GetScalarType<T[P], AggregateStock_cardex[P]>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export type stock_cardexGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.stock_cardexWhereInput
|
||||
orderBy?: Prisma.stock_cardexOrderByWithAggregationInput | Prisma.stock_cardexOrderByWithAggregationInput[]
|
||||
by: Prisma.Stock_cardexScalarFieldEnum[] | Prisma.Stock_cardexScalarFieldEnum
|
||||
having?: Prisma.stock_cardexScalarWhereWithAggregatesInput
|
||||
take?: number
|
||||
skip?: number
|
||||
_count?: Stock_cardexCountAggregateInputType | true
|
||||
_avg?: Stock_cardexAvgAggregateInputType
|
||||
_sum?: Stock_cardexSumAggregateInputType
|
||||
_min?: Stock_cardexMinAggregateInputType
|
||||
_max?: Stock_cardexMaxAggregateInputType
|
||||
}
|
||||
|
||||
export type Stock_cardexGroupByOutputType = {
|
||||
productId: number
|
||||
movement_id: number
|
||||
type: $Enums.stock_cardex_type
|
||||
quantity: runtime.Decimal
|
||||
fee: runtime.Decimal
|
||||
totalCost: runtime.Decimal
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
createdAt: Date
|
||||
_count: Stock_cardexCountAggregateOutputType | null
|
||||
_avg: Stock_cardexAvgAggregateOutputType | null
|
||||
_sum: Stock_cardexSumAggregateOutputType | null
|
||||
_min: Stock_cardexMinAggregateOutputType | null
|
||||
_max: Stock_cardexMaxAggregateOutputType | null
|
||||
}
|
||||
|
||||
type GetStock_cardexGroupByPayload<T extends stock_cardexGroupByArgs> = Prisma.PrismaPromise<
|
||||
Array<
|
||||
Prisma.PickEnumerable<Stock_cardexGroupByOutputType, T['by']> &
|
||||
{
|
||||
[P in ((keyof T) & (keyof Stock_cardexGroupByOutputType))]: P extends '_count'
|
||||
? T[P] extends boolean
|
||||
? number
|
||||
: Prisma.GetScalarType<T[P], Stock_cardexGroupByOutputType[P]>
|
||||
: Prisma.GetScalarType<T[P], Stock_cardexGroupByOutputType[P]>
|
||||
}
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
|
||||
export type stock_cardexWhereInput = {
|
||||
AND?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[]
|
||||
OR?: Prisma.stock_cardexWhereInput[]
|
||||
NOT?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[]
|
||||
productId?: Prisma.IntFilter<"stock_cardex"> | number
|
||||
movement_id?: Prisma.IntFilter<"stock_cardex"> | number
|
||||
type?: Prisma.Enumstock_cardex_typeFilter<"stock_cardex"> | $Enums.stock_cardex_type
|
||||
quantity?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
fee?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
totalCost?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
balance_quantity?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
balance_avg_cost?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"stock_cardex"> | Date | string
|
||||
}
|
||||
|
||||
export type stock_cardexOrderByWithRelationInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type stock_cardexOrderByWithAggregationInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
_count?: Prisma.stock_cardexCountOrderByAggregateInput
|
||||
_avg?: Prisma.stock_cardexAvgOrderByAggregateInput
|
||||
_max?: Prisma.stock_cardexMaxOrderByAggregateInput
|
||||
_min?: Prisma.stock_cardexMinOrderByAggregateInput
|
||||
_sum?: Prisma.stock_cardexSumOrderByAggregateInput
|
||||
}
|
||||
|
||||
export type stock_cardexScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
||||
productId?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number
|
||||
movement_id?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number
|
||||
type?: Prisma.Enumstock_cardex_typeWithAggregatesFilter<"stock_cardex"> | $Enums.stock_cardex_type
|
||||
quantity?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
fee?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
totalCost?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
balance_quantity?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
balance_avg_cost?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"stock_cardex"> | Date | string
|
||||
}
|
||||
|
||||
export type stock_cardexCountOrderByAggregateInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type stock_cardexAvgOrderByAggregateInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type stock_cardexMaxOrderByAggregateInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type stock_cardexMinOrderByAggregateInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type stock_cardexSumOrderByAggregateInput = {
|
||||
productId?: Prisma.SortOrder
|
||||
movement_id?: Prisma.SortOrder
|
||||
quantity?: Prisma.SortOrder
|
||||
fee?: Prisma.SortOrder
|
||||
totalCost?: Prisma.SortOrder
|
||||
balance_quantity?: Prisma.SortOrder
|
||||
balance_avg_cost?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
|
||||
|
||||
export type stock_cardexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
productId?: boolean
|
||||
movement_id?: boolean
|
||||
type?: boolean
|
||||
quantity?: boolean
|
||||
fee?: boolean
|
||||
totalCost?: boolean
|
||||
balance_quantity?: boolean
|
||||
balance_avg_cost?: boolean
|
||||
createdAt?: boolean
|
||||
}, ExtArgs["result"]["stock_cardex"]>
|
||||
|
||||
|
||||
|
||||
export type stock_cardexSelectScalar = {
|
||||
productId?: boolean
|
||||
movement_id?: boolean
|
||||
type?: boolean
|
||||
quantity?: boolean
|
||||
fee?: boolean
|
||||
totalCost?: boolean
|
||||
balance_quantity?: boolean
|
||||
balance_avg_cost?: boolean
|
||||
createdAt?: boolean
|
||||
}
|
||||
|
||||
export type stock_cardexOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"productId" | "movement_id" | "type" | "quantity" | "fee" | "totalCost" | "balance_quantity" | "balance_avg_cost" | "createdAt", ExtArgs["result"]["stock_cardex"]>
|
||||
|
||||
export type $stock_cardexPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "stock_cardex"
|
||||
objects: {}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
productId: number
|
||||
movement_id: number
|
||||
type: $Enums.stock_cardex_type
|
||||
quantity: runtime.Decimal
|
||||
fee: runtime.Decimal
|
||||
totalCost: runtime.Decimal
|
||||
balance_quantity: runtime.Decimal | null
|
||||
balance_avg_cost: runtime.Decimal | null
|
||||
createdAt: Date
|
||||
}, ExtArgs["result"]["stock_cardex"]>
|
||||
composites: {}
|
||||
}
|
||||
|
||||
export type stock_cardexGetPayload<S extends boolean | null | undefined | stock_cardexDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload, S>
|
||||
|
||||
export type stock_cardexCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
||||
Omit<stock_cardexFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
||||
select?: Stock_cardexCountAggregateInputType | true
|
||||
}
|
||||
|
||||
export interface stock_cardexDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['stock_cardex'], meta: { name: 'stock_cardex' } }
|
||||
/**
|
||||
* Find the first Stock_cardex that matches the filter.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {stock_cardexFindFirstArgs} args - Arguments to find a Stock_cardex
|
||||
* @example
|
||||
* // Get one Stock_cardex
|
||||
* const stock_cardex = await prisma.stock_cardex.findFirst({
|
||||
* where: {
|
||||
* // ... provide filter here
|
||||
* }
|
||||
* })
|
||||
*/
|
||||
findFirst<T extends stock_cardexFindFirstArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindFirstArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
|
||||
/**
|
||||
* Find the first Stock_cardex that matches the filter or
|
||||
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {stock_cardexFindFirstOrThrowArgs} args - Arguments to find a Stock_cardex
|
||||
* @example
|
||||
* // Get one Stock_cardex
|
||||
* const stock_cardex = await prisma.stock_cardex.findFirstOrThrow({
|
||||
* where: {
|
||||
* // ... provide filter here
|
||||
* }
|
||||
* })
|
||||
*/
|
||||
findFirstOrThrow<T extends stock_cardexFindFirstOrThrowArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindFirstOrThrowArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
||||
|
||||
/**
|
||||
* Find zero or more Stock_cardexes that matches the filter.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {stock_cardexFindManyArgs} args - Arguments to filter and select certain fields only.
|
||||
* @example
|
||||
* // Get all Stock_cardexes
|
||||
* const stock_cardexes = await prisma.stock_cardex.findMany()
|
||||
*
|
||||
* // Get first 10 Stock_cardexes
|
||||
* const stock_cardexes = await prisma.stock_cardex.findMany({ take: 10 })
|
||||
*
|
||||
* // Only select the `productId`
|
||||
* const stock_cardexWithProductIdOnly = await prisma.stock_cardex.findMany({ select: { productId: true } })
|
||||
*
|
||||
*/
|
||||
findMany<T extends stock_cardexFindManyArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
||||
orderBy: {}
|
||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindManyArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
||||
|
||||
|
||||
/**
|
||||
* Count the number of Stock_cardexes.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {stock_cardexCountArgs} args - Arguments to filter Stock_cardexes to count.
|
||||
* @example
|
||||
* // Count the number of Stock_cardexes
|
||||
* const count = await prisma.stock_cardex.count({
|
||||
* where: {
|
||||
* // ... the filter for the Stock_cardexes we want to count
|
||||
* }
|
||||
* })
|
||||
**/
|
||||
count<T extends stock_cardexCountArgs>(
|
||||
args?: Prisma.Subset<T, stock_cardexCountArgs>,
|
||||
): Prisma.PrismaPromise<
|
||||
T extends runtime.Types.Utils.Record<'select', any>
|
||||
? T['select'] extends true
|
||||
? number
|
||||
: Prisma.GetScalarType<T['select'], Stock_cardexCountAggregateOutputType>
|
||||
: number
|
||||
>
|
||||
|
||||
/**
|
||||
* Allows you to perform aggregations operations on a Stock_cardex.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {Stock_cardexAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
||||
* @example
|
||||
* // Ordered by age ascending
|
||||
* // Where email contains prisma.io
|
||||
* // Limited to the 10 users
|
||||
* const aggregations = await prisma.user.aggregate({
|
||||
* _avg: {
|
||||
* age: true,
|
||||
* },
|
||||
* where: {
|
||||
* email: {
|
||||
* contains: "prisma.io",
|
||||
* },
|
||||
* },
|
||||
* orderBy: {
|
||||
* age: "asc",
|
||||
* },
|
||||
* take: 10,
|
||||
* })
|
||||
**/
|
||||
aggregate<T extends Stock_cardexAggregateArgs>(args: Prisma.Subset<T, Stock_cardexAggregateArgs>): Prisma.PrismaPromise<GetStock_cardexAggregateType<T>>
|
||||
|
||||
/**
|
||||
* Group by Stock_cardex.
|
||||
* Note, that providing `undefined` is treated as the value not being there.
|
||||
* Read more here: https://pris.ly/d/null-undefined
|
||||
* @param {stock_cardexGroupByArgs} args - Group by arguments.
|
||||
* @example
|
||||
* // Group by city, order by createdAt, get count
|
||||
* const result = await prisma.user.groupBy({
|
||||
* by: ['city', 'createdAt'],
|
||||
* orderBy: {
|
||||
* createdAt: true
|
||||
* },
|
||||
* _count: {
|
||||
* _all: true
|
||||
* },
|
||||
* })
|
||||
*
|
||||
**/
|
||||
groupBy<
|
||||
T extends stock_cardexGroupByArgs,
|
||||
HasSelectOrTake extends Prisma.Or<
|
||||
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
||||
Prisma.Extends<'take', Prisma.Keys<T>>
|
||||
>,
|
||||
OrderByArg extends Prisma.True extends HasSelectOrTake
|
||||
? { orderBy: stock_cardexGroupByArgs['orderBy'] }
|
||||
: { orderBy?: stock_cardexGroupByArgs['orderBy'] },
|
||||
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
|
||||
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
|
||||
ByValid extends Prisma.Has<ByFields, OrderFields>,
|
||||
HavingFields extends Prisma.GetHavingFields<T['having']>,
|
||||
HavingValid extends Prisma.Has<ByFields, HavingFields>,
|
||||
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
|
||||
InputErrors extends ByEmpty extends Prisma.True
|
||||
? `Error: "by" must not be empty.`
|
||||
: HavingValid extends Prisma.False
|
||||
? {
|
||||
[P in HavingFields]: P extends ByFields
|
||||
? never
|
||||
: P extends string
|
||||
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
|
||||
: [
|
||||
Error,
|
||||
'Field ',
|
||||
P,
|
||||
` in "having" needs to be provided in "by"`,
|
||||
]
|
||||
}[HavingFields]
|
||||
: 'take' extends Prisma.Keys<T>
|
||||
? 'orderBy' extends Prisma.Keys<T>
|
||||
? ByValid extends Prisma.True
|
||||
? {}
|
||||
: {
|
||||
[P in OrderFields]: P extends ByFields
|
||||
? never
|
||||
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
||||
}[OrderFields]
|
||||
: 'Error: If you provide "take", you also need to provide "orderBy"'
|
||||
: 'skip' extends Prisma.Keys<T>
|
||||
? 'orderBy' extends Prisma.Keys<T>
|
||||
? ByValid extends Prisma.True
|
||||
? {}
|
||||
: {
|
||||
[P in OrderFields]: P extends ByFields
|
||||
? never
|
||||
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
||||
}[OrderFields]
|
||||
: 'Error: If you provide "skip", you also need to provide "orderBy"'
|
||||
: ByValid extends Prisma.True
|
||||
? {}
|
||||
: {
|
||||
[P in OrderFields]: P extends ByFields
|
||||
? never
|
||||
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
||||
}[OrderFields]
|
||||
>(args: Prisma.SubsetIntersection<T, stock_cardexGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStock_cardexGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
||||
/**
|
||||
* Fields of the stock_cardex model
|
||||
*/
|
||||
readonly fields: stock_cardexFieldRefs;
|
||||
}
|
||||
|
||||
/**
|
||||
* The delegate class that acts as a "Promise-like" for stock_cardex.
|
||||
* Why is this prefixed with `Prisma__`?
|
||||
* Because we want to prevent naming conflicts as mentioned in
|
||||
* https://github.com/prisma/prisma-client-js/issues/707
|
||||
*/
|
||||
export interface Prisma__stock_cardexClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
|
||||
/**
|
||||
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
||||
* resolved value cannot be modified from the callback.
|
||||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Fields of the stock_cardex model
|
||||
*/
|
||||
export interface stock_cardexFieldRefs {
|
||||
readonly productId: Prisma.FieldRef<"stock_cardex", 'Int'>
|
||||
readonly movement_id: Prisma.FieldRef<"stock_cardex", 'Int'>
|
||||
readonly type: Prisma.FieldRef<"stock_cardex", 'stock_cardex_type'>
|
||||
readonly quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
||||
readonly fee: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
||||
readonly totalCost: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
||||
readonly balance_quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
||||
readonly balance_avg_cost: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
||||
readonly createdAt: Prisma.FieldRef<"stock_cardex", 'DateTime'>
|
||||
}
|
||||
|
||||
|
||||
// Custom InputTypes
|
||||
/**
|
||||
* stock_cardex findFirst
|
||||
*/
|
||||
export type stock_cardexFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the stock_cardex
|
||||
*/
|
||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the stock_cardex
|
||||
*/
|
||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Filter, which stock_cardex to fetch.
|
||||
*/
|
||||
where?: Prisma.stock_cardexWhereInput
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
||||
*
|
||||
* Determine the order of stock_cardexes to fetch.
|
||||
*/
|
||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Take `±n` stock_cardexes from the position of the cursor.
|
||||
*/
|
||||
take?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Skip the first `n` stock_cardexes.
|
||||
*/
|
||||
skip?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
||||
*
|
||||
* Filter by unique combinations of stock_cardexes.
|
||||
*/
|
||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* stock_cardex findFirstOrThrow
|
||||
*/
|
||||
export type stock_cardexFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the stock_cardex
|
||||
*/
|
||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the stock_cardex
|
||||
*/
|
||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Filter, which stock_cardex to fetch.
|
||||
*/
|
||||
where?: Prisma.stock_cardexWhereInput
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
||||
*
|
||||
* Determine the order of stock_cardexes to fetch.
|
||||
*/
|
||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Take `±n` stock_cardexes from the position of the cursor.
|
||||
*/
|
||||
take?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Skip the first `n` stock_cardexes.
|
||||
*/
|
||||
skip?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
||||
*
|
||||
* Filter by unique combinations of stock_cardexes.
|
||||
*/
|
||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* stock_cardex findMany
|
||||
*/
|
||||
export type stock_cardexFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the stock_cardex
|
||||
*/
|
||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the stock_cardex
|
||||
*/
|
||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Filter, which stock_cardexes to fetch.
|
||||
*/
|
||||
where?: Prisma.stock_cardexWhereInput
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
||||
*
|
||||
* Determine the order of stock_cardexes to fetch.
|
||||
*/
|
||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Take `±n` stock_cardexes from the position of the cursor.
|
||||
*/
|
||||
take?: number
|
||||
/**
|
||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
||||
*
|
||||
* Skip the first `n` stock_cardexes.
|
||||
*/
|
||||
skip?: number
|
||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* stock_cardex without action
|
||||
*/
|
||||
export type stock_cardexDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the stock_cardex
|
||||
*/
|
||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the stock_cardex
|
||||
*/
|
||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
||||
}
|
||||
Reference in New Issue
Block a user