
/**
 * Client
**/

import * as runtime from './runtime/client.js';
import $Types = runtime.Types // general types
import $Public = runtime.Types.Public
import $Utils = runtime.Types.Utils
import $Extensions = runtime.Types.Extensions
import $Result = runtime.Types.Result

export type PrismaPromise<T> = $Public.PrismaPromise<T>


/**
 * Model Role
 * 
 */
export type Role = $Result.DefaultSelection<Prisma.$RolePayload>
/**
 * Model User
 * 
 */
export type User = $Result.DefaultSelection<Prisma.$UserPayload>
/**
 * Model State
 * 
 */
export type State = $Result.DefaultSelection<Prisma.$StatePayload>
/**
 * Model District
 * 
 */
export type District = $Result.DefaultSelection<Prisma.$DistrictPayload>
/**
 * Model Vegetable
 * 
 */
export type Vegetable = $Result.DefaultSelection<Prisma.$VegetablePayload>
/**
 * Model Customer
 * 
 */
export type Customer = $Result.DefaultSelection<Prisma.$CustomerPayload>
/**
 * Model Supplier
 * 
 */
export type Supplier = $Result.DefaultSelection<Prisma.$SupplierPayload>
/**
 * Model SupplierPayment
 * 
 */
export type SupplierPayment = $Result.DefaultSelection<Prisma.$SupplierPaymentPayload>
/**
 * Model Upi
 * 
 */
export type Upi = $Result.DefaultSelection<Prisma.$UpiPayload>
/**
 * Model Purchase
 * 
 */
export type Purchase = $Result.DefaultSelection<Prisma.$PurchasePayload>
/**
 * Model Shop
 * 
 */
export type Shop = $Result.DefaultSelection<Prisma.$ShopPayload>
/**
 * Model Sale
 * 
 */
export type Sale = $Result.DefaultSelection<Prisma.$SalePayload>
/**
 * Model SaleItem
 * 
 */
export type SaleItem = $Result.DefaultSelection<Prisma.$SaleItemPayload>
/**
 * Model CustomerReceipt
 * 
 */
export type CustomerReceipt = $Result.DefaultSelection<Prisma.$CustomerReceiptPayload>
/**
 * Model Expense
 * 
 */
export type Expense = $Result.DefaultSelection<Prisma.$ExpensePayload>
/**
 * Model ForgotPassword
 * 
 */
export type ForgotPassword = $Result.DefaultSelection<Prisma.$ForgotPasswordPayload>
/**
 * Model StockSpoilage
 * 
 */
export type StockSpoilage = $Result.DefaultSelection<Prisma.$StockSpoilagePayload>
/**
 * Model SaleReturn
 * 
 */
export type SaleReturn = $Result.DefaultSelection<Prisma.$SaleReturnPayload>
/**
 * Model ArrivalSettlement
 * 
 */
export type ArrivalSettlement = $Result.DefaultSelection<Prisma.$ArrivalSettlementPayload>
/**
 * Model ArrivalCustomPatti
 * 
 */
export type ArrivalCustomPatti = $Result.DefaultSelection<Prisma.$ArrivalCustomPattiPayload>
/**
 * Model Quotation
 * 
 */
export type Quotation = $Result.DefaultSelection<Prisma.$QuotationPayload>
/**
 * Model QuotationItem
 * 
 */
export type QuotationItem = $Result.DefaultSelection<Prisma.$QuotationItemPayload>
/**
 * Model PurchaseReturn
 * 
 */
export type PurchaseReturn = $Result.DefaultSelection<Prisma.$PurchaseReturnPayload>
/**
 * Model RetailStock
 * 
 */
export type RetailStock = $Result.DefaultSelection<Prisma.$RetailStockPayload>
/**
 * Model RetailStockReturn
 * 
 */
export type RetailStockReturn = $Result.DefaultSelection<Prisma.$RetailStockReturnPayload>
/**
 * Model RetailSale
 * 
 */
export type RetailSale = $Result.DefaultSelection<Prisma.$RetailSalePayload>
/**
 * Model RetailSaleItem
 * 
 */
export type RetailSaleItem = $Result.DefaultSelection<Prisma.$RetailSaleItemPayload>
/**
 * Model RetailStockSpoilage
 * 
 */
export type RetailStockSpoilage = $Result.DefaultSelection<Prisma.$RetailStockSpoilagePayload>
/**
 * Model BoxReturn
 * 
 */
export type BoxReturn = $Result.DefaultSelection<Prisma.$BoxReturnPayload>
/**
 * Model Employee
 * 
 */
export type Employee = $Result.DefaultSelection<Prisma.$EmployeePayload>
/**
 * Model Attendance
 * 
 */
export type Attendance = $Result.DefaultSelection<Prisma.$AttendancePayload>
/**
 * Model AuditLog
 * 
 */
export type AuditLog = $Result.DefaultSelection<Prisma.$AuditLogPayload>
/**
 * Model FastBilling
 * 
 */
export type FastBilling = $Result.DefaultSelection<Prisma.$FastBillingPayload>
/**
 * Model FastBillingItem
 * 
 */
export type FastBillingItem = $Result.DefaultSelection<Prisma.$FastBillingItemPayload>
/**
 * Model CashBankSetting
 * 
 */
export type CashBankSetting = $Result.DefaultSelection<Prisma.$CashBankSettingPayload>
/**
 * Model CashBankTransfer
 * 
 */
export type CashBankTransfer = $Result.DefaultSelection<Prisma.$CashBankTransferPayload>

/**
 * Enums
 */
export namespace $Enums {
  export const RateType: {
  UNIT: 'UNIT',
  KG: 'KG'
};

export type RateType = (typeof RateType)[keyof typeof RateType]


export const PurchaseUnit: {
  KG: 'KG',
  BAG: 'BAG',
  BOX: 'BOX',
  THAAR: 'THAAR',
  PIECES: 'PIECES'
};

export type PurchaseUnit = (typeof PurchaseUnit)[keyof typeof PurchaseUnit]


export const PaymentMode: {
  CASH: 'CASH',
  BANK: 'BANK',
  UPI: 'UPI'
};

export type PaymentMode = (typeof PaymentMode)[keyof typeof PaymentMode]


export const SalePaymentStatus: {
  UNPAID: 'UNPAID',
  PARTIALLY_PAID: 'PARTIALLY_PAID',
  PAID: 'PAID'
};

export type SalePaymentStatus = (typeof SalePaymentStatus)[keyof typeof SalePaymentStatus]


export const PurchaseStatus: {
  ACTIVE: 'ACTIVE',
  DEPLETED: 'DEPLETED',
  CLOSED: 'CLOSED'
};

export type PurchaseStatus = (typeof PurchaseStatus)[keyof typeof PurchaseStatus]


export const PurchaseType: {
  DIRECT: 'DIRECT',
  COMMISSION_ARRIVAL: 'COMMISSION_ARRIVAL'
};

export type PurchaseType = (typeof PurchaseType)[keyof typeof PurchaseType]


export const SettlementStatus: {
  UNSETTLED: 'UNSETTLED',
  PARTIALLY_SETTLED: 'PARTIALLY_SETTLED',
  SETTLED: 'SETTLED'
};

export type SettlementStatus = (typeof SettlementStatus)[keyof typeof SettlementStatus]


export const SupplierPaymentType: {
  DIRECT: 'DIRECT',
  ARRIVAL_LOT: 'ARRIVAL_LOT'
};

export type SupplierPaymentType = (typeof SupplierPaymentType)[keyof typeof SupplierPaymentType]


export const AttendanceStatus: {
  PRESENT: 'PRESENT',
  ABSENT: 'ABSENT',
  HALF_DAY: 'HALF_DAY'
};

export type AttendanceStatus = (typeof AttendanceStatus)[keyof typeof AttendanceStatus]


export const AuditAction: {
  UPDATE: 'UPDATE',
  DELETE: 'DELETE'
};

export type AuditAction = (typeof AuditAction)[keyof typeof AuditAction]

}

export type RateType = $Enums.RateType

export const RateType: typeof $Enums.RateType

export type PurchaseUnit = $Enums.PurchaseUnit

export const PurchaseUnit: typeof $Enums.PurchaseUnit

export type PaymentMode = $Enums.PaymentMode

export const PaymentMode: typeof $Enums.PaymentMode

export type SalePaymentStatus = $Enums.SalePaymentStatus

export const SalePaymentStatus: typeof $Enums.SalePaymentStatus

export type PurchaseStatus = $Enums.PurchaseStatus

export const PurchaseStatus: typeof $Enums.PurchaseStatus

export type PurchaseType = $Enums.PurchaseType

export const PurchaseType: typeof $Enums.PurchaseType

export type SettlementStatus = $Enums.SettlementStatus

export const SettlementStatus: typeof $Enums.SettlementStatus

export type SupplierPaymentType = $Enums.SupplierPaymentType

export const SupplierPaymentType: typeof $Enums.SupplierPaymentType

export type AttendanceStatus = $Enums.AttendanceStatus

export const AttendanceStatus: typeof $Enums.AttendanceStatus

export type AuditAction = $Enums.AuditAction

export const AuditAction: typeof $Enums.AuditAction

/**
 * ##  Prisma Client ʲˢ
 *
 * Type-safe database client for TypeScript & Node.js
 * @example
 * ```
 * const prisma = new PrismaClient({
 *   adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
 * })
 * // Fetch zero or more Roles
 * const roles = await prisma.role.findMany()
 * ```
 *
 *
 * Read more in our [docs](https://pris.ly/d/client).
 */
export class PrismaClient<
  ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
  const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never,
  ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs
> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }

    /**
   * ##  Prisma Client ʲˢ
   *
   * Type-safe database client for TypeScript & Node.js
   * @example
   * ```
   * const prisma = new PrismaClient({
   *   adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
   * })
   * // Fetch zero or more Roles
   * const roles = await prisma.role.findMany()
   * ```
   *
   *
   * Read more in our [docs](https://pris.ly/d/client).
   */

  constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
  $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;

  /**
   * Connect with the database
   */
  $connect(): $Utils.JsPromise<void>;

  /**
   * Disconnect from the database
   */
  $disconnect(): $Utils.JsPromise<void>;

/**
   * Executes a prepared raw query and returns the number of affected rows.
   * @example
   * ```
   * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Executes a raw query and returns the number of affected rows.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Performs a prepared raw query and returns the `SELECT` data.
   * @example
   * ```
   * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;

  /**
   * Performs a raw query and returns the `SELECT` data.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;


  /**
   * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
   * @example
   * ```
   * const [george, bob, alice] = await prisma.$transaction([
   *   prisma.user.create({ data: { name: 'George' } }),
   *   prisma.user.create({ data: { name: 'Bob' } }),
   *   prisma.user.create({ data: { name: 'Alice' } }),
   * ])
   * ```
   * 
   * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
   */
  $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>

  $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => $Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<R>

  $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<ClientOptions>, ExtArgs, $Utils.Call<Prisma.TypeMapCb<ClientOptions>, {
    extArgs: ExtArgs
  }>>

      /**
   * `prisma.role`: Exposes CRUD operations for the **Role** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Roles
    * const roles = await prisma.role.findMany()
    * ```
    */
  get role(): Prisma.RoleDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.user`: Exposes CRUD operations for the **User** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Users
    * const users = await prisma.user.findMany()
    * ```
    */
  get user(): Prisma.UserDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.state`: Exposes CRUD operations for the **State** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more States
    * const states = await prisma.state.findMany()
    * ```
    */
  get state(): Prisma.StateDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.district`: Exposes CRUD operations for the **District** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Districts
    * const districts = await prisma.district.findMany()
    * ```
    */
  get district(): Prisma.DistrictDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.vegetable`: Exposes CRUD operations for the **Vegetable** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Vegetables
    * const vegetables = await prisma.vegetable.findMany()
    * ```
    */
  get vegetable(): Prisma.VegetableDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.customer`: Exposes CRUD operations for the **Customer** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Customers
    * const customers = await prisma.customer.findMany()
    * ```
    */
  get customer(): Prisma.CustomerDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.supplier`: Exposes CRUD operations for the **Supplier** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Suppliers
    * const suppliers = await prisma.supplier.findMany()
    * ```
    */
  get supplier(): Prisma.SupplierDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.supplierPayment`: Exposes CRUD operations for the **SupplierPayment** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more SupplierPayments
    * const supplierPayments = await prisma.supplierPayment.findMany()
    * ```
    */
  get supplierPayment(): Prisma.SupplierPaymentDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.upi`: Exposes CRUD operations for the **Upi** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Upis
    * const upis = await prisma.upi.findMany()
    * ```
    */
  get upi(): Prisma.UpiDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.purchase`: Exposes CRUD operations for the **Purchase** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Purchases
    * const purchases = await prisma.purchase.findMany()
    * ```
    */
  get purchase(): Prisma.PurchaseDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.shop`: Exposes CRUD operations for the **Shop** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Shops
    * const shops = await prisma.shop.findMany()
    * ```
    */
  get shop(): Prisma.ShopDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.sale`: Exposes CRUD operations for the **Sale** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Sales
    * const sales = await prisma.sale.findMany()
    * ```
    */
  get sale(): Prisma.SaleDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.saleItem`: Exposes CRUD operations for the **SaleItem** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more SaleItems
    * const saleItems = await prisma.saleItem.findMany()
    * ```
    */
  get saleItem(): Prisma.SaleItemDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.customerReceipt`: Exposes CRUD operations for the **CustomerReceipt** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more CustomerReceipts
    * const customerReceipts = await prisma.customerReceipt.findMany()
    * ```
    */
  get customerReceipt(): Prisma.CustomerReceiptDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.expense`: Exposes CRUD operations for the **Expense** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Expenses
    * const expenses = await prisma.expense.findMany()
    * ```
    */
  get expense(): Prisma.ExpenseDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.forgotPassword`: Exposes CRUD operations for the **ForgotPassword** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more ForgotPasswords
    * const forgotPasswords = await prisma.forgotPassword.findMany()
    * ```
    */
  get forgotPassword(): Prisma.ForgotPasswordDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.stockSpoilage`: Exposes CRUD operations for the **StockSpoilage** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more StockSpoilages
    * const stockSpoilages = await prisma.stockSpoilage.findMany()
    * ```
    */
  get stockSpoilage(): Prisma.StockSpoilageDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.saleReturn`: Exposes CRUD operations for the **SaleReturn** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more SaleReturns
    * const saleReturns = await prisma.saleReturn.findMany()
    * ```
    */
  get saleReturn(): Prisma.SaleReturnDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.arrivalSettlement`: Exposes CRUD operations for the **ArrivalSettlement** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more ArrivalSettlements
    * const arrivalSettlements = await prisma.arrivalSettlement.findMany()
    * ```
    */
  get arrivalSettlement(): Prisma.ArrivalSettlementDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.arrivalCustomPatti`: Exposes CRUD operations for the **ArrivalCustomPatti** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more ArrivalCustomPattis
    * const arrivalCustomPattis = await prisma.arrivalCustomPatti.findMany()
    * ```
    */
  get arrivalCustomPatti(): Prisma.ArrivalCustomPattiDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.quotation`: Exposes CRUD operations for the **Quotation** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Quotations
    * const quotations = await prisma.quotation.findMany()
    * ```
    */
  get quotation(): Prisma.QuotationDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.quotationItem`: Exposes CRUD operations for the **QuotationItem** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more QuotationItems
    * const quotationItems = await prisma.quotationItem.findMany()
    * ```
    */
  get quotationItem(): Prisma.QuotationItemDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.purchaseReturn`: Exposes CRUD operations for the **PurchaseReturn** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more PurchaseReturns
    * const purchaseReturns = await prisma.purchaseReturn.findMany()
    * ```
    */
  get purchaseReturn(): Prisma.PurchaseReturnDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.retailStock`: Exposes CRUD operations for the **RetailStock** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more RetailStocks
    * const retailStocks = await prisma.retailStock.findMany()
    * ```
    */
  get retailStock(): Prisma.RetailStockDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.retailStockReturn`: Exposes CRUD operations for the **RetailStockReturn** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more RetailStockReturns
    * const retailStockReturns = await prisma.retailStockReturn.findMany()
    * ```
    */
  get retailStockReturn(): Prisma.RetailStockReturnDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.retailSale`: Exposes CRUD operations for the **RetailSale** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more RetailSales
    * const retailSales = await prisma.retailSale.findMany()
    * ```
    */
  get retailSale(): Prisma.RetailSaleDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.retailSaleItem`: Exposes CRUD operations for the **RetailSaleItem** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more RetailSaleItems
    * const retailSaleItems = await prisma.retailSaleItem.findMany()
    * ```
    */
  get retailSaleItem(): Prisma.RetailSaleItemDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.retailStockSpoilage`: Exposes CRUD operations for the **RetailStockSpoilage** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more RetailStockSpoilages
    * const retailStockSpoilages = await prisma.retailStockSpoilage.findMany()
    * ```
    */
  get retailStockSpoilage(): Prisma.RetailStockSpoilageDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.boxReturn`: Exposes CRUD operations for the **BoxReturn** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more BoxReturns
    * const boxReturns = await prisma.boxReturn.findMany()
    * ```
    */
  get boxReturn(): Prisma.BoxReturnDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.employee`: Exposes CRUD operations for the **Employee** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Employees
    * const employees = await prisma.employee.findMany()
    * ```
    */
  get employee(): Prisma.EmployeeDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.attendance`: Exposes CRUD operations for the **Attendance** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Attendances
    * const attendances = await prisma.attendance.findMany()
    * ```
    */
  get attendance(): Prisma.AttendanceDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.auditLog`: Exposes CRUD operations for the **AuditLog** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more AuditLogs
    * const auditLogs = await prisma.auditLog.findMany()
    * ```
    */
  get auditLog(): Prisma.AuditLogDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.fastBilling`: Exposes CRUD operations for the **FastBilling** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more FastBillings
    * const fastBillings = await prisma.fastBilling.findMany()
    * ```
    */
  get fastBilling(): Prisma.FastBillingDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.fastBillingItem`: Exposes CRUD operations for the **FastBillingItem** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more FastBillingItems
    * const fastBillingItems = await prisma.fastBillingItem.findMany()
    * ```
    */
  get fastBillingItem(): Prisma.FastBillingItemDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.cashBankSetting`: Exposes CRUD operations for the **CashBankSetting** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more CashBankSettings
    * const cashBankSettings = await prisma.cashBankSetting.findMany()
    * ```
    */
  get cashBankSetting(): Prisma.CashBankSettingDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.cashBankTransfer`: Exposes CRUD operations for the **CashBankTransfer** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more CashBankTransfers
    * const cashBankTransfers = await prisma.cashBankTransfer.findMany()
    * ```
    */
  get cashBankTransfer(): Prisma.CashBankTransferDelegate<ExtArgs, ClientOptions>;
}

export namespace Prisma {
  export import DMMF = runtime.DMMF

  export type PrismaPromise<T> = $Public.PrismaPromise<T>

  /**
   * Validator
   */
  export import validator = runtime.Public.validator

  /**
   * Prisma Errors
   */
  export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
  export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
  export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
  export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
  export import PrismaClientValidationError = runtime.PrismaClientValidationError

  /**
   * Re-export of sql-template-tag
   */
  export import sql = runtime.sqltag
  export import empty = runtime.empty
  export import join = runtime.join
  export import raw = runtime.raw
  export import Sql = runtime.Sql



  /**
   * Decimal.js
   */
  export import Decimal = runtime.Decimal

  export type DecimalJsLike = runtime.DecimalJsLike

  /**
  * Extensions
  */
  export import Extension = $Extensions.UserArgs
  export import getExtensionContext = runtime.Extensions.getExtensionContext
  export import Args = $Public.Args
  export import Payload = $Public.Payload
  export import Result = $Public.Result
  export import Exact = $Public.Exact

  /**
   * Prisma Client JS version: 7.8.0
   * Query Engine version: 3c6e192761c0362d496ed980de936e2f3cebcd3a
   */
  export type PrismaVersion = {
    client: string
    engine: string
  }

  export const prismaVersion: PrismaVersion

  /**
   * Utility Types
   */


  export import Bytes = runtime.Bytes
  export import JsonObject = runtime.JsonObject
  export import JsonArray = runtime.JsonArray
  export import JsonValue = runtime.JsonValue
  export import InputJsonObject = runtime.InputJsonObject
  export import InputJsonArray = runtime.InputJsonArray
  export import InputJsonValue = runtime.InputJsonValue

  /**
   * Types of the values used to represent different kinds of `null` values when working with JSON fields.
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  namespace NullTypes {
    /**
    * Type of `Prisma.DbNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.DbNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class DbNull {
      private DbNull: never
      private constructor()
    }

    /**
    * Type of `Prisma.JsonNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class JsonNull {
      private JsonNull: never
      private constructor()
    }

    /**
    * Type of `Prisma.AnyNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class AnyNull {
      private AnyNull: never
      private constructor()
    }
  }

  /**
   * Helper for filtering JSON entries that have `null` on the database (empty on the db)
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const DbNull: NullTypes.DbNull

  /**
   * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const JsonNull: NullTypes.JsonNull

  /**
   * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const AnyNull: NullTypes.AnyNull

  type SelectAndInclude = {
    select: any
    include: any
  }

  type SelectAndOmit = {
    select: any
    omit: any
  }

  /**
   * Get the type of the value, that the Promise holds.
   */
  export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;

  /**
   * Get the return type of a function which returns a Promise.
   */
  export type PromiseReturnType<T extends (...args: any) => $Utils.JsPromise<any>> = PromiseType<ReturnType<T>>

  /**
   * From T, pick a set of properties whose keys are in the union K
   */
  type Prisma__Pick<T, K extends keyof T> = {
      [P in K]: T[P];
  };


  export type Enumerable<T> = T | Array<T>;

  export type RequiredKeys<T> = {
    [K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
  }[keyof T]

  export type TruthyKeys<T> = keyof {
    [K in keyof T as T[K] extends false | undefined | null ? never : K]: K
  }

  export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>

  /**
   * Subset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
   */
  export type Subset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never;
  };

  /**
   * SelectSubset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
   * Additionally, it validates, if both select and include are present. If the case, it errors.
   */
  export type SelectSubset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    (T extends SelectAndInclude
      ? 'Please either choose `select` or `include`.'
      : T extends SelectAndOmit
        ? 'Please either choose `select` or `omit`.'
        : {})

  /**
   * Subset + Intersection
   * @desc From `T` pick properties that exist in `U` and intersect `K`
   */
  export type SubsetIntersection<T, U, K> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    K

  type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };

  /**
   * XOR is needed to have a real mutually exclusive union type
   * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
   */
  type XOR<T, U> =
    T extends object ?
    U extends object ?
      (Without<T, U> & U) | (Without<U, T> & T)
    : U : T


  /**
   * Is T a Record?
   */
  type IsObject<T extends any> = T extends Array<any>
  ? False
  : T extends Date
  ? False
  : T extends Uint8Array
  ? False
  : T extends BigInt
  ? False
  : T extends object
  ? True
  : False


  /**
   * If it's T[], return T
   */
  export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T

  /**
   * From ts-toolbelt
   */

  type __Either<O extends object, K extends Key> = Omit<O, K> &
    {
      // Merge all but K
      [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
    }[K]

  type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>

  type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>

  type _Either<
    O extends object,
    K extends Key,
    strict extends Boolean
  > = {
    1: EitherStrict<O, K>
    0: EitherLoose<O, K>
  }[strict]

  type Either<
    O extends object,
    K extends Key,
    strict extends Boolean = 1
  > = O extends unknown ? _Either<O, K, strict> : never

  export type Union = any

  type PatchUndefined<O extends object, O1 extends object> = {
    [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
  } & {}

  /** Helper Types for "Merge" **/
  export type IntersectOf<U extends Union> = (
    U extends unknown ? (k: U) => void : never
  ) extends (k: infer I) => void
    ? I
    : never

  export type Overwrite<O extends object, O1 extends object> = {
      [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
  } & {};

  type _Merge<U extends object> = IntersectOf<Overwrite<U, {
      [K in keyof U]-?: At<U, K>;
  }>>;

  type Key = string | number | symbol;
  type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
  type AtStrict<O extends object, K extends Key> = O[K & keyof O];
  type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
  export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
      1: AtStrict<O, K>;
      0: AtLoose<O, K>;
  }[strict];

  export type ComputeRaw<A extends any> = A extends Function ? A : {
    [K in keyof A]: A[K];
  } & {};

  export type OptionalFlat<O> = {
    [K in keyof O]?: O[K];
  } & {};

  type _Record<K extends keyof any, T> = {
    [P in K]: T;
  };

  // cause typescript not to expand types and preserve names
  type NoExpand<T> = T extends unknown ? T : never;

  // this type assumes the passed object is entirely optional
  type AtLeast<O extends object, K extends string> = NoExpand<
    O extends unknown
    ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
      | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
    : never>;

  type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;

  export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
  /** End Helper Types for "Merge" **/

  export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;

  /**
  A [[Boolean]]
  */
  export type Boolean = True | False

  // /**
  // 1
  // */
  export type True = 1

  /**
  0
  */
  export type False = 0

  export type Not<B extends Boolean> = {
    0: 1
    1: 0
  }[B]

  export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
    ? 0 // anything `never` is false
    : A1 extends A2
    ? 1
    : 0

  export type Has<U extends Union, U1 extends Union> = Not<
    Extends<Exclude<U1, U>, U1>
  >

  export type Or<B1 extends Boolean, B2 extends Boolean> = {
    0: {
      0: 0
      1: 1
    }
    1: {
      0: 1
      1: 1
    }
  }[B1][B2]

  export type Keys<U extends Union> = U extends unknown ? keyof U : never

  type Cast<A, B> = A extends B ? A : B;

  export const type: unique symbol;



  /**
   * Used by group by
   */

  export type GetScalarType<T, O> = O extends object ? {
    [P in keyof T]: P extends keyof O
      ? O[P]
      : never
  } : never

  type FieldPaths<
    T,
    U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
  > = IsObject<T> extends True ? U : T

  type GetHavingFields<T> = {
    [K in keyof T]: Or<
      Or<Extends<'OR', K>, Extends<'AND', K>>,
      Extends<'NOT', K>
    > extends True
      ? // infer is only needed to not hit TS limit
        // based on the brilliant idea of Pierre-Antoine Mills
        // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
        T[K] extends infer TK
        ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
        : never
      : {} extends FieldPaths<T[K]>
      ? never
      : K
  }[keyof T]

  /**
   * Convert tuple to union
   */
  type _TupleToUnion<T> = T extends (infer E)[] ? E : never
  type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
  type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T

  /**
   * Like `Pick`, but additionally can also accept an array of keys
   */
  type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>

  /**
   * Exclude all keys with underscores
   */
  type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T


  export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>

  type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>


  export const ModelName: {
    Role: 'Role',
    User: 'User',
    State: 'State',
    District: 'District',
    Vegetable: 'Vegetable',
    Customer: 'Customer',
    Supplier: 'Supplier',
    SupplierPayment: 'SupplierPayment',
    Upi: 'Upi',
    Purchase: 'Purchase',
    Shop: 'Shop',
    Sale: 'Sale',
    SaleItem: 'SaleItem',
    CustomerReceipt: 'CustomerReceipt',
    Expense: 'Expense',
    ForgotPassword: 'ForgotPassword',
    StockSpoilage: 'StockSpoilage',
    SaleReturn: 'SaleReturn',
    ArrivalSettlement: 'ArrivalSettlement',
    ArrivalCustomPatti: 'ArrivalCustomPatti',
    Quotation: 'Quotation',
    QuotationItem: 'QuotationItem',
    PurchaseReturn: 'PurchaseReturn',
    RetailStock: 'RetailStock',
    RetailStockReturn: 'RetailStockReturn',
    RetailSale: 'RetailSale',
    RetailSaleItem: 'RetailSaleItem',
    RetailStockSpoilage: 'RetailStockSpoilage',
    BoxReturn: 'BoxReturn',
    Employee: 'Employee',
    Attendance: 'Attendance',
    AuditLog: 'AuditLog',
    FastBilling: 'FastBilling',
    FastBillingItem: 'FastBillingItem',
    CashBankSetting: 'CashBankSetting',
    CashBankTransfer: 'CashBankTransfer'
  };

  export type ModelName = (typeof ModelName)[keyof typeof ModelName]



  interface TypeMapCb<ClientOptions = {}> extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record<string, any>> {
    returns: Prisma.TypeMap<this['params']['extArgs'], ClientOptions extends { omit: infer OmitOptions } ? OmitOptions : {}>
  }

  export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
    globalOmitOptions: {
      omit: GlobalOmitOptions
    }
    meta: {
      modelProps: "role" | "user" | "state" | "district" | "vegetable" | "customer" | "supplier" | "supplierPayment" | "upi" | "purchase" | "shop" | "sale" | "saleItem" | "customerReceipt" | "expense" | "forgotPassword" | "stockSpoilage" | "saleReturn" | "arrivalSettlement" | "arrivalCustomPatti" | "quotation" | "quotationItem" | "purchaseReturn" | "retailStock" | "retailStockReturn" | "retailSale" | "retailSaleItem" | "retailStockSpoilage" | "boxReturn" | "employee" | "attendance" | "auditLog" | "fastBilling" | "fastBillingItem" | "cashBankSetting" | "cashBankTransfer"
      txIsolationLevel: Prisma.TransactionIsolationLevel
    }
    model: {
      Role: {
        payload: Prisma.$RolePayload<ExtArgs>
        fields: Prisma.RoleFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RoleFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RoleFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          findFirst: {
            args: Prisma.RoleFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RoleFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          findMany: {
            args: Prisma.RoleFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>[]
          }
          create: {
            args: Prisma.RoleCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          createMany: {
            args: Prisma.RoleCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RoleDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          update: {
            args: Prisma.RoleUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          deleteMany: {
            args: Prisma.RoleDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RoleUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RoleUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RolePayload>
          }
          aggregate: {
            args: Prisma.RoleAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRole>
          }
          groupBy: {
            args: Prisma.RoleGroupByArgs<ExtArgs>
            result: $Utils.Optional<RoleGroupByOutputType>[]
          }
          count: {
            args: Prisma.RoleCountArgs<ExtArgs>
            result: $Utils.Optional<RoleCountAggregateOutputType> | number
          }
        }
      }
      User: {
        payload: Prisma.$UserPayload<ExtArgs>
        fields: Prisma.UserFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UserFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UserFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          findFirst: {
            args: Prisma.UserFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UserFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          findMany: {
            args: Prisma.UserFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
          }
          create: {
            args: Prisma.UserCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          createMany: {
            args: Prisma.UserCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.UserDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          update: {
            args: Prisma.UserUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          deleteMany: {
            args: Prisma.UserDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UserUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.UserUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserPayload>
          }
          aggregate: {
            args: Prisma.UserAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUser>
          }
          groupBy: {
            args: Prisma.UserGroupByArgs<ExtArgs>
            result: $Utils.Optional<UserGroupByOutputType>[]
          }
          count: {
            args: Prisma.UserCountArgs<ExtArgs>
            result: $Utils.Optional<UserCountAggregateOutputType> | number
          }
        }
      }
      State: {
        payload: Prisma.$StatePayload<ExtArgs>
        fields: Prisma.StateFieldRefs
        operations: {
          findUnique: {
            args: Prisma.StateFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.StateFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          findFirst: {
            args: Prisma.StateFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.StateFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          findMany: {
            args: Prisma.StateFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>[]
          }
          create: {
            args: Prisma.StateCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          createMany: {
            args: Prisma.StateCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.StateDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          update: {
            args: Prisma.StateUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          deleteMany: {
            args: Prisma.StateDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.StateUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.StateUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StatePayload>
          }
          aggregate: {
            args: Prisma.StateAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateState>
          }
          groupBy: {
            args: Prisma.StateGroupByArgs<ExtArgs>
            result: $Utils.Optional<StateGroupByOutputType>[]
          }
          count: {
            args: Prisma.StateCountArgs<ExtArgs>
            result: $Utils.Optional<StateCountAggregateOutputType> | number
          }
        }
      }
      District: {
        payload: Prisma.$DistrictPayload<ExtArgs>
        fields: Prisma.DistrictFieldRefs
        operations: {
          findUnique: {
            args: Prisma.DistrictFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.DistrictFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          findFirst: {
            args: Prisma.DistrictFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.DistrictFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          findMany: {
            args: Prisma.DistrictFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>[]
          }
          create: {
            args: Prisma.DistrictCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          createMany: {
            args: Prisma.DistrictCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.DistrictDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          update: {
            args: Prisma.DistrictUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          deleteMany: {
            args: Prisma.DistrictDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.DistrictUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.DistrictUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DistrictPayload>
          }
          aggregate: {
            args: Prisma.DistrictAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateDistrict>
          }
          groupBy: {
            args: Prisma.DistrictGroupByArgs<ExtArgs>
            result: $Utils.Optional<DistrictGroupByOutputType>[]
          }
          count: {
            args: Prisma.DistrictCountArgs<ExtArgs>
            result: $Utils.Optional<DistrictCountAggregateOutputType> | number
          }
        }
      }
      Vegetable: {
        payload: Prisma.$VegetablePayload<ExtArgs>
        fields: Prisma.VegetableFieldRefs
        operations: {
          findUnique: {
            args: Prisma.VegetableFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.VegetableFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          findFirst: {
            args: Prisma.VegetableFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.VegetableFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          findMany: {
            args: Prisma.VegetableFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>[]
          }
          create: {
            args: Prisma.VegetableCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          createMany: {
            args: Prisma.VegetableCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.VegetableDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          update: {
            args: Prisma.VegetableUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          deleteMany: {
            args: Prisma.VegetableDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.VegetableUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.VegetableUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$VegetablePayload>
          }
          aggregate: {
            args: Prisma.VegetableAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateVegetable>
          }
          groupBy: {
            args: Prisma.VegetableGroupByArgs<ExtArgs>
            result: $Utils.Optional<VegetableGroupByOutputType>[]
          }
          count: {
            args: Prisma.VegetableCountArgs<ExtArgs>
            result: $Utils.Optional<VegetableCountAggregateOutputType> | number
          }
        }
      }
      Customer: {
        payload: Prisma.$CustomerPayload<ExtArgs>
        fields: Prisma.CustomerFieldRefs
        operations: {
          findUnique: {
            args: Prisma.CustomerFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.CustomerFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          findFirst: {
            args: Prisma.CustomerFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.CustomerFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          findMany: {
            args: Prisma.CustomerFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>[]
          }
          create: {
            args: Prisma.CustomerCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          createMany: {
            args: Prisma.CustomerCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.CustomerDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          update: {
            args: Prisma.CustomerUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          deleteMany: {
            args: Prisma.CustomerDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.CustomerUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.CustomerUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerPayload>
          }
          aggregate: {
            args: Prisma.CustomerAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateCustomer>
          }
          groupBy: {
            args: Prisma.CustomerGroupByArgs<ExtArgs>
            result: $Utils.Optional<CustomerGroupByOutputType>[]
          }
          count: {
            args: Prisma.CustomerCountArgs<ExtArgs>
            result: $Utils.Optional<CustomerCountAggregateOutputType> | number
          }
        }
      }
      Supplier: {
        payload: Prisma.$SupplierPayload<ExtArgs>
        fields: Prisma.SupplierFieldRefs
        operations: {
          findUnique: {
            args: Prisma.SupplierFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.SupplierFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          findFirst: {
            args: Prisma.SupplierFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.SupplierFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          findMany: {
            args: Prisma.SupplierFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>[]
          }
          create: {
            args: Prisma.SupplierCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          createMany: {
            args: Prisma.SupplierCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.SupplierDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          update: {
            args: Prisma.SupplierUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          deleteMany: {
            args: Prisma.SupplierDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.SupplierUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.SupplierUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPayload>
          }
          aggregate: {
            args: Prisma.SupplierAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateSupplier>
          }
          groupBy: {
            args: Prisma.SupplierGroupByArgs<ExtArgs>
            result: $Utils.Optional<SupplierGroupByOutputType>[]
          }
          count: {
            args: Prisma.SupplierCountArgs<ExtArgs>
            result: $Utils.Optional<SupplierCountAggregateOutputType> | number
          }
        }
      }
      SupplierPayment: {
        payload: Prisma.$SupplierPaymentPayload<ExtArgs>
        fields: Prisma.SupplierPaymentFieldRefs
        operations: {
          findUnique: {
            args: Prisma.SupplierPaymentFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.SupplierPaymentFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          findFirst: {
            args: Prisma.SupplierPaymentFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.SupplierPaymentFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          findMany: {
            args: Prisma.SupplierPaymentFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>[]
          }
          create: {
            args: Prisma.SupplierPaymentCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          createMany: {
            args: Prisma.SupplierPaymentCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.SupplierPaymentDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          update: {
            args: Prisma.SupplierPaymentUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          deleteMany: {
            args: Prisma.SupplierPaymentDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.SupplierPaymentUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.SupplierPaymentUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SupplierPaymentPayload>
          }
          aggregate: {
            args: Prisma.SupplierPaymentAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateSupplierPayment>
          }
          groupBy: {
            args: Prisma.SupplierPaymentGroupByArgs<ExtArgs>
            result: $Utils.Optional<SupplierPaymentGroupByOutputType>[]
          }
          count: {
            args: Prisma.SupplierPaymentCountArgs<ExtArgs>
            result: $Utils.Optional<SupplierPaymentCountAggregateOutputType> | number
          }
        }
      }
      Upi: {
        payload: Prisma.$UpiPayload<ExtArgs>
        fields: Prisma.UpiFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UpiFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UpiFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          findFirst: {
            args: Prisma.UpiFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UpiFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          findMany: {
            args: Prisma.UpiFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>[]
          }
          create: {
            args: Prisma.UpiCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          createMany: {
            args: Prisma.UpiCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.UpiDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          update: {
            args: Prisma.UpiUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          deleteMany: {
            args: Prisma.UpiDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UpiUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.UpiUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UpiPayload>
          }
          aggregate: {
            args: Prisma.UpiAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUpi>
          }
          groupBy: {
            args: Prisma.UpiGroupByArgs<ExtArgs>
            result: $Utils.Optional<UpiGroupByOutputType>[]
          }
          count: {
            args: Prisma.UpiCountArgs<ExtArgs>
            result: $Utils.Optional<UpiCountAggregateOutputType> | number
          }
        }
      }
      Purchase: {
        payload: Prisma.$PurchasePayload<ExtArgs>
        fields: Prisma.PurchaseFieldRefs
        operations: {
          findUnique: {
            args: Prisma.PurchaseFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.PurchaseFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          findFirst: {
            args: Prisma.PurchaseFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.PurchaseFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          findMany: {
            args: Prisma.PurchaseFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>[]
          }
          create: {
            args: Prisma.PurchaseCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          createMany: {
            args: Prisma.PurchaseCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.PurchaseDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          update: {
            args: Prisma.PurchaseUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          deleteMany: {
            args: Prisma.PurchaseDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.PurchaseUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.PurchaseUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchasePayload>
          }
          aggregate: {
            args: Prisma.PurchaseAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregatePurchase>
          }
          groupBy: {
            args: Prisma.PurchaseGroupByArgs<ExtArgs>
            result: $Utils.Optional<PurchaseGroupByOutputType>[]
          }
          count: {
            args: Prisma.PurchaseCountArgs<ExtArgs>
            result: $Utils.Optional<PurchaseCountAggregateOutputType> | number
          }
        }
      }
      Shop: {
        payload: Prisma.$ShopPayload<ExtArgs>
        fields: Prisma.ShopFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ShopFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ShopFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          findFirst: {
            args: Prisma.ShopFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ShopFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          findMany: {
            args: Prisma.ShopFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>[]
          }
          create: {
            args: Prisma.ShopCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          createMany: {
            args: Prisma.ShopCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.ShopDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          update: {
            args: Prisma.ShopUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          deleteMany: {
            args: Prisma.ShopDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ShopUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ShopUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ShopPayload>
          }
          aggregate: {
            args: Prisma.ShopAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateShop>
          }
          groupBy: {
            args: Prisma.ShopGroupByArgs<ExtArgs>
            result: $Utils.Optional<ShopGroupByOutputType>[]
          }
          count: {
            args: Prisma.ShopCountArgs<ExtArgs>
            result: $Utils.Optional<ShopCountAggregateOutputType> | number
          }
        }
      }
      Sale: {
        payload: Prisma.$SalePayload<ExtArgs>
        fields: Prisma.SaleFieldRefs
        operations: {
          findUnique: {
            args: Prisma.SaleFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.SaleFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          findFirst: {
            args: Prisma.SaleFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.SaleFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          findMany: {
            args: Prisma.SaleFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>[]
          }
          create: {
            args: Prisma.SaleCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          createMany: {
            args: Prisma.SaleCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.SaleDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          update: {
            args: Prisma.SaleUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          deleteMany: {
            args: Prisma.SaleDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.SaleUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.SaleUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SalePayload>
          }
          aggregate: {
            args: Prisma.SaleAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateSale>
          }
          groupBy: {
            args: Prisma.SaleGroupByArgs<ExtArgs>
            result: $Utils.Optional<SaleGroupByOutputType>[]
          }
          count: {
            args: Prisma.SaleCountArgs<ExtArgs>
            result: $Utils.Optional<SaleCountAggregateOutputType> | number
          }
        }
      }
      SaleItem: {
        payload: Prisma.$SaleItemPayload<ExtArgs>
        fields: Prisma.SaleItemFieldRefs
        operations: {
          findUnique: {
            args: Prisma.SaleItemFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.SaleItemFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          findFirst: {
            args: Prisma.SaleItemFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.SaleItemFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          findMany: {
            args: Prisma.SaleItemFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>[]
          }
          create: {
            args: Prisma.SaleItemCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          createMany: {
            args: Prisma.SaleItemCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.SaleItemDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          update: {
            args: Prisma.SaleItemUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          deleteMany: {
            args: Prisma.SaleItemDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.SaleItemUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.SaleItemUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleItemPayload>
          }
          aggregate: {
            args: Prisma.SaleItemAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateSaleItem>
          }
          groupBy: {
            args: Prisma.SaleItemGroupByArgs<ExtArgs>
            result: $Utils.Optional<SaleItemGroupByOutputType>[]
          }
          count: {
            args: Prisma.SaleItemCountArgs<ExtArgs>
            result: $Utils.Optional<SaleItemCountAggregateOutputType> | number
          }
        }
      }
      CustomerReceipt: {
        payload: Prisma.$CustomerReceiptPayload<ExtArgs>
        fields: Prisma.CustomerReceiptFieldRefs
        operations: {
          findUnique: {
            args: Prisma.CustomerReceiptFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.CustomerReceiptFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          findFirst: {
            args: Prisma.CustomerReceiptFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.CustomerReceiptFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          findMany: {
            args: Prisma.CustomerReceiptFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>[]
          }
          create: {
            args: Prisma.CustomerReceiptCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          createMany: {
            args: Prisma.CustomerReceiptCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.CustomerReceiptDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          update: {
            args: Prisma.CustomerReceiptUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          deleteMany: {
            args: Prisma.CustomerReceiptDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.CustomerReceiptUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.CustomerReceiptUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CustomerReceiptPayload>
          }
          aggregate: {
            args: Prisma.CustomerReceiptAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateCustomerReceipt>
          }
          groupBy: {
            args: Prisma.CustomerReceiptGroupByArgs<ExtArgs>
            result: $Utils.Optional<CustomerReceiptGroupByOutputType>[]
          }
          count: {
            args: Prisma.CustomerReceiptCountArgs<ExtArgs>
            result: $Utils.Optional<CustomerReceiptCountAggregateOutputType> | number
          }
        }
      }
      Expense: {
        payload: Prisma.$ExpensePayload<ExtArgs>
        fields: Prisma.ExpenseFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ExpenseFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ExpenseFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          findFirst: {
            args: Prisma.ExpenseFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ExpenseFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          findMany: {
            args: Prisma.ExpenseFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>[]
          }
          create: {
            args: Prisma.ExpenseCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          createMany: {
            args: Prisma.ExpenseCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.ExpenseDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          update: {
            args: Prisma.ExpenseUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          deleteMany: {
            args: Prisma.ExpenseDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ExpenseUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ExpenseUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ExpensePayload>
          }
          aggregate: {
            args: Prisma.ExpenseAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateExpense>
          }
          groupBy: {
            args: Prisma.ExpenseGroupByArgs<ExtArgs>
            result: $Utils.Optional<ExpenseGroupByOutputType>[]
          }
          count: {
            args: Prisma.ExpenseCountArgs<ExtArgs>
            result: $Utils.Optional<ExpenseCountAggregateOutputType> | number
          }
        }
      }
      ForgotPassword: {
        payload: Prisma.$ForgotPasswordPayload<ExtArgs>
        fields: Prisma.ForgotPasswordFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ForgotPasswordFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ForgotPasswordFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          findFirst: {
            args: Prisma.ForgotPasswordFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ForgotPasswordFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          findMany: {
            args: Prisma.ForgotPasswordFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>[]
          }
          create: {
            args: Prisma.ForgotPasswordCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          createMany: {
            args: Prisma.ForgotPasswordCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.ForgotPasswordDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          update: {
            args: Prisma.ForgotPasswordUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          deleteMany: {
            args: Prisma.ForgotPasswordDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ForgotPasswordUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ForgotPasswordUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ForgotPasswordPayload>
          }
          aggregate: {
            args: Prisma.ForgotPasswordAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateForgotPassword>
          }
          groupBy: {
            args: Prisma.ForgotPasswordGroupByArgs<ExtArgs>
            result: $Utils.Optional<ForgotPasswordGroupByOutputType>[]
          }
          count: {
            args: Prisma.ForgotPasswordCountArgs<ExtArgs>
            result: $Utils.Optional<ForgotPasswordCountAggregateOutputType> | number
          }
        }
      }
      StockSpoilage: {
        payload: Prisma.$StockSpoilagePayload<ExtArgs>
        fields: Prisma.StockSpoilageFieldRefs
        operations: {
          findUnique: {
            args: Prisma.StockSpoilageFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.StockSpoilageFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          findFirst: {
            args: Prisma.StockSpoilageFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.StockSpoilageFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          findMany: {
            args: Prisma.StockSpoilageFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>[]
          }
          create: {
            args: Prisma.StockSpoilageCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          createMany: {
            args: Prisma.StockSpoilageCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.StockSpoilageDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          update: {
            args: Prisma.StockSpoilageUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          deleteMany: {
            args: Prisma.StockSpoilageDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.StockSpoilageUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.StockSpoilageUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$StockSpoilagePayload>
          }
          aggregate: {
            args: Prisma.StockSpoilageAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateStockSpoilage>
          }
          groupBy: {
            args: Prisma.StockSpoilageGroupByArgs<ExtArgs>
            result: $Utils.Optional<StockSpoilageGroupByOutputType>[]
          }
          count: {
            args: Prisma.StockSpoilageCountArgs<ExtArgs>
            result: $Utils.Optional<StockSpoilageCountAggregateOutputType> | number
          }
        }
      }
      SaleReturn: {
        payload: Prisma.$SaleReturnPayload<ExtArgs>
        fields: Prisma.SaleReturnFieldRefs
        operations: {
          findUnique: {
            args: Prisma.SaleReturnFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.SaleReturnFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          findFirst: {
            args: Prisma.SaleReturnFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.SaleReturnFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          findMany: {
            args: Prisma.SaleReturnFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>[]
          }
          create: {
            args: Prisma.SaleReturnCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          createMany: {
            args: Prisma.SaleReturnCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.SaleReturnDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          update: {
            args: Prisma.SaleReturnUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          deleteMany: {
            args: Prisma.SaleReturnDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.SaleReturnUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.SaleReturnUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$SaleReturnPayload>
          }
          aggregate: {
            args: Prisma.SaleReturnAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateSaleReturn>
          }
          groupBy: {
            args: Prisma.SaleReturnGroupByArgs<ExtArgs>
            result: $Utils.Optional<SaleReturnGroupByOutputType>[]
          }
          count: {
            args: Prisma.SaleReturnCountArgs<ExtArgs>
            result: $Utils.Optional<SaleReturnCountAggregateOutputType> | number
          }
        }
      }
      ArrivalSettlement: {
        payload: Prisma.$ArrivalSettlementPayload<ExtArgs>
        fields: Prisma.ArrivalSettlementFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ArrivalSettlementFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ArrivalSettlementFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          findFirst: {
            args: Prisma.ArrivalSettlementFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ArrivalSettlementFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          findMany: {
            args: Prisma.ArrivalSettlementFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>[]
          }
          create: {
            args: Prisma.ArrivalSettlementCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          createMany: {
            args: Prisma.ArrivalSettlementCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.ArrivalSettlementDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          update: {
            args: Prisma.ArrivalSettlementUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          deleteMany: {
            args: Prisma.ArrivalSettlementDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ArrivalSettlementUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ArrivalSettlementUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalSettlementPayload>
          }
          aggregate: {
            args: Prisma.ArrivalSettlementAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateArrivalSettlement>
          }
          groupBy: {
            args: Prisma.ArrivalSettlementGroupByArgs<ExtArgs>
            result: $Utils.Optional<ArrivalSettlementGroupByOutputType>[]
          }
          count: {
            args: Prisma.ArrivalSettlementCountArgs<ExtArgs>
            result: $Utils.Optional<ArrivalSettlementCountAggregateOutputType> | number
          }
        }
      }
      ArrivalCustomPatti: {
        payload: Prisma.$ArrivalCustomPattiPayload<ExtArgs>
        fields: Prisma.ArrivalCustomPattiFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ArrivalCustomPattiFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ArrivalCustomPattiFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          findFirst: {
            args: Prisma.ArrivalCustomPattiFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ArrivalCustomPattiFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          findMany: {
            args: Prisma.ArrivalCustomPattiFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>[]
          }
          create: {
            args: Prisma.ArrivalCustomPattiCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          createMany: {
            args: Prisma.ArrivalCustomPattiCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.ArrivalCustomPattiDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          update: {
            args: Prisma.ArrivalCustomPattiUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          deleteMany: {
            args: Prisma.ArrivalCustomPattiDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ArrivalCustomPattiUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ArrivalCustomPattiUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ArrivalCustomPattiPayload>
          }
          aggregate: {
            args: Prisma.ArrivalCustomPattiAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateArrivalCustomPatti>
          }
          groupBy: {
            args: Prisma.ArrivalCustomPattiGroupByArgs<ExtArgs>
            result: $Utils.Optional<ArrivalCustomPattiGroupByOutputType>[]
          }
          count: {
            args: Prisma.ArrivalCustomPattiCountArgs<ExtArgs>
            result: $Utils.Optional<ArrivalCustomPattiCountAggregateOutputType> | number
          }
        }
      }
      Quotation: {
        payload: Prisma.$QuotationPayload<ExtArgs>
        fields: Prisma.QuotationFieldRefs
        operations: {
          findUnique: {
            args: Prisma.QuotationFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.QuotationFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          findFirst: {
            args: Prisma.QuotationFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.QuotationFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          findMany: {
            args: Prisma.QuotationFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>[]
          }
          create: {
            args: Prisma.QuotationCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          createMany: {
            args: Prisma.QuotationCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.QuotationDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          update: {
            args: Prisma.QuotationUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          deleteMany: {
            args: Prisma.QuotationDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.QuotationUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.QuotationUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationPayload>
          }
          aggregate: {
            args: Prisma.QuotationAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateQuotation>
          }
          groupBy: {
            args: Prisma.QuotationGroupByArgs<ExtArgs>
            result: $Utils.Optional<QuotationGroupByOutputType>[]
          }
          count: {
            args: Prisma.QuotationCountArgs<ExtArgs>
            result: $Utils.Optional<QuotationCountAggregateOutputType> | number
          }
        }
      }
      QuotationItem: {
        payload: Prisma.$QuotationItemPayload<ExtArgs>
        fields: Prisma.QuotationItemFieldRefs
        operations: {
          findUnique: {
            args: Prisma.QuotationItemFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.QuotationItemFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          findFirst: {
            args: Prisma.QuotationItemFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.QuotationItemFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          findMany: {
            args: Prisma.QuotationItemFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>[]
          }
          create: {
            args: Prisma.QuotationItemCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          createMany: {
            args: Prisma.QuotationItemCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.QuotationItemDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          update: {
            args: Prisma.QuotationItemUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          deleteMany: {
            args: Prisma.QuotationItemDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.QuotationItemUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.QuotationItemUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$QuotationItemPayload>
          }
          aggregate: {
            args: Prisma.QuotationItemAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateQuotationItem>
          }
          groupBy: {
            args: Prisma.QuotationItemGroupByArgs<ExtArgs>
            result: $Utils.Optional<QuotationItemGroupByOutputType>[]
          }
          count: {
            args: Prisma.QuotationItemCountArgs<ExtArgs>
            result: $Utils.Optional<QuotationItemCountAggregateOutputType> | number
          }
        }
      }
      PurchaseReturn: {
        payload: Prisma.$PurchaseReturnPayload<ExtArgs>
        fields: Prisma.PurchaseReturnFieldRefs
        operations: {
          findUnique: {
            args: Prisma.PurchaseReturnFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.PurchaseReturnFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          findFirst: {
            args: Prisma.PurchaseReturnFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.PurchaseReturnFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          findMany: {
            args: Prisma.PurchaseReturnFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>[]
          }
          create: {
            args: Prisma.PurchaseReturnCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          createMany: {
            args: Prisma.PurchaseReturnCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.PurchaseReturnDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          update: {
            args: Prisma.PurchaseReturnUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          deleteMany: {
            args: Prisma.PurchaseReturnDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.PurchaseReturnUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.PurchaseReturnUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PurchaseReturnPayload>
          }
          aggregate: {
            args: Prisma.PurchaseReturnAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregatePurchaseReturn>
          }
          groupBy: {
            args: Prisma.PurchaseReturnGroupByArgs<ExtArgs>
            result: $Utils.Optional<PurchaseReturnGroupByOutputType>[]
          }
          count: {
            args: Prisma.PurchaseReturnCountArgs<ExtArgs>
            result: $Utils.Optional<PurchaseReturnCountAggregateOutputType> | number
          }
        }
      }
      RetailStock: {
        payload: Prisma.$RetailStockPayload<ExtArgs>
        fields: Prisma.RetailStockFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RetailStockFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RetailStockFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          findFirst: {
            args: Prisma.RetailStockFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RetailStockFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          findMany: {
            args: Prisma.RetailStockFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>[]
          }
          create: {
            args: Prisma.RetailStockCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          createMany: {
            args: Prisma.RetailStockCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RetailStockDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          update: {
            args: Prisma.RetailStockUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          deleteMany: {
            args: Prisma.RetailStockDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RetailStockUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RetailStockUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockPayload>
          }
          aggregate: {
            args: Prisma.RetailStockAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRetailStock>
          }
          groupBy: {
            args: Prisma.RetailStockGroupByArgs<ExtArgs>
            result: $Utils.Optional<RetailStockGroupByOutputType>[]
          }
          count: {
            args: Prisma.RetailStockCountArgs<ExtArgs>
            result: $Utils.Optional<RetailStockCountAggregateOutputType> | number
          }
        }
      }
      RetailStockReturn: {
        payload: Prisma.$RetailStockReturnPayload<ExtArgs>
        fields: Prisma.RetailStockReturnFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RetailStockReturnFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RetailStockReturnFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          findFirst: {
            args: Prisma.RetailStockReturnFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RetailStockReturnFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          findMany: {
            args: Prisma.RetailStockReturnFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>[]
          }
          create: {
            args: Prisma.RetailStockReturnCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          createMany: {
            args: Prisma.RetailStockReturnCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RetailStockReturnDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          update: {
            args: Prisma.RetailStockReturnUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          deleteMany: {
            args: Prisma.RetailStockReturnDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RetailStockReturnUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RetailStockReturnUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockReturnPayload>
          }
          aggregate: {
            args: Prisma.RetailStockReturnAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRetailStockReturn>
          }
          groupBy: {
            args: Prisma.RetailStockReturnGroupByArgs<ExtArgs>
            result: $Utils.Optional<RetailStockReturnGroupByOutputType>[]
          }
          count: {
            args: Prisma.RetailStockReturnCountArgs<ExtArgs>
            result: $Utils.Optional<RetailStockReturnCountAggregateOutputType> | number
          }
        }
      }
      RetailSale: {
        payload: Prisma.$RetailSalePayload<ExtArgs>
        fields: Prisma.RetailSaleFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RetailSaleFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RetailSaleFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          findFirst: {
            args: Prisma.RetailSaleFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RetailSaleFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          findMany: {
            args: Prisma.RetailSaleFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>[]
          }
          create: {
            args: Prisma.RetailSaleCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          createMany: {
            args: Prisma.RetailSaleCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RetailSaleDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          update: {
            args: Prisma.RetailSaleUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          deleteMany: {
            args: Prisma.RetailSaleDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RetailSaleUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RetailSaleUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSalePayload>
          }
          aggregate: {
            args: Prisma.RetailSaleAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRetailSale>
          }
          groupBy: {
            args: Prisma.RetailSaleGroupByArgs<ExtArgs>
            result: $Utils.Optional<RetailSaleGroupByOutputType>[]
          }
          count: {
            args: Prisma.RetailSaleCountArgs<ExtArgs>
            result: $Utils.Optional<RetailSaleCountAggregateOutputType> | number
          }
        }
      }
      RetailSaleItem: {
        payload: Prisma.$RetailSaleItemPayload<ExtArgs>
        fields: Prisma.RetailSaleItemFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RetailSaleItemFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RetailSaleItemFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          findFirst: {
            args: Prisma.RetailSaleItemFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RetailSaleItemFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          findMany: {
            args: Prisma.RetailSaleItemFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>[]
          }
          create: {
            args: Prisma.RetailSaleItemCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          createMany: {
            args: Prisma.RetailSaleItemCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RetailSaleItemDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          update: {
            args: Prisma.RetailSaleItemUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          deleteMany: {
            args: Prisma.RetailSaleItemDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RetailSaleItemUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RetailSaleItemUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailSaleItemPayload>
          }
          aggregate: {
            args: Prisma.RetailSaleItemAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRetailSaleItem>
          }
          groupBy: {
            args: Prisma.RetailSaleItemGroupByArgs<ExtArgs>
            result: $Utils.Optional<RetailSaleItemGroupByOutputType>[]
          }
          count: {
            args: Prisma.RetailSaleItemCountArgs<ExtArgs>
            result: $Utils.Optional<RetailSaleItemCountAggregateOutputType> | number
          }
        }
      }
      RetailStockSpoilage: {
        payload: Prisma.$RetailStockSpoilagePayload<ExtArgs>
        fields: Prisma.RetailStockSpoilageFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RetailStockSpoilageFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RetailStockSpoilageFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          findFirst: {
            args: Prisma.RetailStockSpoilageFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RetailStockSpoilageFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          findMany: {
            args: Prisma.RetailStockSpoilageFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>[]
          }
          create: {
            args: Prisma.RetailStockSpoilageCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          createMany: {
            args: Prisma.RetailStockSpoilageCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.RetailStockSpoilageDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          update: {
            args: Prisma.RetailStockSpoilageUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          deleteMany: {
            args: Prisma.RetailStockSpoilageDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RetailStockSpoilageUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RetailStockSpoilageUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RetailStockSpoilagePayload>
          }
          aggregate: {
            args: Prisma.RetailStockSpoilageAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRetailStockSpoilage>
          }
          groupBy: {
            args: Prisma.RetailStockSpoilageGroupByArgs<ExtArgs>
            result: $Utils.Optional<RetailStockSpoilageGroupByOutputType>[]
          }
          count: {
            args: Prisma.RetailStockSpoilageCountArgs<ExtArgs>
            result: $Utils.Optional<RetailStockSpoilageCountAggregateOutputType> | number
          }
        }
      }
      BoxReturn: {
        payload: Prisma.$BoxReturnPayload<ExtArgs>
        fields: Prisma.BoxReturnFieldRefs
        operations: {
          findUnique: {
            args: Prisma.BoxReturnFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.BoxReturnFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          findFirst: {
            args: Prisma.BoxReturnFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.BoxReturnFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          findMany: {
            args: Prisma.BoxReturnFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>[]
          }
          create: {
            args: Prisma.BoxReturnCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          createMany: {
            args: Prisma.BoxReturnCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.BoxReturnDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          update: {
            args: Prisma.BoxReturnUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          deleteMany: {
            args: Prisma.BoxReturnDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.BoxReturnUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.BoxReturnUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$BoxReturnPayload>
          }
          aggregate: {
            args: Prisma.BoxReturnAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateBoxReturn>
          }
          groupBy: {
            args: Prisma.BoxReturnGroupByArgs<ExtArgs>
            result: $Utils.Optional<BoxReturnGroupByOutputType>[]
          }
          count: {
            args: Prisma.BoxReturnCountArgs<ExtArgs>
            result: $Utils.Optional<BoxReturnCountAggregateOutputType> | number
          }
        }
      }
      Employee: {
        payload: Prisma.$EmployeePayload<ExtArgs>
        fields: Prisma.EmployeeFieldRefs
        operations: {
          findUnique: {
            args: Prisma.EmployeeFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.EmployeeFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          findFirst: {
            args: Prisma.EmployeeFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.EmployeeFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          findMany: {
            args: Prisma.EmployeeFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>[]
          }
          create: {
            args: Prisma.EmployeeCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          createMany: {
            args: Prisma.EmployeeCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.EmployeeDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          update: {
            args: Prisma.EmployeeUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          deleteMany: {
            args: Prisma.EmployeeDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.EmployeeUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.EmployeeUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$EmployeePayload>
          }
          aggregate: {
            args: Prisma.EmployeeAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateEmployee>
          }
          groupBy: {
            args: Prisma.EmployeeGroupByArgs<ExtArgs>
            result: $Utils.Optional<EmployeeGroupByOutputType>[]
          }
          count: {
            args: Prisma.EmployeeCountArgs<ExtArgs>
            result: $Utils.Optional<EmployeeCountAggregateOutputType> | number
          }
        }
      }
      Attendance: {
        payload: Prisma.$AttendancePayload<ExtArgs>
        fields: Prisma.AttendanceFieldRefs
        operations: {
          findUnique: {
            args: Prisma.AttendanceFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.AttendanceFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          findFirst: {
            args: Prisma.AttendanceFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.AttendanceFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          findMany: {
            args: Prisma.AttendanceFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>[]
          }
          create: {
            args: Prisma.AttendanceCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          createMany: {
            args: Prisma.AttendanceCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.AttendanceDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          update: {
            args: Prisma.AttendanceUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          deleteMany: {
            args: Prisma.AttendanceDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.AttendanceUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.AttendanceUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AttendancePayload>
          }
          aggregate: {
            args: Prisma.AttendanceAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateAttendance>
          }
          groupBy: {
            args: Prisma.AttendanceGroupByArgs<ExtArgs>
            result: $Utils.Optional<AttendanceGroupByOutputType>[]
          }
          count: {
            args: Prisma.AttendanceCountArgs<ExtArgs>
            result: $Utils.Optional<AttendanceCountAggregateOutputType> | number
          }
        }
      }
      AuditLog: {
        payload: Prisma.$AuditLogPayload<ExtArgs>
        fields: Prisma.AuditLogFieldRefs
        operations: {
          findUnique: {
            args: Prisma.AuditLogFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.AuditLogFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          findFirst: {
            args: Prisma.AuditLogFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.AuditLogFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          findMany: {
            args: Prisma.AuditLogFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>[]
          }
          create: {
            args: Prisma.AuditLogCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          createMany: {
            args: Prisma.AuditLogCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.AuditLogDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          update: {
            args: Prisma.AuditLogUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          deleteMany: {
            args: Prisma.AuditLogDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.AuditLogUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.AuditLogUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$AuditLogPayload>
          }
          aggregate: {
            args: Prisma.AuditLogAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateAuditLog>
          }
          groupBy: {
            args: Prisma.AuditLogGroupByArgs<ExtArgs>
            result: $Utils.Optional<AuditLogGroupByOutputType>[]
          }
          count: {
            args: Prisma.AuditLogCountArgs<ExtArgs>
            result: $Utils.Optional<AuditLogCountAggregateOutputType> | number
          }
        }
      }
      FastBilling: {
        payload: Prisma.$FastBillingPayload<ExtArgs>
        fields: Prisma.FastBillingFieldRefs
        operations: {
          findUnique: {
            args: Prisma.FastBillingFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.FastBillingFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          findFirst: {
            args: Prisma.FastBillingFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.FastBillingFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          findMany: {
            args: Prisma.FastBillingFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>[]
          }
          create: {
            args: Prisma.FastBillingCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          createMany: {
            args: Prisma.FastBillingCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.FastBillingDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          update: {
            args: Prisma.FastBillingUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          deleteMany: {
            args: Prisma.FastBillingDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.FastBillingUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.FastBillingUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingPayload>
          }
          aggregate: {
            args: Prisma.FastBillingAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateFastBilling>
          }
          groupBy: {
            args: Prisma.FastBillingGroupByArgs<ExtArgs>
            result: $Utils.Optional<FastBillingGroupByOutputType>[]
          }
          count: {
            args: Prisma.FastBillingCountArgs<ExtArgs>
            result: $Utils.Optional<FastBillingCountAggregateOutputType> | number
          }
        }
      }
      FastBillingItem: {
        payload: Prisma.$FastBillingItemPayload<ExtArgs>
        fields: Prisma.FastBillingItemFieldRefs
        operations: {
          findUnique: {
            args: Prisma.FastBillingItemFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.FastBillingItemFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          findFirst: {
            args: Prisma.FastBillingItemFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.FastBillingItemFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          findMany: {
            args: Prisma.FastBillingItemFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>[]
          }
          create: {
            args: Prisma.FastBillingItemCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          createMany: {
            args: Prisma.FastBillingItemCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.FastBillingItemDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          update: {
            args: Prisma.FastBillingItemUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          deleteMany: {
            args: Prisma.FastBillingItemDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.FastBillingItemUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.FastBillingItemUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FastBillingItemPayload>
          }
          aggregate: {
            args: Prisma.FastBillingItemAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateFastBillingItem>
          }
          groupBy: {
            args: Prisma.FastBillingItemGroupByArgs<ExtArgs>
            result: $Utils.Optional<FastBillingItemGroupByOutputType>[]
          }
          count: {
            args: Prisma.FastBillingItemCountArgs<ExtArgs>
            result: $Utils.Optional<FastBillingItemCountAggregateOutputType> | number
          }
        }
      }
      CashBankSetting: {
        payload: Prisma.$CashBankSettingPayload<ExtArgs>
        fields: Prisma.CashBankSettingFieldRefs
        operations: {
          findUnique: {
            args: Prisma.CashBankSettingFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.CashBankSettingFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          findFirst: {
            args: Prisma.CashBankSettingFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.CashBankSettingFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          findMany: {
            args: Prisma.CashBankSettingFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>[]
          }
          create: {
            args: Prisma.CashBankSettingCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          createMany: {
            args: Prisma.CashBankSettingCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.CashBankSettingDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          update: {
            args: Prisma.CashBankSettingUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          deleteMany: {
            args: Prisma.CashBankSettingDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.CashBankSettingUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.CashBankSettingUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankSettingPayload>
          }
          aggregate: {
            args: Prisma.CashBankSettingAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateCashBankSetting>
          }
          groupBy: {
            args: Prisma.CashBankSettingGroupByArgs<ExtArgs>
            result: $Utils.Optional<CashBankSettingGroupByOutputType>[]
          }
          count: {
            args: Prisma.CashBankSettingCountArgs<ExtArgs>
            result: $Utils.Optional<CashBankSettingCountAggregateOutputType> | number
          }
        }
      }
      CashBankTransfer: {
        payload: Prisma.$CashBankTransferPayload<ExtArgs>
        fields: Prisma.CashBankTransferFieldRefs
        operations: {
          findUnique: {
            args: Prisma.CashBankTransferFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.CashBankTransferFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          findFirst: {
            args: Prisma.CashBankTransferFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.CashBankTransferFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          findMany: {
            args: Prisma.CashBankTransferFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>[]
          }
          create: {
            args: Prisma.CashBankTransferCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          createMany: {
            args: Prisma.CashBankTransferCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          delete: {
            args: Prisma.CashBankTransferDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          update: {
            args: Prisma.CashBankTransferUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          deleteMany: {
            args: Prisma.CashBankTransferDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.CashBankTransferUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.CashBankTransferUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$CashBankTransferPayload>
          }
          aggregate: {
            args: Prisma.CashBankTransferAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateCashBankTransfer>
          }
          groupBy: {
            args: Prisma.CashBankTransferGroupByArgs<ExtArgs>
            result: $Utils.Optional<CashBankTransferGroupByOutputType>[]
          }
          count: {
            args: Prisma.CashBankTransferCountArgs<ExtArgs>
            result: $Utils.Optional<CashBankTransferCountAggregateOutputType> | number
          }
        }
      }
    }
  } & {
    other: {
      payload: any
      operations: {
        $executeRaw: {
          args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
          result: any
        }
        $executeRawUnsafe: {
          args: [query: string, ...values: any[]],
          result: any
        }
        $queryRaw: {
          args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
          result: any
        }
        $queryRawUnsafe: {
          args: [query: string, ...values: any[]],
          result: any
        }
      }
    }
  }
  export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs>
  export type DefaultPrismaClient = PrismaClient
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
  export interface PrismaClientOptions {
    /**
     * @default "colorless"
     */
    errorFormat?: ErrorFormat
    /**
     * @example
     * ```
     * // Shorthand for `emit: 'stdout'`
     * log: ['query', 'info', 'warn', 'error']
     * 
     * // Emit as events only
     * log: [
     *   { emit: 'event', level: 'query' },
     *   { emit: 'event', level: 'info' },
     *   { emit: 'event', level: 'warn' }
     *   { emit: 'event', level: 'error' }
     * ]
     * 
     * / Emit as events and log to stdout
     * og: [
     *  { emit: 'stdout', level: 'query' },
     *  { emit: 'stdout', level: 'info' },
     *  { emit: 'stdout', level: 'warn' }
     *  { emit: 'stdout', level: 'error' }
     * 
     * ```
     * Read more in our [docs](https://pris.ly/d/logging).
     */
    log?: (LogLevel | LogDefinition)[]
    /**
     * The default values for transactionOptions
     * maxWait ?= 2000
     * timeout ?= 5000
     */
    transactionOptions?: {
      maxWait?: number
      timeout?: number
      isolationLevel?: Prisma.TransactionIsolationLevel
    }
    /**
     * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
     */
    adapter?: runtime.SqlDriverAdapterFactory
    /**
     * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database.
     */
    accelerateUrl?: string
    /**
     * Global configuration for omitting model fields by default.
     * 
     * @example
     * ```
     * const prisma = new PrismaClient({
     *   omit: {
     *     user: {
     *       password: true
     *     }
     *   }
     * })
     * ```
     */
    omit?: Prisma.GlobalOmitConfig
    /**
     * SQL commenter plugins that add metadata to SQL queries as comments.
     * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
     * 
     * @example
     * ```
     * const prisma = new PrismaClient({
     *   adapter,
     *   comments: [
     *     traceContext(),
     *     queryInsights(),
     *   ],
     * })
     * ```
     */
    comments?: runtime.SqlCommenterPlugin[]
  }
  export type GlobalOmitConfig = {
    role?: RoleOmit
    user?: UserOmit
    state?: StateOmit
    district?: DistrictOmit
    vegetable?: VegetableOmit
    customer?: CustomerOmit
    supplier?: SupplierOmit
    supplierPayment?: SupplierPaymentOmit
    upi?: UpiOmit
    purchase?: PurchaseOmit
    shop?: ShopOmit
    sale?: SaleOmit
    saleItem?: SaleItemOmit
    customerReceipt?: CustomerReceiptOmit
    expense?: ExpenseOmit
    forgotPassword?: ForgotPasswordOmit
    stockSpoilage?: StockSpoilageOmit
    saleReturn?: SaleReturnOmit
    arrivalSettlement?: ArrivalSettlementOmit
    arrivalCustomPatti?: ArrivalCustomPattiOmit
    quotation?: QuotationOmit
    quotationItem?: QuotationItemOmit
    purchaseReturn?: PurchaseReturnOmit
    retailStock?: RetailStockOmit
    retailStockReturn?: RetailStockReturnOmit
    retailSale?: RetailSaleOmit
    retailSaleItem?: RetailSaleItemOmit
    retailStockSpoilage?: RetailStockSpoilageOmit
    boxReturn?: BoxReturnOmit
    employee?: EmployeeOmit
    attendance?: AttendanceOmit
    auditLog?: AuditLogOmit
    fastBilling?: FastBillingOmit
    fastBillingItem?: FastBillingItemOmit
    cashBankSetting?: CashBankSettingOmit
    cashBankTransfer?: CashBankTransferOmit
  }

  /* Types for Logging */
  export type LogLevel = 'info' | 'query' | 'warn' | 'error'
  export type LogDefinition = {
    level: LogLevel
    emit: 'stdout' | 'event'
  }

  export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;

  export type GetLogType<T> = CheckIsLogLevel<
    T extends LogDefinition ? T['level'] : T
  >;

  export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
    ? GetLogType<T[number]>
    : never;

  export type QueryEvent = {
    timestamp: Date
    query: string
    params: string
    duration: number
    target: string
  }

  export type LogEvent = {
    timestamp: Date
    message: string
    target: string
  }
  /* End Types for Logging */


  export type PrismaAction =
    | 'findUnique'
    | 'findUniqueOrThrow'
    | 'findMany'
    | 'findFirst'
    | 'findFirstOrThrow'
    | 'create'
    | 'createMany'
    | 'createManyAndReturn'
    | 'update'
    | 'updateMany'
    | 'updateManyAndReturn'
    | 'upsert'
    | 'delete'
    | 'deleteMany'
    | 'executeRaw'
    | 'queryRaw'
    | 'aggregate'
    | 'count'
    | 'runCommandRaw'
    | 'findRaw'
    | 'groupBy'

  // tested in getLogLevel.test.ts
  export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;

  /**
   * `PrismaClient` proxy available in interactive transactions.
   */
  export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>

  export type Datasource = {
    url?: string
  }

  /**
   * Count Types
   */


  /**
   * Count Type RoleCountOutputType
   */

  export type RoleCountOutputType = {
    users: number
  }

  export type RoleCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    users?: boolean | RoleCountOutputTypeCountUsersArgs
  }

  // Custom InputTypes
  /**
   * RoleCountOutputType without action
   */
  export type RoleCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RoleCountOutputType
     */
    select?: RoleCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * RoleCountOutputType without action
   */
  export type RoleCountOutputTypeCountUsersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserWhereInput
  }


  /**
   * Count Type UserCountOutputType
   */

  export type UserCountOutputType = {
    createdStates: number
    createdDistricts: number
    createdVegetables: number
    createdCustomers: number
    createdSuppliers: number
    createdSupplierPayments: number
    createdUpis: number
    createdPurchases: number
    createdShops: number
    createdSales: number
    createdSaleItems: number
    createdCustomerReceipts: number
    createdExpenses: number
    createdStockSpoilages: number
    createdSaleReturns: number
    createdQuotations: number
    createdQuotationItems: number
    createdPurchaseReturns: number
    createdRetailStocks: number
    createdRetailSales: number
    createdRetailSaleItems: number
    createdRetailStockSpoilages: number
    createdRetailStockReturns: number
    createdBoxReturns: number
    createdEmployees: number
    createdAttendances: number
    createdArrivalSettlements: number
    createdArrivalCustomPattis: number
    createdFastBillings: number
    createdFastBillingItems: number
    createdCashBankTransfers: number
    deletedCashBankTransfers: number
    auditLogs: number
  }

  export type UserCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    createdStates?: boolean | UserCountOutputTypeCountCreatedStatesArgs
    createdDistricts?: boolean | UserCountOutputTypeCountCreatedDistrictsArgs
    createdVegetables?: boolean | UserCountOutputTypeCountCreatedVegetablesArgs
    createdCustomers?: boolean | UserCountOutputTypeCountCreatedCustomersArgs
    createdSuppliers?: boolean | UserCountOutputTypeCountCreatedSuppliersArgs
    createdSupplierPayments?: boolean | UserCountOutputTypeCountCreatedSupplierPaymentsArgs
    createdUpis?: boolean | UserCountOutputTypeCountCreatedUpisArgs
    createdPurchases?: boolean | UserCountOutputTypeCountCreatedPurchasesArgs
    createdShops?: boolean | UserCountOutputTypeCountCreatedShopsArgs
    createdSales?: boolean | UserCountOutputTypeCountCreatedSalesArgs
    createdSaleItems?: boolean | UserCountOutputTypeCountCreatedSaleItemsArgs
    createdCustomerReceipts?: boolean | UserCountOutputTypeCountCreatedCustomerReceiptsArgs
    createdExpenses?: boolean | UserCountOutputTypeCountCreatedExpensesArgs
    createdStockSpoilages?: boolean | UserCountOutputTypeCountCreatedStockSpoilagesArgs
    createdSaleReturns?: boolean | UserCountOutputTypeCountCreatedSaleReturnsArgs
    createdQuotations?: boolean | UserCountOutputTypeCountCreatedQuotationsArgs
    createdQuotationItems?: boolean | UserCountOutputTypeCountCreatedQuotationItemsArgs
    createdPurchaseReturns?: boolean | UserCountOutputTypeCountCreatedPurchaseReturnsArgs
    createdRetailStocks?: boolean | UserCountOutputTypeCountCreatedRetailStocksArgs
    createdRetailSales?: boolean | UserCountOutputTypeCountCreatedRetailSalesArgs
    createdRetailSaleItems?: boolean | UserCountOutputTypeCountCreatedRetailSaleItemsArgs
    createdRetailStockSpoilages?: boolean | UserCountOutputTypeCountCreatedRetailStockSpoilagesArgs
    createdRetailStockReturns?: boolean | UserCountOutputTypeCountCreatedRetailStockReturnsArgs
    createdBoxReturns?: boolean | UserCountOutputTypeCountCreatedBoxReturnsArgs
    createdEmployees?: boolean | UserCountOutputTypeCountCreatedEmployeesArgs
    createdAttendances?: boolean | UserCountOutputTypeCountCreatedAttendancesArgs
    createdArrivalSettlements?: boolean | UserCountOutputTypeCountCreatedArrivalSettlementsArgs
    createdArrivalCustomPattis?: boolean | UserCountOutputTypeCountCreatedArrivalCustomPattisArgs
    createdFastBillings?: boolean | UserCountOutputTypeCountCreatedFastBillingsArgs
    createdFastBillingItems?: boolean | UserCountOutputTypeCountCreatedFastBillingItemsArgs
    createdCashBankTransfers?: boolean | UserCountOutputTypeCountCreatedCashBankTransfersArgs
    deletedCashBankTransfers?: boolean | UserCountOutputTypeCountDeletedCashBankTransfersArgs
    auditLogs?: boolean | UserCountOutputTypeCountAuditLogsArgs
  }

  // Custom InputTypes
  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserCountOutputType
     */
    select?: UserCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedStatesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: StateWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedDistrictsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: DistrictWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedVegetablesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: VegetableWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedCustomersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedSuppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedSupplierPaymentsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierPaymentWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedUpisArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UpiWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedPurchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedShopsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ShopWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedSalesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleItemWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedCustomerReceiptsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerReceiptWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedExpensesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ExpenseWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: StockSpoilageWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedSaleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleReturnWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedQuotationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedQuotationItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationItemWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedPurchaseReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseReturnWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedRetailStocksArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedRetailSalesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedRetailSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleItemWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedRetailStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockSpoilageWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedRetailStockReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockReturnWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedBoxReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: BoxReturnWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedEmployeesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: EmployeeWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedAttendancesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: AttendanceWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedArrivalSettlementsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ArrivalSettlementWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedArrivalCustomPattisArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ArrivalCustomPattiWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedFastBillingsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FastBillingWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedFastBillingItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FastBillingItemWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountCreatedCashBankTransfersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CashBankTransferWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountDeletedCashBankTransfersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CashBankTransferWhereInput
  }

  /**
   * UserCountOutputType without action
   */
  export type UserCountOutputTypeCountAuditLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: AuditLogWhereInput
  }


  /**
   * Count Type StateCountOutputType
   */

  export type StateCountOutputType = {
    districts: number
    customers: number
    suppliers: number
  }

  export type StateCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    districts?: boolean | StateCountOutputTypeCountDistrictsArgs
    customers?: boolean | StateCountOutputTypeCountCustomersArgs
    suppliers?: boolean | StateCountOutputTypeCountSuppliersArgs
  }

  // Custom InputTypes
  /**
   * StateCountOutputType without action
   */
  export type StateCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StateCountOutputType
     */
    select?: StateCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * StateCountOutputType without action
   */
  export type StateCountOutputTypeCountDistrictsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: DistrictWhereInput
  }

  /**
   * StateCountOutputType without action
   */
  export type StateCountOutputTypeCountCustomersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerWhereInput
  }

  /**
   * StateCountOutputType without action
   */
  export type StateCountOutputTypeCountSuppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierWhereInput
  }


  /**
   * Count Type DistrictCountOutputType
   */

  export type DistrictCountOutputType = {
    customers: number
    suppliers: number
  }

  export type DistrictCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    customers?: boolean | DistrictCountOutputTypeCountCustomersArgs
    suppliers?: boolean | DistrictCountOutputTypeCountSuppliersArgs
  }

  // Custom InputTypes
  /**
   * DistrictCountOutputType without action
   */
  export type DistrictCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the DistrictCountOutputType
     */
    select?: DistrictCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * DistrictCountOutputType without action
   */
  export type DistrictCountOutputTypeCountCustomersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerWhereInput
  }

  /**
   * DistrictCountOutputType without action
   */
  export type DistrictCountOutputTypeCountSuppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierWhereInput
  }


  /**
   * Count Type VegetableCountOutputType
   */

  export type VegetableCountOutputType = {
    purchases: number
    quotationItems: number
  }

  export type VegetableCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchases?: boolean | VegetableCountOutputTypeCountPurchasesArgs
    quotationItems?: boolean | VegetableCountOutputTypeCountQuotationItemsArgs
  }

  // Custom InputTypes
  /**
   * VegetableCountOutputType without action
   */
  export type VegetableCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the VegetableCountOutputType
     */
    select?: VegetableCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * VegetableCountOutputType without action
   */
  export type VegetableCountOutputTypeCountPurchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseWhereInput
  }

  /**
   * VegetableCountOutputType without action
   */
  export type VegetableCountOutputTypeCountQuotationItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationItemWhereInput
  }


  /**
   * Count Type CustomerCountOutputType
   */

  export type CustomerCountOutputType = {
    sales: number
    customerReceipts: number
    quotations: number
  }

  export type CustomerCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    sales?: boolean | CustomerCountOutputTypeCountSalesArgs
    customerReceipts?: boolean | CustomerCountOutputTypeCountCustomerReceiptsArgs
    quotations?: boolean | CustomerCountOutputTypeCountQuotationsArgs
  }

  // Custom InputTypes
  /**
   * CustomerCountOutputType without action
   */
  export type CustomerCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerCountOutputType
     */
    select?: CustomerCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * CustomerCountOutputType without action
   */
  export type CustomerCountOutputTypeCountSalesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleWhereInput
  }

  /**
   * CustomerCountOutputType without action
   */
  export type CustomerCountOutputTypeCountCustomerReceiptsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerReceiptWhereInput
  }

  /**
   * CustomerCountOutputType without action
   */
  export type CustomerCountOutputTypeCountQuotationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationWhereInput
  }


  /**
   * Count Type SupplierCountOutputType
   */

  export type SupplierCountOutputType = {
    purchases: number
    supplierPayments: number
    boxReturns: number
  }

  export type SupplierCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchases?: boolean | SupplierCountOutputTypeCountPurchasesArgs
    supplierPayments?: boolean | SupplierCountOutputTypeCountSupplierPaymentsArgs
    boxReturns?: boolean | SupplierCountOutputTypeCountBoxReturnsArgs
  }

  // Custom InputTypes
  /**
   * SupplierCountOutputType without action
   */
  export type SupplierCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierCountOutputType
     */
    select?: SupplierCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * SupplierCountOutputType without action
   */
  export type SupplierCountOutputTypeCountPurchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseWhereInput
  }

  /**
   * SupplierCountOutputType without action
   */
  export type SupplierCountOutputTypeCountSupplierPaymentsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierPaymentWhereInput
  }

  /**
   * SupplierCountOutputType without action
   */
  export type SupplierCountOutputTypeCountBoxReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: BoxReturnWhereInput
  }


  /**
   * Count Type PurchaseCountOutputType
   */

  export type PurchaseCountOutputType = {
    saleItems: number
    stockSpoilages: number
    saleReturns: number
    purchaseReturns: number
    retailStocks: number
    expenses: number
  }

  export type PurchaseCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    saleItems?: boolean | PurchaseCountOutputTypeCountSaleItemsArgs
    stockSpoilages?: boolean | PurchaseCountOutputTypeCountStockSpoilagesArgs
    saleReturns?: boolean | PurchaseCountOutputTypeCountSaleReturnsArgs
    purchaseReturns?: boolean | PurchaseCountOutputTypeCountPurchaseReturnsArgs
    retailStocks?: boolean | PurchaseCountOutputTypeCountRetailStocksArgs
    expenses?: boolean | PurchaseCountOutputTypeCountExpensesArgs
  }

  // Custom InputTypes
  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseCountOutputType
     */
    select?: PurchaseCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleItemWhereInput
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: StockSpoilageWhereInput
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountSaleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleReturnWhereInput
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountPurchaseReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseReturnWhereInput
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountRetailStocksArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockWhereInput
  }

  /**
   * PurchaseCountOutputType without action
   */
  export type PurchaseCountOutputTypeCountExpensesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ExpenseWhereInput
  }


  /**
   * Count Type SaleCountOutputType
   */

  export type SaleCountOutputType = {
    items: number
  }

  export type SaleCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | SaleCountOutputTypeCountItemsArgs
  }

  // Custom InputTypes
  /**
   * SaleCountOutputType without action
   */
  export type SaleCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleCountOutputType
     */
    select?: SaleCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * SaleCountOutputType without action
   */
  export type SaleCountOutputTypeCountItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleItemWhereInput
  }


  /**
   * Count Type SaleItemCountOutputType
   */

  export type SaleItemCountOutputType = {
    saleReturns: number
  }

  export type SaleItemCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    saleReturns?: boolean | SaleItemCountOutputTypeCountSaleReturnsArgs
  }

  // Custom InputTypes
  /**
   * SaleItemCountOutputType without action
   */
  export type SaleItemCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItemCountOutputType
     */
    select?: SaleItemCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * SaleItemCountOutputType without action
   */
  export type SaleItemCountOutputTypeCountSaleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleReturnWhereInput
  }


  /**
   * Count Type QuotationCountOutputType
   */

  export type QuotationCountOutputType = {
    items: number
  }

  export type QuotationCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | QuotationCountOutputTypeCountItemsArgs
  }

  // Custom InputTypes
  /**
   * QuotationCountOutputType without action
   */
  export type QuotationCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationCountOutputType
     */
    select?: QuotationCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * QuotationCountOutputType without action
   */
  export type QuotationCountOutputTypeCountItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationItemWhereInput
  }


  /**
   * Count Type RetailStockCountOutputType
   */

  export type RetailStockCountOutputType = {
    retailSaleItems: number
    retailStockSpoilages: number
    retailStockReturns: number
  }

  export type RetailStockCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    retailSaleItems?: boolean | RetailStockCountOutputTypeCountRetailSaleItemsArgs
    retailStockSpoilages?: boolean | RetailStockCountOutputTypeCountRetailStockSpoilagesArgs
    retailStockReturns?: boolean | RetailStockCountOutputTypeCountRetailStockReturnsArgs
  }

  // Custom InputTypes
  /**
   * RetailStockCountOutputType without action
   */
  export type RetailStockCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockCountOutputType
     */
    select?: RetailStockCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * RetailStockCountOutputType without action
   */
  export type RetailStockCountOutputTypeCountRetailSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleItemWhereInput
  }

  /**
   * RetailStockCountOutputType without action
   */
  export type RetailStockCountOutputTypeCountRetailStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockSpoilageWhereInput
  }

  /**
   * RetailStockCountOutputType without action
   */
  export type RetailStockCountOutputTypeCountRetailStockReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockReturnWhereInput
  }


  /**
   * Count Type RetailSaleCountOutputType
   */

  export type RetailSaleCountOutputType = {
    items: number
  }

  export type RetailSaleCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | RetailSaleCountOutputTypeCountItemsArgs
  }

  // Custom InputTypes
  /**
   * RetailSaleCountOutputType without action
   */
  export type RetailSaleCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleCountOutputType
     */
    select?: RetailSaleCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * RetailSaleCountOutputType without action
   */
  export type RetailSaleCountOutputTypeCountItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleItemWhereInput
  }


  /**
   * Count Type EmployeeCountOutputType
   */

  export type EmployeeCountOutputType = {
    attendances: number
  }

  export type EmployeeCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    attendances?: boolean | EmployeeCountOutputTypeCountAttendancesArgs
  }

  // Custom InputTypes
  /**
   * EmployeeCountOutputType without action
   */
  export type EmployeeCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the EmployeeCountOutputType
     */
    select?: EmployeeCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * EmployeeCountOutputType without action
   */
  export type EmployeeCountOutputTypeCountAttendancesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: AttendanceWhereInput
  }


  /**
   * Count Type FastBillingCountOutputType
   */

  export type FastBillingCountOutputType = {
    items: number
  }

  export type FastBillingCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | FastBillingCountOutputTypeCountItemsArgs
  }

  // Custom InputTypes
  /**
   * FastBillingCountOutputType without action
   */
  export type FastBillingCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingCountOutputType
     */
    select?: FastBillingCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * FastBillingCountOutputType without action
   */
  export type FastBillingCountOutputTypeCountItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FastBillingItemWhereInput
  }


  /**
   * Models
   */

  /**
   * Model Role
   */

  export type AggregateRole = {
    _count: RoleCountAggregateOutputType | null
    _avg: RoleAvgAggregateOutputType | null
    _sum: RoleSumAggregateOutputType | null
    _min: RoleMinAggregateOutputType | null
    _max: RoleMaxAggregateOutputType | null
  }

  export type RoleAvgAggregateOutputType = {
    id: number | null
  }

  export type RoleSumAggregateOutputType = {
    id: bigint | null
  }

  export type RoleMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RoleMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RoleCountAggregateOutputType = {
    id: number
    name: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type RoleAvgAggregateInputType = {
    id?: true
  }

  export type RoleSumAggregateInputType = {
    id?: true
  }

  export type RoleMinAggregateInputType = {
    id?: true
    name?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RoleMaxAggregateInputType = {
    id?: true
    name?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RoleCountAggregateInputType = {
    id?: true
    name?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type RoleAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Role to aggregate.
     */
    where?: RoleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Roles to fetch.
     */
    orderBy?: RoleOrderByWithRelationInput | RoleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RoleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Roles 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` Roles.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Roles
    **/
    _count?: true | RoleCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RoleAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RoleSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RoleMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RoleMaxAggregateInputType
  }

  export type GetRoleAggregateType<T extends RoleAggregateArgs> = {
        [P in keyof T & keyof AggregateRole]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRole[P]>
      : GetScalarType<T[P], AggregateRole[P]>
  }




  export type RoleGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RoleWhereInput
    orderBy?: RoleOrderByWithAggregationInput | RoleOrderByWithAggregationInput[]
    by: RoleScalarFieldEnum[] | RoleScalarFieldEnum
    having?: RoleScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RoleCountAggregateInputType | true
    _avg?: RoleAvgAggregateInputType
    _sum?: RoleSumAggregateInputType
    _min?: RoleMinAggregateInputType
    _max?: RoleMaxAggregateInputType
  }

  export type RoleGroupByOutputType = {
    id: bigint
    name: string
    createdAt: Date
    updatedAt: Date
    _count: RoleCountAggregateOutputType | null
    _avg: RoleAvgAggregateOutputType | null
    _sum: RoleSumAggregateOutputType | null
    _min: RoleMinAggregateOutputType | null
    _max: RoleMaxAggregateOutputType | null
  }

  type GetRoleGroupByPayload<T extends RoleGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RoleGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RoleGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RoleGroupByOutputType[P]>
            : GetScalarType<T[P], RoleGroupByOutputType[P]>
        }
      >
    >


  export type RoleSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    users?: boolean | Role$usersArgs<ExtArgs>
    _count?: boolean | RoleCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["role"]>



  export type RoleSelectScalar = {
    id?: boolean
    name?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type RoleOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "createdAt" | "updatedAt", ExtArgs["result"]["role"]>
  export type RoleInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    users?: boolean | Role$usersArgs<ExtArgs>
    _count?: boolean | RoleCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $RolePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Role"
    objects: {
      users: Prisma.$UserPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["role"]>
    composites: {}
  }

  type RoleGetPayload<S extends boolean | null | undefined | RoleDefaultArgs> = $Result.GetResult<Prisma.$RolePayload, S>

  type RoleCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RoleFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RoleCountAggregateInputType | true
    }

  export interface RoleDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Role'], meta: { name: 'Role' } }
    /**
     * Find zero or one Role that matches the filter.
     * @param {RoleFindUniqueArgs} args - Arguments to find a Role
     * @example
     * // Get one Role
     * const role = await prisma.role.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RoleFindUniqueArgs>(args: SelectSubset<T, RoleFindUniqueArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Role that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RoleFindUniqueOrThrowArgs} args - Arguments to find a Role
     * @example
     * // Get one Role
     * const role = await prisma.role.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RoleFindUniqueOrThrowArgs>(args: SelectSubset<T, RoleFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Role 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 {RoleFindFirstArgs} args - Arguments to find a Role
     * @example
     * // Get one Role
     * const role = await prisma.role.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RoleFindFirstArgs>(args?: SelectSubset<T, RoleFindFirstArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Role 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 {RoleFindFirstOrThrowArgs} args - Arguments to find a Role
     * @example
     * // Get one Role
     * const role = await prisma.role.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RoleFindFirstOrThrowArgs>(args?: SelectSubset<T, RoleFindFirstOrThrowArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Roles 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 {RoleFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Roles
     * const roles = await prisma.role.findMany()
     * 
     * // Get first 10 Roles
     * const roles = await prisma.role.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const roleWithIdOnly = await prisma.role.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RoleFindManyArgs>(args?: SelectSubset<T, RoleFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Role.
     * @param {RoleCreateArgs} args - Arguments to create a Role.
     * @example
     * // Create one Role
     * const Role = await prisma.role.create({
     *   data: {
     *     // ... data to create a Role
     *   }
     * })
     * 
     */
    create<T extends RoleCreateArgs>(args: SelectSubset<T, RoleCreateArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Roles.
     * @param {RoleCreateManyArgs} args - Arguments to create many Roles.
     * @example
     * // Create many Roles
     * const role = await prisma.role.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RoleCreateManyArgs>(args?: SelectSubset<T, RoleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Role.
     * @param {RoleDeleteArgs} args - Arguments to delete one Role.
     * @example
     * // Delete one Role
     * const Role = await prisma.role.delete({
     *   where: {
     *     // ... filter to delete one Role
     *   }
     * })
     * 
     */
    delete<T extends RoleDeleteArgs>(args: SelectSubset<T, RoleDeleteArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Role.
     * @param {RoleUpdateArgs} args - Arguments to update one Role.
     * @example
     * // Update one Role
     * const role = await prisma.role.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RoleUpdateArgs>(args: SelectSubset<T, RoleUpdateArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Roles.
     * @param {RoleDeleteManyArgs} args - Arguments to filter Roles to delete.
     * @example
     * // Delete a few Roles
     * const { count } = await prisma.role.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RoleDeleteManyArgs>(args?: SelectSubset<T, RoleDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Roles.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RoleUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Roles
     * const role = await prisma.role.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RoleUpdateManyArgs>(args: SelectSubset<T, RoleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Role.
     * @param {RoleUpsertArgs} args - Arguments to update or create a Role.
     * @example
     * // Update or create a Role
     * const role = await prisma.role.upsert({
     *   create: {
     *     // ... data to create a Role
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Role we want to update
     *   }
     * })
     */
    upsert<T extends RoleUpsertArgs>(args: SelectSubset<T, RoleUpsertArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Roles.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RoleCountArgs} args - Arguments to filter Roles to count.
     * @example
     * // Count the number of Roles
     * const count = await prisma.role.count({
     *   where: {
     *     // ... the filter for the Roles we want to count
     *   }
     * })
    **/
    count<T extends RoleCountArgs>(
      args?: Subset<T, RoleCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RoleCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Role.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RoleAggregateArgs} 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 RoleAggregateArgs>(args: Subset<T, RoleAggregateArgs>): Prisma.PrismaPromise<GetRoleAggregateType<T>>

    /**
     * Group by Role.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RoleGroupByArgs} 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 RoleGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RoleGroupByArgs['orderBy'] }
        : { orderBy?: RoleGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RoleGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRoleGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Role model
   */
  readonly fields: RoleFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Role.
   * 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__RoleClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    users<T extends Role$usersArgs<ExtArgs> = {}>(args?: Subset<T, Role$usersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    /**
     * 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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Role model
   */
  interface RoleFieldRefs {
    readonly id: FieldRef<"Role", 'BigInt'>
    readonly name: FieldRef<"Role", 'String'>
    readonly createdAt: FieldRef<"Role", 'DateTime'>
    readonly updatedAt: FieldRef<"Role", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Role findUnique
   */
  export type RoleFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter, which Role to fetch.
     */
    where: RoleWhereUniqueInput
  }

  /**
   * Role findUniqueOrThrow
   */
  export type RoleFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter, which Role to fetch.
     */
    where: RoleWhereUniqueInput
  }

  /**
   * Role findFirst
   */
  export type RoleFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter, which Role to fetch.
     */
    where?: RoleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Roles to fetch.
     */
    orderBy?: RoleOrderByWithRelationInput | RoleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Roles.
     */
    cursor?: RoleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Roles 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` Roles.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Roles.
     */
    distinct?: RoleScalarFieldEnum | RoleScalarFieldEnum[]
  }

  /**
   * Role findFirstOrThrow
   */
  export type RoleFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter, which Role to fetch.
     */
    where?: RoleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Roles to fetch.
     */
    orderBy?: RoleOrderByWithRelationInput | RoleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Roles.
     */
    cursor?: RoleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Roles 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` Roles.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Roles.
     */
    distinct?: RoleScalarFieldEnum | RoleScalarFieldEnum[]
  }

  /**
   * Role findMany
   */
  export type RoleFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter, which Roles to fetch.
     */
    where?: RoleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Roles to fetch.
     */
    orderBy?: RoleOrderByWithRelationInput | RoleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Roles.
     */
    cursor?: RoleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Roles 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` Roles.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Roles.
     */
    distinct?: RoleScalarFieldEnum | RoleScalarFieldEnum[]
  }

  /**
   * Role create
   */
  export type RoleCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * The data needed to create a Role.
     */
    data: XOR<RoleCreateInput, RoleUncheckedCreateInput>
  }

  /**
   * Role createMany
   */
  export type RoleCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Roles.
     */
    data: RoleCreateManyInput | RoleCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Role update
   */
  export type RoleUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * The data needed to update a Role.
     */
    data: XOR<RoleUpdateInput, RoleUncheckedUpdateInput>
    /**
     * Choose, which Role to update.
     */
    where: RoleWhereUniqueInput
  }

  /**
   * Role updateMany
   */
  export type RoleUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Roles.
     */
    data: XOR<RoleUpdateManyMutationInput, RoleUncheckedUpdateManyInput>
    /**
     * Filter which Roles to update
     */
    where?: RoleWhereInput
    /**
     * Limit how many Roles to update.
     */
    limit?: number
  }

  /**
   * Role upsert
   */
  export type RoleUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * The filter to search for the Role to update in case it exists.
     */
    where: RoleWhereUniqueInput
    /**
     * In case the Role found by the `where` argument doesn't exist, create a new Role with this data.
     */
    create: XOR<RoleCreateInput, RoleUncheckedCreateInput>
    /**
     * In case the Role was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RoleUpdateInput, RoleUncheckedUpdateInput>
  }

  /**
   * Role delete
   */
  export type RoleDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
    /**
     * Filter which Role to delete.
     */
    where: RoleWhereUniqueInput
  }

  /**
   * Role deleteMany
   */
  export type RoleDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Roles to delete
     */
    where?: RoleWhereInput
    /**
     * Limit how many Roles to delete.
     */
    limit?: number
  }

  /**
   * Role.users
   */
  export type Role$usersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
    orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
    cursor?: UserWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
  }

  /**
   * Role without action
   */
  export type RoleDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Role
     */
    select?: RoleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Role
     */
    omit?: RoleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RoleInclude<ExtArgs> | null
  }


  /**
   * Model User
   */

  export type AggregateUser = {
    _count: UserCountAggregateOutputType | null
    _avg: UserAvgAggregateOutputType | null
    _sum: UserSumAggregateOutputType | null
    _min: UserMinAggregateOutputType | null
    _max: UserMaxAggregateOutputType | null
  }

  export type UserAvgAggregateOutputType = {
    id: number | null
    roleId: number | null
  }

  export type UserSumAggregateOutputType = {
    id: bigint | null
    roleId: bigint | null
  }

  export type UserMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    email: string | null
    mobileNo: string | null
    password: string | null
    roleId: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    status: boolean | null
    profile: string | null
  }

  export type UserMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    email: string | null
    mobileNo: string | null
    password: string | null
    roleId: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    status: boolean | null
    profile: string | null
  }

  export type UserCountAggregateOutputType = {
    id: number
    name: number
    email: number
    mobileNo: number
    password: number
    roleId: number
    createdAt: number
    updatedAt: number
    status: number
    profile: number
    _all: number
  }


  export type UserAvgAggregateInputType = {
    id?: true
    roleId?: true
  }

  export type UserSumAggregateInputType = {
    id?: true
    roleId?: true
  }

  export type UserMinAggregateInputType = {
    id?: true
    name?: true
    email?: true
    mobileNo?: true
    password?: true
    roleId?: true
    createdAt?: true
    updatedAt?: true
    status?: true
    profile?: true
  }

  export type UserMaxAggregateInputType = {
    id?: true
    name?: true
    email?: true
    mobileNo?: true
    password?: true
    roleId?: true
    createdAt?: true
    updatedAt?: true
    status?: true
    profile?: true
  }

  export type UserCountAggregateInputType = {
    id?: true
    name?: true
    email?: true
    mobileNo?: true
    password?: true
    roleId?: true
    createdAt?: true
    updatedAt?: true
    status?: true
    profile?: true
    _all?: true
  }

  export type UserAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which User to aggregate.
     */
    where?: UserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Users to fetch.
     */
    orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Users 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` Users.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Users
    **/
    _count?: true | UserCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: UserAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: UserSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UserMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UserMaxAggregateInputType
  }

  export type GetUserAggregateType<T extends UserAggregateArgs> = {
        [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUser[P]>
      : GetScalarType<T[P], AggregateUser[P]>
  }




  export type UserGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserWhereInput
    orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[]
    by: UserScalarFieldEnum[] | UserScalarFieldEnum
    having?: UserScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UserCountAggregateInputType | true
    _avg?: UserAvgAggregateInputType
    _sum?: UserSumAggregateInputType
    _min?: UserMinAggregateInputType
    _max?: UserMaxAggregateInputType
  }

  export type UserGroupByOutputType = {
    id: bigint
    name: string
    email: string
    mobileNo: string | null
    password: string
    roleId: bigint
    createdAt: Date
    updatedAt: Date
    status: boolean
    profile: string | null
    _count: UserCountAggregateOutputType | null
    _avg: UserAvgAggregateOutputType | null
    _sum: UserSumAggregateOutputType | null
    _min: UserMinAggregateOutputType | null
    _max: UserMaxAggregateOutputType | null
  }

  type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UserGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UserGroupByOutputType[P]>
            : GetScalarType<T[P], UserGroupByOutputType[P]>
        }
      >
    >


  export type UserSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    email?: boolean
    mobileNo?: boolean
    password?: boolean
    roleId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    status?: boolean
    profile?: boolean
    role?: boolean | RoleDefaultArgs<ExtArgs>
    forgotPassword?: boolean | User$forgotPasswordArgs<ExtArgs>
    createdStates?: boolean | User$createdStatesArgs<ExtArgs>
    createdDistricts?: boolean | User$createdDistrictsArgs<ExtArgs>
    createdVegetables?: boolean | User$createdVegetablesArgs<ExtArgs>
    createdCustomers?: boolean | User$createdCustomersArgs<ExtArgs>
    createdSuppliers?: boolean | User$createdSuppliersArgs<ExtArgs>
    createdSupplierPayments?: boolean | User$createdSupplierPaymentsArgs<ExtArgs>
    createdUpis?: boolean | User$createdUpisArgs<ExtArgs>
    createdPurchases?: boolean | User$createdPurchasesArgs<ExtArgs>
    createdShops?: boolean | User$createdShopsArgs<ExtArgs>
    createdSales?: boolean | User$createdSalesArgs<ExtArgs>
    createdSaleItems?: boolean | User$createdSaleItemsArgs<ExtArgs>
    createdCustomerReceipts?: boolean | User$createdCustomerReceiptsArgs<ExtArgs>
    createdExpenses?: boolean | User$createdExpensesArgs<ExtArgs>
    createdStockSpoilages?: boolean | User$createdStockSpoilagesArgs<ExtArgs>
    createdSaleReturns?: boolean | User$createdSaleReturnsArgs<ExtArgs>
    createdQuotations?: boolean | User$createdQuotationsArgs<ExtArgs>
    createdQuotationItems?: boolean | User$createdQuotationItemsArgs<ExtArgs>
    createdPurchaseReturns?: boolean | User$createdPurchaseReturnsArgs<ExtArgs>
    createdRetailStocks?: boolean | User$createdRetailStocksArgs<ExtArgs>
    createdRetailSales?: boolean | User$createdRetailSalesArgs<ExtArgs>
    createdRetailSaleItems?: boolean | User$createdRetailSaleItemsArgs<ExtArgs>
    createdRetailStockSpoilages?: boolean | User$createdRetailStockSpoilagesArgs<ExtArgs>
    createdRetailStockReturns?: boolean | User$createdRetailStockReturnsArgs<ExtArgs>
    createdBoxReturns?: boolean | User$createdBoxReturnsArgs<ExtArgs>
    createdEmployees?: boolean | User$createdEmployeesArgs<ExtArgs>
    createdAttendances?: boolean | User$createdAttendancesArgs<ExtArgs>
    createdArrivalSettlements?: boolean | User$createdArrivalSettlementsArgs<ExtArgs>
    createdArrivalCustomPattis?: boolean | User$createdArrivalCustomPattisArgs<ExtArgs>
    createdFastBillings?: boolean | User$createdFastBillingsArgs<ExtArgs>
    createdFastBillingItems?: boolean | User$createdFastBillingItemsArgs<ExtArgs>
    createdCashBankTransfers?: boolean | User$createdCashBankTransfersArgs<ExtArgs>
    deletedCashBankTransfers?: boolean | User$deletedCashBankTransfersArgs<ExtArgs>
    auditLogs?: boolean | User$auditLogsArgs<ExtArgs>
    _count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["user"]>



  export type UserSelectScalar = {
    id?: boolean
    name?: boolean
    email?: boolean
    mobileNo?: boolean
    password?: boolean
    roleId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    status?: boolean
    profile?: boolean
  }

  export type UserOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "email" | "mobileNo" | "password" | "roleId" | "createdAt" | "updatedAt" | "status" | "profile", ExtArgs["result"]["user"]>
  export type UserInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    role?: boolean | RoleDefaultArgs<ExtArgs>
    forgotPassword?: boolean | User$forgotPasswordArgs<ExtArgs>
    createdStates?: boolean | User$createdStatesArgs<ExtArgs>
    createdDistricts?: boolean | User$createdDistrictsArgs<ExtArgs>
    createdVegetables?: boolean | User$createdVegetablesArgs<ExtArgs>
    createdCustomers?: boolean | User$createdCustomersArgs<ExtArgs>
    createdSuppliers?: boolean | User$createdSuppliersArgs<ExtArgs>
    createdSupplierPayments?: boolean | User$createdSupplierPaymentsArgs<ExtArgs>
    createdUpis?: boolean | User$createdUpisArgs<ExtArgs>
    createdPurchases?: boolean | User$createdPurchasesArgs<ExtArgs>
    createdShops?: boolean | User$createdShopsArgs<ExtArgs>
    createdSales?: boolean | User$createdSalesArgs<ExtArgs>
    createdSaleItems?: boolean | User$createdSaleItemsArgs<ExtArgs>
    createdCustomerReceipts?: boolean | User$createdCustomerReceiptsArgs<ExtArgs>
    createdExpenses?: boolean | User$createdExpensesArgs<ExtArgs>
    createdStockSpoilages?: boolean | User$createdStockSpoilagesArgs<ExtArgs>
    createdSaleReturns?: boolean | User$createdSaleReturnsArgs<ExtArgs>
    createdQuotations?: boolean | User$createdQuotationsArgs<ExtArgs>
    createdQuotationItems?: boolean | User$createdQuotationItemsArgs<ExtArgs>
    createdPurchaseReturns?: boolean | User$createdPurchaseReturnsArgs<ExtArgs>
    createdRetailStocks?: boolean | User$createdRetailStocksArgs<ExtArgs>
    createdRetailSales?: boolean | User$createdRetailSalesArgs<ExtArgs>
    createdRetailSaleItems?: boolean | User$createdRetailSaleItemsArgs<ExtArgs>
    createdRetailStockSpoilages?: boolean | User$createdRetailStockSpoilagesArgs<ExtArgs>
    createdRetailStockReturns?: boolean | User$createdRetailStockReturnsArgs<ExtArgs>
    createdBoxReturns?: boolean | User$createdBoxReturnsArgs<ExtArgs>
    createdEmployees?: boolean | User$createdEmployeesArgs<ExtArgs>
    createdAttendances?: boolean | User$createdAttendancesArgs<ExtArgs>
    createdArrivalSettlements?: boolean | User$createdArrivalSettlementsArgs<ExtArgs>
    createdArrivalCustomPattis?: boolean | User$createdArrivalCustomPattisArgs<ExtArgs>
    createdFastBillings?: boolean | User$createdFastBillingsArgs<ExtArgs>
    createdFastBillingItems?: boolean | User$createdFastBillingItemsArgs<ExtArgs>
    createdCashBankTransfers?: boolean | User$createdCashBankTransfersArgs<ExtArgs>
    deletedCashBankTransfers?: boolean | User$deletedCashBankTransfersArgs<ExtArgs>
    auditLogs?: boolean | User$auditLogsArgs<ExtArgs>
    _count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $UserPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "User"
    objects: {
      role: Prisma.$RolePayload<ExtArgs>
      forgotPassword: Prisma.$ForgotPasswordPayload<ExtArgs> | null
      createdStates: Prisma.$StatePayload<ExtArgs>[]
      createdDistricts: Prisma.$DistrictPayload<ExtArgs>[]
      createdVegetables: Prisma.$VegetablePayload<ExtArgs>[]
      createdCustomers: Prisma.$CustomerPayload<ExtArgs>[]
      createdSuppliers: Prisma.$SupplierPayload<ExtArgs>[]
      createdSupplierPayments: Prisma.$SupplierPaymentPayload<ExtArgs>[]
      createdUpis: Prisma.$UpiPayload<ExtArgs>[]
      createdPurchases: Prisma.$PurchasePayload<ExtArgs>[]
      createdShops: Prisma.$ShopPayload<ExtArgs>[]
      createdSales: Prisma.$SalePayload<ExtArgs>[]
      createdSaleItems: Prisma.$SaleItemPayload<ExtArgs>[]
      createdCustomerReceipts: Prisma.$CustomerReceiptPayload<ExtArgs>[]
      createdExpenses: Prisma.$ExpensePayload<ExtArgs>[]
      createdStockSpoilages: Prisma.$StockSpoilagePayload<ExtArgs>[]
      createdSaleReturns: Prisma.$SaleReturnPayload<ExtArgs>[]
      createdQuotations: Prisma.$QuotationPayload<ExtArgs>[]
      createdQuotationItems: Prisma.$QuotationItemPayload<ExtArgs>[]
      createdPurchaseReturns: Prisma.$PurchaseReturnPayload<ExtArgs>[]
      createdRetailStocks: Prisma.$RetailStockPayload<ExtArgs>[]
      createdRetailSales: Prisma.$RetailSalePayload<ExtArgs>[]
      createdRetailSaleItems: Prisma.$RetailSaleItemPayload<ExtArgs>[]
      createdRetailStockSpoilages: Prisma.$RetailStockSpoilagePayload<ExtArgs>[]
      createdRetailStockReturns: Prisma.$RetailStockReturnPayload<ExtArgs>[]
      createdBoxReturns: Prisma.$BoxReturnPayload<ExtArgs>[]
      createdEmployees: Prisma.$EmployeePayload<ExtArgs>[]
      createdAttendances: Prisma.$AttendancePayload<ExtArgs>[]
      createdArrivalSettlements: Prisma.$ArrivalSettlementPayload<ExtArgs>[]
      createdArrivalCustomPattis: Prisma.$ArrivalCustomPattiPayload<ExtArgs>[]
      createdFastBillings: Prisma.$FastBillingPayload<ExtArgs>[]
      createdFastBillingItems: Prisma.$FastBillingItemPayload<ExtArgs>[]
      createdCashBankTransfers: Prisma.$CashBankTransferPayload<ExtArgs>[]
      deletedCashBankTransfers: Prisma.$CashBankTransferPayload<ExtArgs>[]
      auditLogs: Prisma.$AuditLogPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      email: string
      mobileNo: string | null
      password: string
      roleId: bigint
      createdAt: Date
      updatedAt: Date
      status: boolean
      profile: string | null
    }, ExtArgs["result"]["user"]>
    composites: {}
  }

  type UserGetPayload<S extends boolean | null | undefined | UserDefaultArgs> = $Result.GetResult<Prisma.$UserPayload, S>

  type UserCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UserFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UserCountAggregateInputType | true
    }

  export interface UserDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['User'], meta: { name: 'User' } }
    /**
     * Find zero or one User that matches the filter.
     * @param {UserFindUniqueArgs} args - Arguments to find a User
     * @example
     * // Get one User
     * const user = await prisma.user.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UserFindUniqueArgs>(args: SelectSubset<T, UserFindUniqueArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one User that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User
     * @example
     * // Get one User
     * const user = await prisma.user.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UserFindUniqueOrThrowArgs>(args: SelectSubset<T, UserFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first User 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 {UserFindFirstArgs} args - Arguments to find a User
     * @example
     * // Get one User
     * const user = await prisma.user.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UserFindFirstArgs>(args?: SelectSubset<T, UserFindFirstArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first User 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 {UserFindFirstOrThrowArgs} args - Arguments to find a User
     * @example
     * // Get one User
     * const user = await prisma.user.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UserFindFirstOrThrowArgs>(args?: SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Users 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 {UserFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Users
     * const users = await prisma.user.findMany()
     * 
     * // Get first 10 Users
     * const users = await prisma.user.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UserFindManyArgs>(args?: SelectSubset<T, UserFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a User.
     * @param {UserCreateArgs} args - Arguments to create a User.
     * @example
     * // Create one User
     * const User = await prisma.user.create({
     *   data: {
     *     // ... data to create a User
     *   }
     * })
     * 
     */
    create<T extends UserCreateArgs>(args: SelectSubset<T, UserCreateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Users.
     * @param {UserCreateManyArgs} args - Arguments to create many Users.
     * @example
     * // Create many Users
     * const user = await prisma.user.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UserCreateManyArgs>(args?: SelectSubset<T, UserCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a User.
     * @param {UserDeleteArgs} args - Arguments to delete one User.
     * @example
     * // Delete one User
     * const User = await prisma.user.delete({
     *   where: {
     *     // ... filter to delete one User
     *   }
     * })
     * 
     */
    delete<T extends UserDeleteArgs>(args: SelectSubset<T, UserDeleteArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one User.
     * @param {UserUpdateArgs} args - Arguments to update one User.
     * @example
     * // Update one User
     * const user = await prisma.user.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UserUpdateArgs>(args: SelectSubset<T, UserUpdateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Users.
     * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete.
     * @example
     * // Delete a few Users
     * const { count } = await prisma.user.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UserDeleteManyArgs>(args?: SelectSubset<T, UserDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Users.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Users
     * const user = await prisma.user.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UserUpdateManyArgs>(args: SelectSubset<T, UserUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one User.
     * @param {UserUpsertArgs} args - Arguments to update or create a User.
     * @example
     * // Update or create a User
     * const user = await prisma.user.upsert({
     *   create: {
     *     // ... data to create a User
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the User we want to update
     *   }
     * })
     */
    upsert<T extends UserUpsertArgs>(args: SelectSubset<T, UserUpsertArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Users.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserCountArgs} args - Arguments to filter Users to count.
     * @example
     * // Count the number of Users
     * const count = await prisma.user.count({
     *   where: {
     *     // ... the filter for the Users we want to count
     *   }
     * })
    **/
    count<T extends UserCountArgs>(
      args?: Subset<T, UserCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UserCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a User.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserAggregateArgs} 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 UserAggregateArgs>(args: Subset<T, UserAggregateArgs>): Prisma.PrismaPromise<GetUserAggregateType<T>>

    /**
     * Group by User.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserGroupByArgs} 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 UserGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UserGroupByArgs['orderBy'] }
        : { orderBy?: UserGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the User model
   */
  readonly fields: UserFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for User.
   * 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__UserClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    role<T extends RoleDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RoleDefaultArgs<ExtArgs>>): Prisma__RoleClient<$Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    forgotPassword<T extends User$forgotPasswordArgs<ExtArgs> = {}>(args?: Subset<T, User$forgotPasswordArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    createdStates<T extends User$createdStatesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdStatesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdDistricts<T extends User$createdDistrictsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdDistrictsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdVegetables<T extends User$createdVegetablesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdVegetablesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdCustomers<T extends User$createdCustomersArgs<ExtArgs> = {}>(args?: Subset<T, User$createdCustomersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdSuppliers<T extends User$createdSuppliersArgs<ExtArgs> = {}>(args?: Subset<T, User$createdSuppliersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdSupplierPayments<T extends User$createdSupplierPaymentsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdSupplierPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdUpis<T extends User$createdUpisArgs<ExtArgs> = {}>(args?: Subset<T, User$createdUpisArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdPurchases<T extends User$createdPurchasesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdPurchasesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdShops<T extends User$createdShopsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdShopsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdSales<T extends User$createdSalesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdSalesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdSaleItems<T extends User$createdSaleItemsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdSaleItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdCustomerReceipts<T extends User$createdCustomerReceiptsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdCustomerReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdExpenses<T extends User$createdExpensesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdExpensesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdStockSpoilages<T extends User$createdStockSpoilagesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdStockSpoilagesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdSaleReturns<T extends User$createdSaleReturnsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdSaleReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdQuotations<T extends User$createdQuotationsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdQuotationsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdQuotationItems<T extends User$createdQuotationItemsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdQuotationItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdPurchaseReturns<T extends User$createdPurchaseReturnsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdPurchaseReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdRetailStocks<T extends User$createdRetailStocksArgs<ExtArgs> = {}>(args?: Subset<T, User$createdRetailStocksArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdRetailSales<T extends User$createdRetailSalesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdRetailSalesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdRetailSaleItems<T extends User$createdRetailSaleItemsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdRetailSaleItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdRetailStockSpoilages<T extends User$createdRetailStockSpoilagesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdRetailStockSpoilagesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdRetailStockReturns<T extends User$createdRetailStockReturnsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdRetailStockReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdBoxReturns<T extends User$createdBoxReturnsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdBoxReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdEmployees<T extends User$createdEmployeesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdEmployeesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdAttendances<T extends User$createdAttendancesArgs<ExtArgs> = {}>(args?: Subset<T, User$createdAttendancesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdArrivalSettlements<T extends User$createdArrivalSettlementsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdArrivalSettlementsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdArrivalCustomPattis<T extends User$createdArrivalCustomPattisArgs<ExtArgs> = {}>(args?: Subset<T, User$createdArrivalCustomPattisArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdFastBillings<T extends User$createdFastBillingsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdFastBillingsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdFastBillingItems<T extends User$createdFastBillingItemsArgs<ExtArgs> = {}>(args?: Subset<T, User$createdFastBillingItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdCashBankTransfers<T extends User$createdCashBankTransfersArgs<ExtArgs> = {}>(args?: Subset<T, User$createdCashBankTransfersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    deletedCashBankTransfers<T extends User$deletedCashBankTransfersArgs<ExtArgs> = {}>(args?: Subset<T, User$deletedCashBankTransfersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    auditLogs<T extends User$auditLogsArgs<ExtArgs> = {}>(args?: Subset<T, User$auditLogsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    /**
     * 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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the User model
   */
  interface UserFieldRefs {
    readonly id: FieldRef<"User", 'BigInt'>
    readonly name: FieldRef<"User", 'String'>
    readonly email: FieldRef<"User", 'String'>
    readonly mobileNo: FieldRef<"User", 'String'>
    readonly password: FieldRef<"User", 'String'>
    readonly roleId: FieldRef<"User", 'BigInt'>
    readonly createdAt: FieldRef<"User", 'DateTime'>
    readonly updatedAt: FieldRef<"User", 'DateTime'>
    readonly status: FieldRef<"User", 'Boolean'>
    readonly profile: FieldRef<"User", 'String'>
  }
    

  // Custom InputTypes
  /**
   * User findUnique
   */
  export type UserFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter, which User to fetch.
     */
    where: UserWhereUniqueInput
  }

  /**
   * User findUniqueOrThrow
   */
  export type UserFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter, which User to fetch.
     */
    where: UserWhereUniqueInput
  }

  /**
   * User findFirst
   */
  export type UserFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter, which User to fetch.
     */
    where?: UserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Users to fetch.
     */
    orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Users.
     */
    cursor?: UserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Users 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` Users.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Users.
     */
    distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
  }

  /**
   * User findFirstOrThrow
   */
  export type UserFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter, which User to fetch.
     */
    where?: UserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Users to fetch.
     */
    orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Users.
     */
    cursor?: UserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Users 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` Users.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Users.
     */
    distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
  }

  /**
   * User findMany
   */
  export type UserFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter, which Users to fetch.
     */
    where?: UserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Users to fetch.
     */
    orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Users.
     */
    cursor?: UserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Users 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` Users.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Users.
     */
    distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
  }

  /**
   * User create
   */
  export type UserCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * The data needed to create a User.
     */
    data: XOR<UserCreateInput, UserUncheckedCreateInput>
  }

  /**
   * User createMany
   */
  export type UserCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Users.
     */
    data: UserCreateManyInput | UserCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * User update
   */
  export type UserUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * The data needed to update a User.
     */
    data: XOR<UserUpdateInput, UserUncheckedUpdateInput>
    /**
     * Choose, which User to update.
     */
    where: UserWhereUniqueInput
  }

  /**
   * User updateMany
   */
  export type UserUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Users.
     */
    data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyInput>
    /**
     * Filter which Users to update
     */
    where?: UserWhereInput
    /**
     * Limit how many Users to update.
     */
    limit?: number
  }

  /**
   * User upsert
   */
  export type UserUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * The filter to search for the User to update in case it exists.
     */
    where: UserWhereUniqueInput
    /**
     * In case the User found by the `where` argument doesn't exist, create a new User with this data.
     */
    create: XOR<UserCreateInput, UserUncheckedCreateInput>
    /**
     * In case the User was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UserUpdateInput, UserUncheckedUpdateInput>
  }

  /**
   * User delete
   */
  export type UserDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    /**
     * Filter which User to delete.
     */
    where: UserWhereUniqueInput
  }

  /**
   * User deleteMany
   */
  export type UserDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Users to delete
     */
    where?: UserWhereInput
    /**
     * Limit how many Users to delete.
     */
    limit?: number
  }

  /**
   * User.forgotPassword
   */
  export type User$forgotPasswordArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    where?: ForgotPasswordWhereInput
  }

  /**
   * User.createdStates
   */
  export type User$createdStatesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    where?: StateWhereInput
    orderBy?: StateOrderByWithRelationInput | StateOrderByWithRelationInput[]
    cursor?: StateWhereUniqueInput
    take?: number
    skip?: number
    distinct?: StateScalarFieldEnum | StateScalarFieldEnum[]
  }

  /**
   * User.createdDistricts
   */
  export type User$createdDistrictsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    where?: DistrictWhereInput
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    cursor?: DistrictWhereUniqueInput
    take?: number
    skip?: number
    distinct?: DistrictScalarFieldEnum | DistrictScalarFieldEnum[]
  }

  /**
   * User.createdVegetables
   */
  export type User$createdVegetablesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    where?: VegetableWhereInput
    orderBy?: VegetableOrderByWithRelationInput | VegetableOrderByWithRelationInput[]
    cursor?: VegetableWhereUniqueInput
    take?: number
    skip?: number
    distinct?: VegetableScalarFieldEnum | VegetableScalarFieldEnum[]
  }

  /**
   * User.createdCustomers
   */
  export type User$createdCustomersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    where?: CustomerWhereInput
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    cursor?: CustomerWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * User.createdSuppliers
   */
  export type User$createdSuppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    where?: SupplierWhereInput
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    cursor?: SupplierWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * User.createdSupplierPayments
   */
  export type User$createdSupplierPaymentsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    where?: SupplierPaymentWhereInput
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    cursor?: SupplierPaymentWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SupplierPaymentScalarFieldEnum | SupplierPaymentScalarFieldEnum[]
  }

  /**
   * User.createdUpis
   */
  export type User$createdUpisArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    where?: UpiWhereInput
    orderBy?: UpiOrderByWithRelationInput | UpiOrderByWithRelationInput[]
    cursor?: UpiWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UpiScalarFieldEnum | UpiScalarFieldEnum[]
  }

  /**
   * User.createdPurchases
   */
  export type User$createdPurchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    where?: PurchaseWhereInput
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    cursor?: PurchaseWhereUniqueInput
    take?: number
    skip?: number
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * User.createdShops
   */
  export type User$createdShopsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    where?: ShopWhereInput
    orderBy?: ShopOrderByWithRelationInput | ShopOrderByWithRelationInput[]
    cursor?: ShopWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ShopScalarFieldEnum | ShopScalarFieldEnum[]
  }

  /**
   * User.createdSales
   */
  export type User$createdSalesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    where?: SaleWhereInput
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    cursor?: SaleWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleScalarFieldEnum | SaleScalarFieldEnum[]
  }

  /**
   * User.createdSaleItems
   */
  export type User$createdSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    where?: SaleItemWhereInput
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    cursor?: SaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * User.createdCustomerReceipts
   */
  export type User$createdCustomerReceiptsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    where?: CustomerReceiptWhereInput
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    cursor?: CustomerReceiptWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CustomerReceiptScalarFieldEnum | CustomerReceiptScalarFieldEnum[]
  }

  /**
   * User.createdExpenses
   */
  export type User$createdExpensesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    where?: ExpenseWhereInput
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    cursor?: ExpenseWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ExpenseScalarFieldEnum | ExpenseScalarFieldEnum[]
  }

  /**
   * User.createdStockSpoilages
   */
  export type User$createdStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    where?: StockSpoilageWhereInput
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    cursor?: StockSpoilageWhereUniqueInput
    take?: number
    skip?: number
    distinct?: StockSpoilageScalarFieldEnum | StockSpoilageScalarFieldEnum[]
  }

  /**
   * User.createdSaleReturns
   */
  export type User$createdSaleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    where?: SaleReturnWhereInput
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    cursor?: SaleReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * User.createdQuotations
   */
  export type User$createdQuotationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    where?: QuotationWhereInput
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    cursor?: QuotationWhereUniqueInput
    take?: number
    skip?: number
    distinct?: QuotationScalarFieldEnum | QuotationScalarFieldEnum[]
  }

  /**
   * User.createdQuotationItems
   */
  export type User$createdQuotationItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    where?: QuotationItemWhereInput
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    cursor?: QuotationItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * User.createdPurchaseReturns
   */
  export type User$createdPurchaseReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    where?: PurchaseReturnWhereInput
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    cursor?: PurchaseReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: PurchaseReturnScalarFieldEnum | PurchaseReturnScalarFieldEnum[]
  }

  /**
   * User.createdRetailStocks
   */
  export type User$createdRetailStocksArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    where?: RetailStockWhereInput
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    cursor?: RetailStockWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockScalarFieldEnum | RetailStockScalarFieldEnum[]
  }

  /**
   * User.createdRetailSales
   */
  export type User$createdRetailSalesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    where?: RetailSaleWhereInput
    orderBy?: RetailSaleOrderByWithRelationInput | RetailSaleOrderByWithRelationInput[]
    cursor?: RetailSaleWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailSaleScalarFieldEnum | RetailSaleScalarFieldEnum[]
  }

  /**
   * User.createdRetailSaleItems
   */
  export type User$createdRetailSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    where?: RetailSaleItemWhereInput
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    cursor?: RetailSaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * User.createdRetailStockSpoilages
   */
  export type User$createdRetailStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    where?: RetailStockSpoilageWhereInput
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    cursor?: RetailStockSpoilageWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockSpoilageScalarFieldEnum | RetailStockSpoilageScalarFieldEnum[]
  }

  /**
   * User.createdRetailStockReturns
   */
  export type User$createdRetailStockReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    where?: RetailStockReturnWhereInput
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    cursor?: RetailStockReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockReturnScalarFieldEnum | RetailStockReturnScalarFieldEnum[]
  }

  /**
   * User.createdBoxReturns
   */
  export type User$createdBoxReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    where?: BoxReturnWhereInput
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    cursor?: BoxReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: BoxReturnScalarFieldEnum | BoxReturnScalarFieldEnum[]
  }

  /**
   * User.createdEmployees
   */
  export type User$createdEmployeesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    where?: EmployeeWhereInput
    orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[]
    cursor?: EmployeeWhereUniqueInput
    take?: number
    skip?: number
    distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[]
  }

  /**
   * User.createdAttendances
   */
  export type User$createdAttendancesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    where?: AttendanceWhereInput
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    cursor?: AttendanceWhereUniqueInput
    take?: number
    skip?: number
    distinct?: AttendanceScalarFieldEnum | AttendanceScalarFieldEnum[]
  }

  /**
   * User.createdArrivalSettlements
   */
  export type User$createdArrivalSettlementsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    where?: ArrivalSettlementWhereInput
    orderBy?: ArrivalSettlementOrderByWithRelationInput | ArrivalSettlementOrderByWithRelationInput[]
    cursor?: ArrivalSettlementWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ArrivalSettlementScalarFieldEnum | ArrivalSettlementScalarFieldEnum[]
  }

  /**
   * User.createdArrivalCustomPattis
   */
  export type User$createdArrivalCustomPattisArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    where?: ArrivalCustomPattiWhereInput
    orderBy?: ArrivalCustomPattiOrderByWithRelationInput | ArrivalCustomPattiOrderByWithRelationInput[]
    cursor?: ArrivalCustomPattiWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ArrivalCustomPattiScalarFieldEnum | ArrivalCustomPattiScalarFieldEnum[]
  }

  /**
   * User.createdFastBillings
   */
  export type User$createdFastBillingsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    where?: FastBillingWhereInput
    orderBy?: FastBillingOrderByWithRelationInput | FastBillingOrderByWithRelationInput[]
    cursor?: FastBillingWhereUniqueInput
    take?: number
    skip?: number
    distinct?: FastBillingScalarFieldEnum | FastBillingScalarFieldEnum[]
  }

  /**
   * User.createdFastBillingItems
   */
  export type User$createdFastBillingItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    where?: FastBillingItemWhereInput
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    cursor?: FastBillingItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: FastBillingItemScalarFieldEnum | FastBillingItemScalarFieldEnum[]
  }

  /**
   * User.createdCashBankTransfers
   */
  export type User$createdCashBankTransfersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    where?: CashBankTransferWhereInput
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    cursor?: CashBankTransferWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CashBankTransferScalarFieldEnum | CashBankTransferScalarFieldEnum[]
  }

  /**
   * User.deletedCashBankTransfers
   */
  export type User$deletedCashBankTransfersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    where?: CashBankTransferWhereInput
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    cursor?: CashBankTransferWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CashBankTransferScalarFieldEnum | CashBankTransferScalarFieldEnum[]
  }

  /**
   * User.auditLogs
   */
  export type User$auditLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    where?: AuditLogWhereInput
    orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[]
    cursor?: AuditLogWhereUniqueInput
    take?: number
    skip?: number
    distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[]
  }

  /**
   * User without action
   */
  export type UserDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
  }


  /**
   * Model State
   */

  export type AggregateState = {
    _count: StateCountAggregateOutputType | null
    _avg: StateAvgAggregateOutputType | null
    _sum: StateSumAggregateOutputType | null
    _min: StateMinAggregateOutputType | null
    _max: StateMaxAggregateOutputType | null
  }

  export type StateAvgAggregateOutputType = {
    id: number | null
    createdBy: number | null
  }

  export type StateSumAggregateOutputType = {
    id: bigint | null
    createdBy: bigint | null
  }

  export type StateMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type StateMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type StateCountAggregateOutputType = {
    id: number
    name: number
    tamilName: number
    status: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type StateAvgAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type StateSumAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type StateMinAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type StateMaxAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type StateCountAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type StateAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which State to aggregate.
     */
    where?: StateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of States to fetch.
     */
    orderBy?: StateOrderByWithRelationInput | StateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: StateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` States 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` States.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned States
    **/
    _count?: true | StateCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: StateAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: StateSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: StateMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: StateMaxAggregateInputType
  }

  export type GetStateAggregateType<T extends StateAggregateArgs> = {
        [P in keyof T & keyof AggregateState]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateState[P]>
      : GetScalarType<T[P], AggregateState[P]>
  }




  export type StateGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: StateWhereInput
    orderBy?: StateOrderByWithAggregationInput | StateOrderByWithAggregationInput[]
    by: StateScalarFieldEnum[] | StateScalarFieldEnum
    having?: StateScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: StateCountAggregateInputType | true
    _avg?: StateAvgAggregateInputType
    _sum?: StateSumAggregateInputType
    _min?: StateMinAggregateInputType
    _max?: StateMaxAggregateInputType
  }

  export type StateGroupByOutputType = {
    id: bigint
    name: string
    tamilName: string | null
    status: boolean
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: StateCountAggregateOutputType | null
    _avg: StateAvgAggregateOutputType | null
    _sum: StateSumAggregateOutputType | null
    _min: StateMinAggregateOutputType | null
    _max: StateMaxAggregateOutputType | null
  }

  type GetStateGroupByPayload<T extends StateGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<StateGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof StateGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], StateGroupByOutputType[P]>
            : GetScalarType<T[P], StateGroupByOutputType[P]>
        }
      >
    >


  export type StateSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    tamilName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    districts?: boolean | State$districtsArgs<ExtArgs>
    customers?: boolean | State$customersArgs<ExtArgs>
    suppliers?: boolean | State$suppliersArgs<ExtArgs>
    createdByUser?: boolean | State$createdByUserArgs<ExtArgs>
    _count?: boolean | StateCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["state"]>



  export type StateSelectScalar = {
    id?: boolean
    name?: boolean
    tamilName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type StateOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "tamilName" | "status" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["state"]>
  export type StateInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    districts?: boolean | State$districtsArgs<ExtArgs>
    customers?: boolean | State$customersArgs<ExtArgs>
    suppliers?: boolean | State$suppliersArgs<ExtArgs>
    createdByUser?: boolean | State$createdByUserArgs<ExtArgs>
    _count?: boolean | StateCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $StatePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "State"
    objects: {
      districts: Prisma.$DistrictPayload<ExtArgs>[]
      customers: Prisma.$CustomerPayload<ExtArgs>[]
      suppliers: Prisma.$SupplierPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      tamilName: string | null
      status: boolean
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["state"]>
    composites: {}
  }

  type StateGetPayload<S extends boolean | null | undefined | StateDefaultArgs> = $Result.GetResult<Prisma.$StatePayload, S>

  type StateCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<StateFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: StateCountAggregateInputType | true
    }

  export interface StateDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['State'], meta: { name: 'State' } }
    /**
     * Find zero or one State that matches the filter.
     * @param {StateFindUniqueArgs} args - Arguments to find a State
     * @example
     * // Get one State
     * const state = await prisma.state.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends StateFindUniqueArgs>(args: SelectSubset<T, StateFindUniqueArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one State that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {StateFindUniqueOrThrowArgs} args - Arguments to find a State
     * @example
     * // Get one State
     * const state = await prisma.state.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends StateFindUniqueOrThrowArgs>(args: SelectSubset<T, StateFindUniqueOrThrowArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first State 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 {StateFindFirstArgs} args - Arguments to find a State
     * @example
     * // Get one State
     * const state = await prisma.state.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends StateFindFirstArgs>(args?: SelectSubset<T, StateFindFirstArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first State 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 {StateFindFirstOrThrowArgs} args - Arguments to find a State
     * @example
     * // Get one State
     * const state = await prisma.state.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends StateFindFirstOrThrowArgs>(args?: SelectSubset<T, StateFindFirstOrThrowArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more States 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 {StateFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all States
     * const states = await prisma.state.findMany()
     * 
     * // Get first 10 States
     * const states = await prisma.state.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const stateWithIdOnly = await prisma.state.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends StateFindManyArgs>(args?: SelectSubset<T, StateFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a State.
     * @param {StateCreateArgs} args - Arguments to create a State.
     * @example
     * // Create one State
     * const State = await prisma.state.create({
     *   data: {
     *     // ... data to create a State
     *   }
     * })
     * 
     */
    create<T extends StateCreateArgs>(args: SelectSubset<T, StateCreateArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many States.
     * @param {StateCreateManyArgs} args - Arguments to create many States.
     * @example
     * // Create many States
     * const state = await prisma.state.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends StateCreateManyArgs>(args?: SelectSubset<T, StateCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a State.
     * @param {StateDeleteArgs} args - Arguments to delete one State.
     * @example
     * // Delete one State
     * const State = await prisma.state.delete({
     *   where: {
     *     // ... filter to delete one State
     *   }
     * })
     * 
     */
    delete<T extends StateDeleteArgs>(args: SelectSubset<T, StateDeleteArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one State.
     * @param {StateUpdateArgs} args - Arguments to update one State.
     * @example
     * // Update one State
     * const state = await prisma.state.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends StateUpdateArgs>(args: SelectSubset<T, StateUpdateArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more States.
     * @param {StateDeleteManyArgs} args - Arguments to filter States to delete.
     * @example
     * // Delete a few States
     * const { count } = await prisma.state.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends StateDeleteManyArgs>(args?: SelectSubset<T, StateDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more States.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StateUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many States
     * const state = await prisma.state.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends StateUpdateManyArgs>(args: SelectSubset<T, StateUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one State.
     * @param {StateUpsertArgs} args - Arguments to update or create a State.
     * @example
     * // Update or create a State
     * const state = await prisma.state.upsert({
     *   create: {
     *     // ... data to create a State
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the State we want to update
     *   }
     * })
     */
    upsert<T extends StateUpsertArgs>(args: SelectSubset<T, StateUpsertArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of States.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StateCountArgs} args - Arguments to filter States to count.
     * @example
     * // Count the number of States
     * const count = await prisma.state.count({
     *   where: {
     *     // ... the filter for the States we want to count
     *   }
     * })
    **/
    count<T extends StateCountArgs>(
      args?: Subset<T, StateCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], StateCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a State.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StateAggregateArgs} 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 StateAggregateArgs>(args: Subset<T, StateAggregateArgs>): Prisma.PrismaPromise<GetStateAggregateType<T>>

    /**
     * Group by State.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StateGroupByArgs} 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 StateGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: StateGroupByArgs['orderBy'] }
        : { orderBy?: StateGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, StateGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStateGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the State model
   */
  readonly fields: StateFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for State.
   * 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__StateClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    districts<T extends State$districtsArgs<ExtArgs> = {}>(args?: Subset<T, State$districtsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    customers<T extends State$customersArgs<ExtArgs> = {}>(args?: Subset<T, State$customersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    suppliers<T extends State$suppliersArgs<ExtArgs> = {}>(args?: Subset<T, State$suppliersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends State$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, State$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the State model
   */
  interface StateFieldRefs {
    readonly id: FieldRef<"State", 'BigInt'>
    readonly name: FieldRef<"State", 'String'>
    readonly tamilName: FieldRef<"State", 'String'>
    readonly status: FieldRef<"State", 'Boolean'>
    readonly createdAt: FieldRef<"State", 'DateTime'>
    readonly updatedAt: FieldRef<"State", 'DateTime'>
    readonly createdBy: FieldRef<"State", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * State findUnique
   */
  export type StateFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter, which State to fetch.
     */
    where: StateWhereUniqueInput
  }

  /**
   * State findUniqueOrThrow
   */
  export type StateFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter, which State to fetch.
     */
    where: StateWhereUniqueInput
  }

  /**
   * State findFirst
   */
  export type StateFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter, which State to fetch.
     */
    where?: StateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of States to fetch.
     */
    orderBy?: StateOrderByWithRelationInput | StateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for States.
     */
    cursor?: StateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` States 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` States.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of States.
     */
    distinct?: StateScalarFieldEnum | StateScalarFieldEnum[]
  }

  /**
   * State findFirstOrThrow
   */
  export type StateFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter, which State to fetch.
     */
    where?: StateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of States to fetch.
     */
    orderBy?: StateOrderByWithRelationInput | StateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for States.
     */
    cursor?: StateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` States 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` States.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of States.
     */
    distinct?: StateScalarFieldEnum | StateScalarFieldEnum[]
  }

  /**
   * State findMany
   */
  export type StateFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter, which States to fetch.
     */
    where?: StateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of States to fetch.
     */
    orderBy?: StateOrderByWithRelationInput | StateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing States.
     */
    cursor?: StateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` States 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` States.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of States.
     */
    distinct?: StateScalarFieldEnum | StateScalarFieldEnum[]
  }

  /**
   * State create
   */
  export type StateCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * The data needed to create a State.
     */
    data: XOR<StateCreateInput, StateUncheckedCreateInput>
  }

  /**
   * State createMany
   */
  export type StateCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many States.
     */
    data: StateCreateManyInput | StateCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * State update
   */
  export type StateUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * The data needed to update a State.
     */
    data: XOR<StateUpdateInput, StateUncheckedUpdateInput>
    /**
     * Choose, which State to update.
     */
    where: StateWhereUniqueInput
  }

  /**
   * State updateMany
   */
  export type StateUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update States.
     */
    data: XOR<StateUpdateManyMutationInput, StateUncheckedUpdateManyInput>
    /**
     * Filter which States to update
     */
    where?: StateWhereInput
    /**
     * Limit how many States to update.
     */
    limit?: number
  }

  /**
   * State upsert
   */
  export type StateUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * The filter to search for the State to update in case it exists.
     */
    where: StateWhereUniqueInput
    /**
     * In case the State found by the `where` argument doesn't exist, create a new State with this data.
     */
    create: XOR<StateCreateInput, StateUncheckedCreateInput>
    /**
     * In case the State was found with the provided `where` argument, update it with this data.
     */
    update: XOR<StateUpdateInput, StateUncheckedUpdateInput>
  }

  /**
   * State delete
   */
  export type StateDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
    /**
     * Filter which State to delete.
     */
    where: StateWhereUniqueInput
  }

  /**
   * State deleteMany
   */
  export type StateDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which States to delete
     */
    where?: StateWhereInput
    /**
     * Limit how many States to delete.
     */
    limit?: number
  }

  /**
   * State.districts
   */
  export type State$districtsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    where?: DistrictWhereInput
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    cursor?: DistrictWhereUniqueInput
    take?: number
    skip?: number
    distinct?: DistrictScalarFieldEnum | DistrictScalarFieldEnum[]
  }

  /**
   * State.customers
   */
  export type State$customersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    where?: CustomerWhereInput
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    cursor?: CustomerWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * State.suppliers
   */
  export type State$suppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    where?: SupplierWhereInput
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    cursor?: SupplierWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * State.createdByUser
   */
  export type State$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * State without action
   */
  export type StateDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the State
     */
    select?: StateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the State
     */
    omit?: StateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StateInclude<ExtArgs> | null
  }


  /**
   * Model District
   */

  export type AggregateDistrict = {
    _count: DistrictCountAggregateOutputType | null
    _avg: DistrictAvgAggregateOutputType | null
    _sum: DistrictSumAggregateOutputType | null
    _min: DistrictMinAggregateOutputType | null
    _max: DistrictMaxAggregateOutputType | null
  }

  export type DistrictAvgAggregateOutputType = {
    id: number | null
    stateId: number | null
    createdBy: number | null
  }

  export type DistrictSumAggregateOutputType = {
    id: bigint | null
    stateId: bigint | null
    createdBy: bigint | null
  }

  export type DistrictMinAggregateOutputType = {
    id: bigint | null
    stateId: bigint | null
    name: string | null
    tamilName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type DistrictMaxAggregateOutputType = {
    id: bigint | null
    stateId: bigint | null
    name: string | null
    tamilName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type DistrictCountAggregateOutputType = {
    id: number
    stateId: number
    name: number
    tamilName: number
    status: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type DistrictAvgAggregateInputType = {
    id?: true
    stateId?: true
    createdBy?: true
  }

  export type DistrictSumAggregateInputType = {
    id?: true
    stateId?: true
    createdBy?: true
  }

  export type DistrictMinAggregateInputType = {
    id?: true
    stateId?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type DistrictMaxAggregateInputType = {
    id?: true
    stateId?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type DistrictCountAggregateInputType = {
    id?: true
    stateId?: true
    name?: true
    tamilName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type DistrictAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which District to aggregate.
     */
    where?: DistrictWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Districts to fetch.
     */
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: DistrictWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Districts 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` Districts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Districts
    **/
    _count?: true | DistrictCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: DistrictAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: DistrictSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: DistrictMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: DistrictMaxAggregateInputType
  }

  export type GetDistrictAggregateType<T extends DistrictAggregateArgs> = {
        [P in keyof T & keyof AggregateDistrict]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateDistrict[P]>
      : GetScalarType<T[P], AggregateDistrict[P]>
  }




  export type DistrictGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: DistrictWhereInput
    orderBy?: DistrictOrderByWithAggregationInput | DistrictOrderByWithAggregationInput[]
    by: DistrictScalarFieldEnum[] | DistrictScalarFieldEnum
    having?: DistrictScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: DistrictCountAggregateInputType | true
    _avg?: DistrictAvgAggregateInputType
    _sum?: DistrictSumAggregateInputType
    _min?: DistrictMinAggregateInputType
    _max?: DistrictMaxAggregateInputType
  }

  export type DistrictGroupByOutputType = {
    id: bigint
    stateId: bigint
    name: string
    tamilName: string | null
    status: boolean
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: DistrictCountAggregateOutputType | null
    _avg: DistrictAvgAggregateOutputType | null
    _sum: DistrictSumAggregateOutputType | null
    _min: DistrictMinAggregateOutputType | null
    _max: DistrictMaxAggregateOutputType | null
  }

  type GetDistrictGroupByPayload<T extends DistrictGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<DistrictGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof DistrictGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], DistrictGroupByOutputType[P]>
            : GetScalarType<T[P], DistrictGroupByOutputType[P]>
        }
      >
    >


  export type DistrictSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    stateId?: boolean
    name?: boolean
    tamilName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    state?: boolean | StateDefaultArgs<ExtArgs>
    customers?: boolean | District$customersArgs<ExtArgs>
    suppliers?: boolean | District$suppliersArgs<ExtArgs>
    createdByUser?: boolean | District$createdByUserArgs<ExtArgs>
    _count?: boolean | DistrictCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["district"]>



  export type DistrictSelectScalar = {
    id?: boolean
    stateId?: boolean
    name?: boolean
    tamilName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type DistrictOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "stateId" | "name" | "tamilName" | "status" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["district"]>
  export type DistrictInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    state?: boolean | StateDefaultArgs<ExtArgs>
    customers?: boolean | District$customersArgs<ExtArgs>
    suppliers?: boolean | District$suppliersArgs<ExtArgs>
    createdByUser?: boolean | District$createdByUserArgs<ExtArgs>
    _count?: boolean | DistrictCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $DistrictPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "District"
    objects: {
      state: Prisma.$StatePayload<ExtArgs>
      customers: Prisma.$CustomerPayload<ExtArgs>[]
      suppliers: Prisma.$SupplierPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      stateId: bigint
      name: string
      tamilName: string | null
      status: boolean
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["district"]>
    composites: {}
  }

  type DistrictGetPayload<S extends boolean | null | undefined | DistrictDefaultArgs> = $Result.GetResult<Prisma.$DistrictPayload, S>

  type DistrictCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<DistrictFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: DistrictCountAggregateInputType | true
    }

  export interface DistrictDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['District'], meta: { name: 'District' } }
    /**
     * Find zero or one District that matches the filter.
     * @param {DistrictFindUniqueArgs} args - Arguments to find a District
     * @example
     * // Get one District
     * const district = await prisma.district.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends DistrictFindUniqueArgs>(args: SelectSubset<T, DistrictFindUniqueArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one District that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {DistrictFindUniqueOrThrowArgs} args - Arguments to find a District
     * @example
     * // Get one District
     * const district = await prisma.district.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends DistrictFindUniqueOrThrowArgs>(args: SelectSubset<T, DistrictFindUniqueOrThrowArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first District 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 {DistrictFindFirstArgs} args - Arguments to find a District
     * @example
     * // Get one District
     * const district = await prisma.district.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends DistrictFindFirstArgs>(args?: SelectSubset<T, DistrictFindFirstArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first District 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 {DistrictFindFirstOrThrowArgs} args - Arguments to find a District
     * @example
     * // Get one District
     * const district = await prisma.district.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends DistrictFindFirstOrThrowArgs>(args?: SelectSubset<T, DistrictFindFirstOrThrowArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Districts 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 {DistrictFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Districts
     * const districts = await prisma.district.findMany()
     * 
     * // Get first 10 Districts
     * const districts = await prisma.district.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const districtWithIdOnly = await prisma.district.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends DistrictFindManyArgs>(args?: SelectSubset<T, DistrictFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a District.
     * @param {DistrictCreateArgs} args - Arguments to create a District.
     * @example
     * // Create one District
     * const District = await prisma.district.create({
     *   data: {
     *     // ... data to create a District
     *   }
     * })
     * 
     */
    create<T extends DistrictCreateArgs>(args: SelectSubset<T, DistrictCreateArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Districts.
     * @param {DistrictCreateManyArgs} args - Arguments to create many Districts.
     * @example
     * // Create many Districts
     * const district = await prisma.district.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends DistrictCreateManyArgs>(args?: SelectSubset<T, DistrictCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a District.
     * @param {DistrictDeleteArgs} args - Arguments to delete one District.
     * @example
     * // Delete one District
     * const District = await prisma.district.delete({
     *   where: {
     *     // ... filter to delete one District
     *   }
     * })
     * 
     */
    delete<T extends DistrictDeleteArgs>(args: SelectSubset<T, DistrictDeleteArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one District.
     * @param {DistrictUpdateArgs} args - Arguments to update one District.
     * @example
     * // Update one District
     * const district = await prisma.district.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends DistrictUpdateArgs>(args: SelectSubset<T, DistrictUpdateArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Districts.
     * @param {DistrictDeleteManyArgs} args - Arguments to filter Districts to delete.
     * @example
     * // Delete a few Districts
     * const { count } = await prisma.district.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends DistrictDeleteManyArgs>(args?: SelectSubset<T, DistrictDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Districts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {DistrictUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Districts
     * const district = await prisma.district.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends DistrictUpdateManyArgs>(args: SelectSubset<T, DistrictUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one District.
     * @param {DistrictUpsertArgs} args - Arguments to update or create a District.
     * @example
     * // Update or create a District
     * const district = await prisma.district.upsert({
     *   create: {
     *     // ... data to create a District
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the District we want to update
     *   }
     * })
     */
    upsert<T extends DistrictUpsertArgs>(args: SelectSubset<T, DistrictUpsertArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Districts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {DistrictCountArgs} args - Arguments to filter Districts to count.
     * @example
     * // Count the number of Districts
     * const count = await prisma.district.count({
     *   where: {
     *     // ... the filter for the Districts we want to count
     *   }
     * })
    **/
    count<T extends DistrictCountArgs>(
      args?: Subset<T, DistrictCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], DistrictCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a District.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {DistrictAggregateArgs} 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 DistrictAggregateArgs>(args: Subset<T, DistrictAggregateArgs>): Prisma.PrismaPromise<GetDistrictAggregateType<T>>

    /**
     * Group by District.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {DistrictGroupByArgs} 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 DistrictGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: DistrictGroupByArgs['orderBy'] }
        : { orderBy?: DistrictGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, DistrictGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetDistrictGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the District model
   */
  readonly fields: DistrictFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for District.
   * 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__DistrictClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    state<T extends StateDefaultArgs<ExtArgs> = {}>(args?: Subset<T, StateDefaultArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    customers<T extends District$customersArgs<ExtArgs> = {}>(args?: Subset<T, District$customersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    suppliers<T extends District$suppliersArgs<ExtArgs> = {}>(args?: Subset<T, District$suppliersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends District$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, District$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the District model
   */
  interface DistrictFieldRefs {
    readonly id: FieldRef<"District", 'BigInt'>
    readonly stateId: FieldRef<"District", 'BigInt'>
    readonly name: FieldRef<"District", 'String'>
    readonly tamilName: FieldRef<"District", 'String'>
    readonly status: FieldRef<"District", 'Boolean'>
    readonly createdAt: FieldRef<"District", 'DateTime'>
    readonly updatedAt: FieldRef<"District", 'DateTime'>
    readonly createdBy: FieldRef<"District", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * District findUnique
   */
  export type DistrictFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter, which District to fetch.
     */
    where: DistrictWhereUniqueInput
  }

  /**
   * District findUniqueOrThrow
   */
  export type DistrictFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter, which District to fetch.
     */
    where: DistrictWhereUniqueInput
  }

  /**
   * District findFirst
   */
  export type DistrictFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter, which District to fetch.
     */
    where?: DistrictWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Districts to fetch.
     */
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Districts.
     */
    cursor?: DistrictWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Districts 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` Districts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Districts.
     */
    distinct?: DistrictScalarFieldEnum | DistrictScalarFieldEnum[]
  }

  /**
   * District findFirstOrThrow
   */
  export type DistrictFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter, which District to fetch.
     */
    where?: DistrictWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Districts to fetch.
     */
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Districts.
     */
    cursor?: DistrictWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Districts 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` Districts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Districts.
     */
    distinct?: DistrictScalarFieldEnum | DistrictScalarFieldEnum[]
  }

  /**
   * District findMany
   */
  export type DistrictFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter, which Districts to fetch.
     */
    where?: DistrictWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Districts to fetch.
     */
    orderBy?: DistrictOrderByWithRelationInput | DistrictOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Districts.
     */
    cursor?: DistrictWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Districts 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` Districts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Districts.
     */
    distinct?: DistrictScalarFieldEnum | DistrictScalarFieldEnum[]
  }

  /**
   * District create
   */
  export type DistrictCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * The data needed to create a District.
     */
    data: XOR<DistrictCreateInput, DistrictUncheckedCreateInput>
  }

  /**
   * District createMany
   */
  export type DistrictCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Districts.
     */
    data: DistrictCreateManyInput | DistrictCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * District update
   */
  export type DistrictUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * The data needed to update a District.
     */
    data: XOR<DistrictUpdateInput, DistrictUncheckedUpdateInput>
    /**
     * Choose, which District to update.
     */
    where: DistrictWhereUniqueInput
  }

  /**
   * District updateMany
   */
  export type DistrictUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Districts.
     */
    data: XOR<DistrictUpdateManyMutationInput, DistrictUncheckedUpdateManyInput>
    /**
     * Filter which Districts to update
     */
    where?: DistrictWhereInput
    /**
     * Limit how many Districts to update.
     */
    limit?: number
  }

  /**
   * District upsert
   */
  export type DistrictUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * The filter to search for the District to update in case it exists.
     */
    where: DistrictWhereUniqueInput
    /**
     * In case the District found by the `where` argument doesn't exist, create a new District with this data.
     */
    create: XOR<DistrictCreateInput, DistrictUncheckedCreateInput>
    /**
     * In case the District was found with the provided `where` argument, update it with this data.
     */
    update: XOR<DistrictUpdateInput, DistrictUncheckedUpdateInput>
  }

  /**
   * District delete
   */
  export type DistrictDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
    /**
     * Filter which District to delete.
     */
    where: DistrictWhereUniqueInput
  }

  /**
   * District deleteMany
   */
  export type DistrictDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Districts to delete
     */
    where?: DistrictWhereInput
    /**
     * Limit how many Districts to delete.
     */
    limit?: number
  }

  /**
   * District.customers
   */
  export type District$customersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    where?: CustomerWhereInput
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    cursor?: CustomerWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * District.suppliers
   */
  export type District$suppliersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    where?: SupplierWhereInput
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    cursor?: SupplierWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * District.createdByUser
   */
  export type District$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * District without action
   */
  export type DistrictDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the District
     */
    select?: DistrictSelect<ExtArgs> | null
    /**
     * Omit specific fields from the District
     */
    omit?: DistrictOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DistrictInclude<ExtArgs> | null
  }


  /**
   * Model Vegetable
   */

  export type AggregateVegetable = {
    _count: VegetableCountAggregateOutputType | null
    _avg: VegetableAvgAggregateOutputType | null
    _sum: VegetableSumAggregateOutputType | null
    _min: VegetableMinAggregateOutputType | null
    _max: VegetableMaxAggregateOutputType | null
  }

  export type VegetableAvgAggregateOutputType = {
    id: number | null
    createdBy: number | null
  }

  export type VegetableSumAggregateOutputType = {
    id: bigint | null
    createdBy: bigint | null
  }

  export type VegetableMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    hindiName: string | null
    kannadaName: string | null
    malayalamName: string | null
    teluguName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    hsnCode: string | null
    isFlexible: boolean | null
    createdBy: bigint | null
  }

  export type VegetableMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    hindiName: string | null
    kannadaName: string | null
    malayalamName: string | null
    teluguName: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    hsnCode: string | null
    isFlexible: boolean | null
    createdBy: bigint | null
  }

  export type VegetableCountAggregateOutputType = {
    id: number
    name: number
    tamilName: number
    hindiName: number
    kannadaName: number
    malayalamName: number
    teluguName: number
    status: number
    createdAt: number
    updatedAt: number
    hsnCode: number
    isFlexible: number
    createdBy: number
    _all: number
  }


  export type VegetableAvgAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type VegetableSumAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type VegetableMinAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    hindiName?: true
    kannadaName?: true
    malayalamName?: true
    teluguName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    hsnCode?: true
    isFlexible?: true
    createdBy?: true
  }

  export type VegetableMaxAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    hindiName?: true
    kannadaName?: true
    malayalamName?: true
    teluguName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    hsnCode?: true
    isFlexible?: true
    createdBy?: true
  }

  export type VegetableCountAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    hindiName?: true
    kannadaName?: true
    malayalamName?: true
    teluguName?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    hsnCode?: true
    isFlexible?: true
    createdBy?: true
    _all?: true
  }

  export type VegetableAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Vegetable to aggregate.
     */
    where?: VegetableWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Vegetables to fetch.
     */
    orderBy?: VegetableOrderByWithRelationInput | VegetableOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: VegetableWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Vegetables 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` Vegetables.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Vegetables
    **/
    _count?: true | VegetableCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: VegetableAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: VegetableSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: VegetableMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: VegetableMaxAggregateInputType
  }

  export type GetVegetableAggregateType<T extends VegetableAggregateArgs> = {
        [P in keyof T & keyof AggregateVegetable]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateVegetable[P]>
      : GetScalarType<T[P], AggregateVegetable[P]>
  }




  export type VegetableGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: VegetableWhereInput
    orderBy?: VegetableOrderByWithAggregationInput | VegetableOrderByWithAggregationInput[]
    by: VegetableScalarFieldEnum[] | VegetableScalarFieldEnum
    having?: VegetableScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: VegetableCountAggregateInputType | true
    _avg?: VegetableAvgAggregateInputType
    _sum?: VegetableSumAggregateInputType
    _min?: VegetableMinAggregateInputType
    _max?: VegetableMaxAggregateInputType
  }

  export type VegetableGroupByOutputType = {
    id: bigint
    name: string
    tamilName: string | null
    hindiName: string | null
    kannadaName: string | null
    malayalamName: string | null
    teluguName: string | null
    status: boolean
    createdAt: Date
    updatedAt: Date
    hsnCode: string | null
    isFlexible: boolean
    createdBy: bigint | null
    _count: VegetableCountAggregateOutputType | null
    _avg: VegetableAvgAggregateOutputType | null
    _sum: VegetableSumAggregateOutputType | null
    _min: VegetableMinAggregateOutputType | null
    _max: VegetableMaxAggregateOutputType | null
  }

  type GetVegetableGroupByPayload<T extends VegetableGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<VegetableGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof VegetableGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], VegetableGroupByOutputType[P]>
            : GetScalarType<T[P], VegetableGroupByOutputType[P]>
        }
      >
    >


  export type VegetableSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    tamilName?: boolean
    hindiName?: boolean
    kannadaName?: boolean
    malayalamName?: boolean
    teluguName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    hsnCode?: boolean
    isFlexible?: boolean
    createdBy?: boolean
    purchases?: boolean | Vegetable$purchasesArgs<ExtArgs>
    quotationItems?: boolean | Vegetable$quotationItemsArgs<ExtArgs>
    createdByUser?: boolean | Vegetable$createdByUserArgs<ExtArgs>
    _count?: boolean | VegetableCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["vegetable"]>



  export type VegetableSelectScalar = {
    id?: boolean
    name?: boolean
    tamilName?: boolean
    hindiName?: boolean
    kannadaName?: boolean
    malayalamName?: boolean
    teluguName?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    hsnCode?: boolean
    isFlexible?: boolean
    createdBy?: boolean
  }

  export type VegetableOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "tamilName" | "hindiName" | "kannadaName" | "malayalamName" | "teluguName" | "status" | "createdAt" | "updatedAt" | "hsnCode" | "isFlexible" | "createdBy", ExtArgs["result"]["vegetable"]>
  export type VegetableInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchases?: boolean | Vegetable$purchasesArgs<ExtArgs>
    quotationItems?: boolean | Vegetable$quotationItemsArgs<ExtArgs>
    createdByUser?: boolean | Vegetable$createdByUserArgs<ExtArgs>
    _count?: boolean | VegetableCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $VegetablePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Vegetable"
    objects: {
      purchases: Prisma.$PurchasePayload<ExtArgs>[]
      quotationItems: Prisma.$QuotationItemPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      tamilName: string | null
      hindiName: string | null
      kannadaName: string | null
      malayalamName: string | null
      teluguName: string | null
      status: boolean
      createdAt: Date
      updatedAt: Date
      hsnCode: string | null
      isFlexible: boolean
      createdBy: bigint | null
    }, ExtArgs["result"]["vegetable"]>
    composites: {}
  }

  type VegetableGetPayload<S extends boolean | null | undefined | VegetableDefaultArgs> = $Result.GetResult<Prisma.$VegetablePayload, S>

  type VegetableCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<VegetableFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: VegetableCountAggregateInputType | true
    }

  export interface VegetableDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Vegetable'], meta: { name: 'Vegetable' } }
    /**
     * Find zero or one Vegetable that matches the filter.
     * @param {VegetableFindUniqueArgs} args - Arguments to find a Vegetable
     * @example
     * // Get one Vegetable
     * const vegetable = await prisma.vegetable.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends VegetableFindUniqueArgs>(args: SelectSubset<T, VegetableFindUniqueArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Vegetable that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {VegetableFindUniqueOrThrowArgs} args - Arguments to find a Vegetable
     * @example
     * // Get one Vegetable
     * const vegetable = await prisma.vegetable.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends VegetableFindUniqueOrThrowArgs>(args: SelectSubset<T, VegetableFindUniqueOrThrowArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Vegetable 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 {VegetableFindFirstArgs} args - Arguments to find a Vegetable
     * @example
     * // Get one Vegetable
     * const vegetable = await prisma.vegetable.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends VegetableFindFirstArgs>(args?: SelectSubset<T, VegetableFindFirstArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Vegetable 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 {VegetableFindFirstOrThrowArgs} args - Arguments to find a Vegetable
     * @example
     * // Get one Vegetable
     * const vegetable = await prisma.vegetable.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends VegetableFindFirstOrThrowArgs>(args?: SelectSubset<T, VegetableFindFirstOrThrowArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Vegetables 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 {VegetableFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Vegetables
     * const vegetables = await prisma.vegetable.findMany()
     * 
     * // Get first 10 Vegetables
     * const vegetables = await prisma.vegetable.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const vegetableWithIdOnly = await prisma.vegetable.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends VegetableFindManyArgs>(args?: SelectSubset<T, VegetableFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Vegetable.
     * @param {VegetableCreateArgs} args - Arguments to create a Vegetable.
     * @example
     * // Create one Vegetable
     * const Vegetable = await prisma.vegetable.create({
     *   data: {
     *     // ... data to create a Vegetable
     *   }
     * })
     * 
     */
    create<T extends VegetableCreateArgs>(args: SelectSubset<T, VegetableCreateArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Vegetables.
     * @param {VegetableCreateManyArgs} args - Arguments to create many Vegetables.
     * @example
     * // Create many Vegetables
     * const vegetable = await prisma.vegetable.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends VegetableCreateManyArgs>(args?: SelectSubset<T, VegetableCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Vegetable.
     * @param {VegetableDeleteArgs} args - Arguments to delete one Vegetable.
     * @example
     * // Delete one Vegetable
     * const Vegetable = await prisma.vegetable.delete({
     *   where: {
     *     // ... filter to delete one Vegetable
     *   }
     * })
     * 
     */
    delete<T extends VegetableDeleteArgs>(args: SelectSubset<T, VegetableDeleteArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Vegetable.
     * @param {VegetableUpdateArgs} args - Arguments to update one Vegetable.
     * @example
     * // Update one Vegetable
     * const vegetable = await prisma.vegetable.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends VegetableUpdateArgs>(args: SelectSubset<T, VegetableUpdateArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Vegetables.
     * @param {VegetableDeleteManyArgs} args - Arguments to filter Vegetables to delete.
     * @example
     * // Delete a few Vegetables
     * const { count } = await prisma.vegetable.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends VegetableDeleteManyArgs>(args?: SelectSubset<T, VegetableDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Vegetables.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {VegetableUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Vegetables
     * const vegetable = await prisma.vegetable.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends VegetableUpdateManyArgs>(args: SelectSubset<T, VegetableUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Vegetable.
     * @param {VegetableUpsertArgs} args - Arguments to update or create a Vegetable.
     * @example
     * // Update or create a Vegetable
     * const vegetable = await prisma.vegetable.upsert({
     *   create: {
     *     // ... data to create a Vegetable
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Vegetable we want to update
     *   }
     * })
     */
    upsert<T extends VegetableUpsertArgs>(args: SelectSubset<T, VegetableUpsertArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Vegetables.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {VegetableCountArgs} args - Arguments to filter Vegetables to count.
     * @example
     * // Count the number of Vegetables
     * const count = await prisma.vegetable.count({
     *   where: {
     *     // ... the filter for the Vegetables we want to count
     *   }
     * })
    **/
    count<T extends VegetableCountArgs>(
      args?: Subset<T, VegetableCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], VegetableCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Vegetable.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {VegetableAggregateArgs} 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 VegetableAggregateArgs>(args: Subset<T, VegetableAggregateArgs>): Prisma.PrismaPromise<GetVegetableAggregateType<T>>

    /**
     * Group by Vegetable.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {VegetableGroupByArgs} 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 VegetableGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: VegetableGroupByArgs['orderBy'] }
        : { orderBy?: VegetableGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, VegetableGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetVegetableGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Vegetable model
   */
  readonly fields: VegetableFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Vegetable.
   * 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__VegetableClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchases<T extends Vegetable$purchasesArgs<ExtArgs> = {}>(args?: Subset<T, Vegetable$purchasesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    quotationItems<T extends Vegetable$quotationItemsArgs<ExtArgs> = {}>(args?: Subset<T, Vegetable$quotationItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Vegetable$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Vegetable$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Vegetable model
   */
  interface VegetableFieldRefs {
    readonly id: FieldRef<"Vegetable", 'BigInt'>
    readonly name: FieldRef<"Vegetable", 'String'>
    readonly tamilName: FieldRef<"Vegetable", 'String'>
    readonly hindiName: FieldRef<"Vegetable", 'String'>
    readonly kannadaName: FieldRef<"Vegetable", 'String'>
    readonly malayalamName: FieldRef<"Vegetable", 'String'>
    readonly teluguName: FieldRef<"Vegetable", 'String'>
    readonly status: FieldRef<"Vegetable", 'Boolean'>
    readonly createdAt: FieldRef<"Vegetable", 'DateTime'>
    readonly updatedAt: FieldRef<"Vegetable", 'DateTime'>
    readonly hsnCode: FieldRef<"Vegetable", 'String'>
    readonly isFlexible: FieldRef<"Vegetable", 'Boolean'>
    readonly createdBy: FieldRef<"Vegetable", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Vegetable findUnique
   */
  export type VegetableFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter, which Vegetable to fetch.
     */
    where: VegetableWhereUniqueInput
  }

  /**
   * Vegetable findUniqueOrThrow
   */
  export type VegetableFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter, which Vegetable to fetch.
     */
    where: VegetableWhereUniqueInput
  }

  /**
   * Vegetable findFirst
   */
  export type VegetableFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter, which Vegetable to fetch.
     */
    where?: VegetableWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Vegetables to fetch.
     */
    orderBy?: VegetableOrderByWithRelationInput | VegetableOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Vegetables.
     */
    cursor?: VegetableWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Vegetables 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` Vegetables.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Vegetables.
     */
    distinct?: VegetableScalarFieldEnum | VegetableScalarFieldEnum[]
  }

  /**
   * Vegetable findFirstOrThrow
   */
  export type VegetableFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter, which Vegetable to fetch.
     */
    where?: VegetableWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Vegetables to fetch.
     */
    orderBy?: VegetableOrderByWithRelationInput | VegetableOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Vegetables.
     */
    cursor?: VegetableWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Vegetables 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` Vegetables.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Vegetables.
     */
    distinct?: VegetableScalarFieldEnum | VegetableScalarFieldEnum[]
  }

  /**
   * Vegetable findMany
   */
  export type VegetableFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter, which Vegetables to fetch.
     */
    where?: VegetableWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Vegetables to fetch.
     */
    orderBy?: VegetableOrderByWithRelationInput | VegetableOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Vegetables.
     */
    cursor?: VegetableWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Vegetables 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` Vegetables.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Vegetables.
     */
    distinct?: VegetableScalarFieldEnum | VegetableScalarFieldEnum[]
  }

  /**
   * Vegetable create
   */
  export type VegetableCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * The data needed to create a Vegetable.
     */
    data: XOR<VegetableCreateInput, VegetableUncheckedCreateInput>
  }

  /**
   * Vegetable createMany
   */
  export type VegetableCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Vegetables.
     */
    data: VegetableCreateManyInput | VegetableCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Vegetable update
   */
  export type VegetableUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * The data needed to update a Vegetable.
     */
    data: XOR<VegetableUpdateInput, VegetableUncheckedUpdateInput>
    /**
     * Choose, which Vegetable to update.
     */
    where: VegetableWhereUniqueInput
  }

  /**
   * Vegetable updateMany
   */
  export type VegetableUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Vegetables.
     */
    data: XOR<VegetableUpdateManyMutationInput, VegetableUncheckedUpdateManyInput>
    /**
     * Filter which Vegetables to update
     */
    where?: VegetableWhereInput
    /**
     * Limit how many Vegetables to update.
     */
    limit?: number
  }

  /**
   * Vegetable upsert
   */
  export type VegetableUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * The filter to search for the Vegetable to update in case it exists.
     */
    where: VegetableWhereUniqueInput
    /**
     * In case the Vegetable found by the `where` argument doesn't exist, create a new Vegetable with this data.
     */
    create: XOR<VegetableCreateInput, VegetableUncheckedCreateInput>
    /**
     * In case the Vegetable was found with the provided `where` argument, update it with this data.
     */
    update: XOR<VegetableUpdateInput, VegetableUncheckedUpdateInput>
  }

  /**
   * Vegetable delete
   */
  export type VegetableDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    /**
     * Filter which Vegetable to delete.
     */
    where: VegetableWhereUniqueInput
  }

  /**
   * Vegetable deleteMany
   */
  export type VegetableDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Vegetables to delete
     */
    where?: VegetableWhereInput
    /**
     * Limit how many Vegetables to delete.
     */
    limit?: number
  }

  /**
   * Vegetable.purchases
   */
  export type Vegetable$purchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    where?: PurchaseWhereInput
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    cursor?: PurchaseWhereUniqueInput
    take?: number
    skip?: number
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * Vegetable.quotationItems
   */
  export type Vegetable$quotationItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    where?: QuotationItemWhereInput
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    cursor?: QuotationItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * Vegetable.createdByUser
   */
  export type Vegetable$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Vegetable without action
   */
  export type VegetableDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
  }


  /**
   * Model Customer
   */

  export type AggregateCustomer = {
    _count: CustomerCountAggregateOutputType | null
    _avg: CustomerAvgAggregateOutputType | null
    _sum: CustomerSumAggregateOutputType | null
    _min: CustomerMinAggregateOutputType | null
    _max: CustomerMaxAggregateOutputType | null
  }

  export type CustomerAvgAggregateOutputType = {
    id: number | null
    stateId: number | null
    districtId: number | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    createdBy: number | null
  }

  export type CustomerSumAggregateOutputType = {
    id: bigint | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    createdBy: bigint | null
  }

  export type CustomerMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    mobileNo: string | null
    address: string | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type CustomerMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    mobileNo: string | null
    address: string | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type CustomerCountAggregateOutputType = {
    id: number
    name: number
    tamilName: number
    mobileNo: number
    address: number
    stateId: number
    districtId: number
    openingBalance: number
    outstandingBalance: number
    status: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type CustomerAvgAggregateInputType = {
    id?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    createdBy?: true
  }

  export type CustomerSumAggregateInputType = {
    id?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    createdBy?: true
  }

  export type CustomerMinAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type CustomerMaxAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type CustomerCountAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type CustomerAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Customer to aggregate.
     */
    where?: CustomerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Customers to fetch.
     */
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: CustomerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Customers 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` Customers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Customers
    **/
    _count?: true | CustomerCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: CustomerAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: CustomerSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: CustomerMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: CustomerMaxAggregateInputType
  }

  export type GetCustomerAggregateType<T extends CustomerAggregateArgs> = {
        [P in keyof T & keyof AggregateCustomer]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateCustomer[P]>
      : GetScalarType<T[P], AggregateCustomer[P]>
  }




  export type CustomerGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerWhereInput
    orderBy?: CustomerOrderByWithAggregationInput | CustomerOrderByWithAggregationInput[]
    by: CustomerScalarFieldEnum[] | CustomerScalarFieldEnum
    having?: CustomerScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: CustomerCountAggregateInputType | true
    _avg?: CustomerAvgAggregateInputType
    _sum?: CustomerSumAggregateInputType
    _min?: CustomerMinAggregateInputType
    _max?: CustomerMaxAggregateInputType
  }

  export type CustomerGroupByOutputType = {
    id: bigint
    name: string
    tamilName: string | null
    mobileNo: string
    address: string | null
    stateId: bigint
    districtId: bigint
    openingBalance: Decimal
    outstandingBalance: Decimal
    status: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: CustomerCountAggregateOutputType | null
    _avg: CustomerAvgAggregateOutputType | null
    _sum: CustomerSumAggregateOutputType | null
    _min: CustomerMinAggregateOutputType | null
    _max: CustomerMaxAggregateOutputType | null
  }

  type GetCustomerGroupByPayload<T extends CustomerGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<CustomerGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof CustomerGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], CustomerGroupByOutputType[P]>
            : GetScalarType<T[P], CustomerGroupByOutputType[P]>
        }
      >
    >


  export type CustomerSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    tamilName?: boolean
    mobileNo?: boolean
    address?: boolean
    stateId?: boolean
    districtId?: boolean
    openingBalance?: boolean
    outstandingBalance?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    state?: boolean | StateDefaultArgs<ExtArgs>
    district?: boolean | DistrictDefaultArgs<ExtArgs>
    sales?: boolean | Customer$salesArgs<ExtArgs>
    customerReceipts?: boolean | Customer$customerReceiptsArgs<ExtArgs>
    quotations?: boolean | Customer$quotationsArgs<ExtArgs>
    createdByUser?: boolean | Customer$createdByUserArgs<ExtArgs>
    _count?: boolean | CustomerCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["customer"]>



  export type CustomerSelectScalar = {
    id?: boolean
    name?: boolean
    tamilName?: boolean
    mobileNo?: boolean
    address?: boolean
    stateId?: boolean
    districtId?: boolean
    openingBalance?: boolean
    outstandingBalance?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type CustomerOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "tamilName" | "mobileNo" | "address" | "stateId" | "districtId" | "openingBalance" | "outstandingBalance" | "status" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["customer"]>
  export type CustomerInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    state?: boolean | StateDefaultArgs<ExtArgs>
    district?: boolean | DistrictDefaultArgs<ExtArgs>
    sales?: boolean | Customer$salesArgs<ExtArgs>
    customerReceipts?: boolean | Customer$customerReceiptsArgs<ExtArgs>
    quotations?: boolean | Customer$quotationsArgs<ExtArgs>
    createdByUser?: boolean | Customer$createdByUserArgs<ExtArgs>
    _count?: boolean | CustomerCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $CustomerPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Customer"
    objects: {
      state: Prisma.$StatePayload<ExtArgs>
      district: Prisma.$DistrictPayload<ExtArgs>
      sales: Prisma.$SalePayload<ExtArgs>[]
      customerReceipts: Prisma.$CustomerReceiptPayload<ExtArgs>[]
      quotations: Prisma.$QuotationPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      tamilName: string | null
      mobileNo: string
      address: string | null
      stateId: bigint
      districtId: bigint
      openingBalance: Prisma.Decimal
      outstandingBalance: Prisma.Decimal
      status: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["customer"]>
    composites: {}
  }

  type CustomerGetPayload<S extends boolean | null | undefined | CustomerDefaultArgs> = $Result.GetResult<Prisma.$CustomerPayload, S>

  type CustomerCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<CustomerFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: CustomerCountAggregateInputType | true
    }

  export interface CustomerDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Customer'], meta: { name: 'Customer' } }
    /**
     * Find zero or one Customer that matches the filter.
     * @param {CustomerFindUniqueArgs} args - Arguments to find a Customer
     * @example
     * // Get one Customer
     * const customer = await prisma.customer.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends CustomerFindUniqueArgs>(args: SelectSubset<T, CustomerFindUniqueArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Customer that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {CustomerFindUniqueOrThrowArgs} args - Arguments to find a Customer
     * @example
     * // Get one Customer
     * const customer = await prisma.customer.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends CustomerFindUniqueOrThrowArgs>(args: SelectSubset<T, CustomerFindUniqueOrThrowArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Customer 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 {CustomerFindFirstArgs} args - Arguments to find a Customer
     * @example
     * // Get one Customer
     * const customer = await prisma.customer.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends CustomerFindFirstArgs>(args?: SelectSubset<T, CustomerFindFirstArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Customer 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 {CustomerFindFirstOrThrowArgs} args - Arguments to find a Customer
     * @example
     * // Get one Customer
     * const customer = await prisma.customer.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends CustomerFindFirstOrThrowArgs>(args?: SelectSubset<T, CustomerFindFirstOrThrowArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Customers 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 {CustomerFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Customers
     * const customers = await prisma.customer.findMany()
     * 
     * // Get first 10 Customers
     * const customers = await prisma.customer.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const customerWithIdOnly = await prisma.customer.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends CustomerFindManyArgs>(args?: SelectSubset<T, CustomerFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Customer.
     * @param {CustomerCreateArgs} args - Arguments to create a Customer.
     * @example
     * // Create one Customer
     * const Customer = await prisma.customer.create({
     *   data: {
     *     // ... data to create a Customer
     *   }
     * })
     * 
     */
    create<T extends CustomerCreateArgs>(args: SelectSubset<T, CustomerCreateArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Customers.
     * @param {CustomerCreateManyArgs} args - Arguments to create many Customers.
     * @example
     * // Create many Customers
     * const customer = await prisma.customer.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends CustomerCreateManyArgs>(args?: SelectSubset<T, CustomerCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Customer.
     * @param {CustomerDeleteArgs} args - Arguments to delete one Customer.
     * @example
     * // Delete one Customer
     * const Customer = await prisma.customer.delete({
     *   where: {
     *     // ... filter to delete one Customer
     *   }
     * })
     * 
     */
    delete<T extends CustomerDeleteArgs>(args: SelectSubset<T, CustomerDeleteArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Customer.
     * @param {CustomerUpdateArgs} args - Arguments to update one Customer.
     * @example
     * // Update one Customer
     * const customer = await prisma.customer.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends CustomerUpdateArgs>(args: SelectSubset<T, CustomerUpdateArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Customers.
     * @param {CustomerDeleteManyArgs} args - Arguments to filter Customers to delete.
     * @example
     * // Delete a few Customers
     * const { count } = await prisma.customer.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends CustomerDeleteManyArgs>(args?: SelectSubset<T, CustomerDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Customers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Customers
     * const customer = await prisma.customer.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends CustomerUpdateManyArgs>(args: SelectSubset<T, CustomerUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Customer.
     * @param {CustomerUpsertArgs} args - Arguments to update or create a Customer.
     * @example
     * // Update or create a Customer
     * const customer = await prisma.customer.upsert({
     *   create: {
     *     // ... data to create a Customer
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Customer we want to update
     *   }
     * })
     */
    upsert<T extends CustomerUpsertArgs>(args: SelectSubset<T, CustomerUpsertArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Customers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerCountArgs} args - Arguments to filter Customers to count.
     * @example
     * // Count the number of Customers
     * const count = await prisma.customer.count({
     *   where: {
     *     // ... the filter for the Customers we want to count
     *   }
     * })
    **/
    count<T extends CustomerCountArgs>(
      args?: Subset<T, CustomerCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], CustomerCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Customer.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerAggregateArgs} 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 CustomerAggregateArgs>(args: Subset<T, CustomerAggregateArgs>): Prisma.PrismaPromise<GetCustomerAggregateType<T>>

    /**
     * Group by Customer.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerGroupByArgs} 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 CustomerGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: CustomerGroupByArgs['orderBy'] }
        : { orderBy?: CustomerGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, CustomerGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCustomerGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Customer model
   */
  readonly fields: CustomerFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Customer.
   * 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__CustomerClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    state<T extends StateDefaultArgs<ExtArgs> = {}>(args?: Subset<T, StateDefaultArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    district<T extends DistrictDefaultArgs<ExtArgs> = {}>(args?: Subset<T, DistrictDefaultArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    sales<T extends Customer$salesArgs<ExtArgs> = {}>(args?: Subset<T, Customer$salesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    customerReceipts<T extends Customer$customerReceiptsArgs<ExtArgs> = {}>(args?: Subset<T, Customer$customerReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    quotations<T extends Customer$quotationsArgs<ExtArgs> = {}>(args?: Subset<T, Customer$quotationsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Customer$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Customer$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Customer model
   */
  interface CustomerFieldRefs {
    readonly id: FieldRef<"Customer", 'BigInt'>
    readonly name: FieldRef<"Customer", 'String'>
    readonly tamilName: FieldRef<"Customer", 'String'>
    readonly mobileNo: FieldRef<"Customer", 'String'>
    readonly address: FieldRef<"Customer", 'String'>
    readonly stateId: FieldRef<"Customer", 'BigInt'>
    readonly districtId: FieldRef<"Customer", 'BigInt'>
    readonly openingBalance: FieldRef<"Customer", 'Decimal'>
    readonly outstandingBalance: FieldRef<"Customer", 'Decimal'>
    readonly status: FieldRef<"Customer", 'Boolean'>
    readonly createdAt: FieldRef<"Customer", 'DateTime'>
    readonly updatedAt: FieldRef<"Customer", 'DateTime'>
    readonly deletedAt: FieldRef<"Customer", 'DateTime'>
    readonly createdBy: FieldRef<"Customer", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Customer findUnique
   */
  export type CustomerFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter, which Customer to fetch.
     */
    where: CustomerWhereUniqueInput
  }

  /**
   * Customer findUniqueOrThrow
   */
  export type CustomerFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter, which Customer to fetch.
     */
    where: CustomerWhereUniqueInput
  }

  /**
   * Customer findFirst
   */
  export type CustomerFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter, which Customer to fetch.
     */
    where?: CustomerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Customers to fetch.
     */
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Customers.
     */
    cursor?: CustomerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Customers 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` Customers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Customers.
     */
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * Customer findFirstOrThrow
   */
  export type CustomerFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter, which Customer to fetch.
     */
    where?: CustomerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Customers to fetch.
     */
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Customers.
     */
    cursor?: CustomerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Customers 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` Customers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Customers.
     */
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * Customer findMany
   */
  export type CustomerFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter, which Customers to fetch.
     */
    where?: CustomerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Customers to fetch.
     */
    orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Customers.
     */
    cursor?: CustomerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Customers 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` Customers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Customers.
     */
    distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[]
  }

  /**
   * Customer create
   */
  export type CustomerCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * The data needed to create a Customer.
     */
    data: XOR<CustomerCreateInput, CustomerUncheckedCreateInput>
  }

  /**
   * Customer createMany
   */
  export type CustomerCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Customers.
     */
    data: CustomerCreateManyInput | CustomerCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Customer update
   */
  export type CustomerUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * The data needed to update a Customer.
     */
    data: XOR<CustomerUpdateInput, CustomerUncheckedUpdateInput>
    /**
     * Choose, which Customer to update.
     */
    where: CustomerWhereUniqueInput
  }

  /**
   * Customer updateMany
   */
  export type CustomerUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Customers.
     */
    data: XOR<CustomerUpdateManyMutationInput, CustomerUncheckedUpdateManyInput>
    /**
     * Filter which Customers to update
     */
    where?: CustomerWhereInput
    /**
     * Limit how many Customers to update.
     */
    limit?: number
  }

  /**
   * Customer upsert
   */
  export type CustomerUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * The filter to search for the Customer to update in case it exists.
     */
    where: CustomerWhereUniqueInput
    /**
     * In case the Customer found by the `where` argument doesn't exist, create a new Customer with this data.
     */
    create: XOR<CustomerCreateInput, CustomerUncheckedCreateInput>
    /**
     * In case the Customer was found with the provided `where` argument, update it with this data.
     */
    update: XOR<CustomerUpdateInput, CustomerUncheckedUpdateInput>
  }

  /**
   * Customer delete
   */
  export type CustomerDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    /**
     * Filter which Customer to delete.
     */
    where: CustomerWhereUniqueInput
  }

  /**
   * Customer deleteMany
   */
  export type CustomerDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Customers to delete
     */
    where?: CustomerWhereInput
    /**
     * Limit how many Customers to delete.
     */
    limit?: number
  }

  /**
   * Customer.sales
   */
  export type Customer$salesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    where?: SaleWhereInput
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    cursor?: SaleWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleScalarFieldEnum | SaleScalarFieldEnum[]
  }

  /**
   * Customer.customerReceipts
   */
  export type Customer$customerReceiptsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    where?: CustomerReceiptWhereInput
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    cursor?: CustomerReceiptWhereUniqueInput
    take?: number
    skip?: number
    distinct?: CustomerReceiptScalarFieldEnum | CustomerReceiptScalarFieldEnum[]
  }

  /**
   * Customer.quotations
   */
  export type Customer$quotationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    where?: QuotationWhereInput
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    cursor?: QuotationWhereUniqueInput
    take?: number
    skip?: number
    distinct?: QuotationScalarFieldEnum | QuotationScalarFieldEnum[]
  }

  /**
   * Customer.createdByUser
   */
  export type Customer$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Customer without action
   */
  export type CustomerDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
  }


  /**
   * Model Supplier
   */

  export type AggregateSupplier = {
    _count: SupplierCountAggregateOutputType | null
    _avg: SupplierAvgAggregateOutputType | null
    _sum: SupplierSumAggregateOutputType | null
    _min: SupplierMinAggregateOutputType | null
    _max: SupplierMaxAggregateOutputType | null
  }

  export type SupplierAvgAggregateOutputType = {
    id: number | null
    stateId: number | null
    districtId: number | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    createdBy: number | null
  }

  export type SupplierSumAggregateOutputType = {
    id: bigint | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    createdBy: bigint | null
  }

  export type SupplierMinAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    mobileNo: string | null
    address: string | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SupplierMaxAggregateOutputType = {
    id: bigint | null
    name: string | null
    tamilName: string | null
    mobileNo: string | null
    address: string | null
    stateId: bigint | null
    districtId: bigint | null
    openingBalance: Decimal | null
    outstandingBalance: Decimal | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SupplierCountAggregateOutputType = {
    id: number
    name: number
    tamilName: number
    mobileNo: number
    address: number
    stateId: number
    districtId: number
    openingBalance: number
    outstandingBalance: number
    status: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type SupplierAvgAggregateInputType = {
    id?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    createdBy?: true
  }

  export type SupplierSumAggregateInputType = {
    id?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    createdBy?: true
  }

  export type SupplierMinAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SupplierMaxAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SupplierCountAggregateInputType = {
    id?: true
    name?: true
    tamilName?: true
    mobileNo?: true
    address?: true
    stateId?: true
    districtId?: true
    openingBalance?: true
    outstandingBalance?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type SupplierAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Supplier to aggregate.
     */
    where?: SupplierWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Suppliers to fetch.
     */
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: SupplierWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Suppliers 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` Suppliers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Suppliers
    **/
    _count?: true | SupplierCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: SupplierAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: SupplierSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: SupplierMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: SupplierMaxAggregateInputType
  }

  export type GetSupplierAggregateType<T extends SupplierAggregateArgs> = {
        [P in keyof T & keyof AggregateSupplier]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateSupplier[P]>
      : GetScalarType<T[P], AggregateSupplier[P]>
  }




  export type SupplierGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierWhereInput
    orderBy?: SupplierOrderByWithAggregationInput | SupplierOrderByWithAggregationInput[]
    by: SupplierScalarFieldEnum[] | SupplierScalarFieldEnum
    having?: SupplierScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: SupplierCountAggregateInputType | true
    _avg?: SupplierAvgAggregateInputType
    _sum?: SupplierSumAggregateInputType
    _min?: SupplierMinAggregateInputType
    _max?: SupplierMaxAggregateInputType
  }

  export type SupplierGroupByOutputType = {
    id: bigint
    name: string
    tamilName: string | null
    mobileNo: string
    address: string | null
    stateId: bigint
    districtId: bigint
    openingBalance: Decimal
    outstandingBalance: Decimal
    status: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: SupplierCountAggregateOutputType | null
    _avg: SupplierAvgAggregateOutputType | null
    _sum: SupplierSumAggregateOutputType | null
    _min: SupplierMinAggregateOutputType | null
    _max: SupplierMaxAggregateOutputType | null
  }

  type GetSupplierGroupByPayload<T extends SupplierGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<SupplierGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof SupplierGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], SupplierGroupByOutputType[P]>
            : GetScalarType<T[P], SupplierGroupByOutputType[P]>
        }
      >
    >


  export type SupplierSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    tamilName?: boolean
    mobileNo?: boolean
    address?: boolean
    stateId?: boolean
    districtId?: boolean
    openingBalance?: boolean
    outstandingBalance?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    state?: boolean | StateDefaultArgs<ExtArgs>
    district?: boolean | DistrictDefaultArgs<ExtArgs>
    purchases?: boolean | Supplier$purchasesArgs<ExtArgs>
    supplierPayments?: boolean | Supplier$supplierPaymentsArgs<ExtArgs>
    boxReturns?: boolean | Supplier$boxReturnsArgs<ExtArgs>
    createdByUser?: boolean | Supplier$createdByUserArgs<ExtArgs>
    _count?: boolean | SupplierCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["supplier"]>



  export type SupplierSelectScalar = {
    id?: boolean
    name?: boolean
    tamilName?: boolean
    mobileNo?: boolean
    address?: boolean
    stateId?: boolean
    districtId?: boolean
    openingBalance?: boolean
    outstandingBalance?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type SupplierOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "tamilName" | "mobileNo" | "address" | "stateId" | "districtId" | "openingBalance" | "outstandingBalance" | "status" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["supplier"]>
  export type SupplierInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    state?: boolean | StateDefaultArgs<ExtArgs>
    district?: boolean | DistrictDefaultArgs<ExtArgs>
    purchases?: boolean | Supplier$purchasesArgs<ExtArgs>
    supplierPayments?: boolean | Supplier$supplierPaymentsArgs<ExtArgs>
    boxReturns?: boolean | Supplier$boxReturnsArgs<ExtArgs>
    createdByUser?: boolean | Supplier$createdByUserArgs<ExtArgs>
    _count?: boolean | SupplierCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $SupplierPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Supplier"
    objects: {
      state: Prisma.$StatePayload<ExtArgs>
      district: Prisma.$DistrictPayload<ExtArgs>
      purchases: Prisma.$PurchasePayload<ExtArgs>[]
      supplierPayments: Prisma.$SupplierPaymentPayload<ExtArgs>[]
      boxReturns: Prisma.$BoxReturnPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      name: string
      tamilName: string | null
      mobileNo: string
      address: string | null
      stateId: bigint
      districtId: bigint
      openingBalance: Prisma.Decimal
      outstandingBalance: Prisma.Decimal
      status: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["supplier"]>
    composites: {}
  }

  type SupplierGetPayload<S extends boolean | null | undefined | SupplierDefaultArgs> = $Result.GetResult<Prisma.$SupplierPayload, S>

  type SupplierCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<SupplierFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: SupplierCountAggregateInputType | true
    }

  export interface SupplierDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Supplier'], meta: { name: 'Supplier' } }
    /**
     * Find zero or one Supplier that matches the filter.
     * @param {SupplierFindUniqueArgs} args - Arguments to find a Supplier
     * @example
     * // Get one Supplier
     * const supplier = await prisma.supplier.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends SupplierFindUniqueArgs>(args: SelectSubset<T, SupplierFindUniqueArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Supplier that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {SupplierFindUniqueOrThrowArgs} args - Arguments to find a Supplier
     * @example
     * // Get one Supplier
     * const supplier = await prisma.supplier.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends SupplierFindUniqueOrThrowArgs>(args: SelectSubset<T, SupplierFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Supplier 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 {SupplierFindFirstArgs} args - Arguments to find a Supplier
     * @example
     * // Get one Supplier
     * const supplier = await prisma.supplier.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends SupplierFindFirstArgs>(args?: SelectSubset<T, SupplierFindFirstArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Supplier 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 {SupplierFindFirstOrThrowArgs} args - Arguments to find a Supplier
     * @example
     * // Get one Supplier
     * const supplier = await prisma.supplier.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends SupplierFindFirstOrThrowArgs>(args?: SelectSubset<T, SupplierFindFirstOrThrowArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Suppliers 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 {SupplierFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Suppliers
     * const suppliers = await prisma.supplier.findMany()
     * 
     * // Get first 10 Suppliers
     * const suppliers = await prisma.supplier.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const supplierWithIdOnly = await prisma.supplier.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends SupplierFindManyArgs>(args?: SelectSubset<T, SupplierFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Supplier.
     * @param {SupplierCreateArgs} args - Arguments to create a Supplier.
     * @example
     * // Create one Supplier
     * const Supplier = await prisma.supplier.create({
     *   data: {
     *     // ... data to create a Supplier
     *   }
     * })
     * 
     */
    create<T extends SupplierCreateArgs>(args: SelectSubset<T, SupplierCreateArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Suppliers.
     * @param {SupplierCreateManyArgs} args - Arguments to create many Suppliers.
     * @example
     * // Create many Suppliers
     * const supplier = await prisma.supplier.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends SupplierCreateManyArgs>(args?: SelectSubset<T, SupplierCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Supplier.
     * @param {SupplierDeleteArgs} args - Arguments to delete one Supplier.
     * @example
     * // Delete one Supplier
     * const Supplier = await prisma.supplier.delete({
     *   where: {
     *     // ... filter to delete one Supplier
     *   }
     * })
     * 
     */
    delete<T extends SupplierDeleteArgs>(args: SelectSubset<T, SupplierDeleteArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Supplier.
     * @param {SupplierUpdateArgs} args - Arguments to update one Supplier.
     * @example
     * // Update one Supplier
     * const supplier = await prisma.supplier.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends SupplierUpdateArgs>(args: SelectSubset<T, SupplierUpdateArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Suppliers.
     * @param {SupplierDeleteManyArgs} args - Arguments to filter Suppliers to delete.
     * @example
     * // Delete a few Suppliers
     * const { count } = await prisma.supplier.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends SupplierDeleteManyArgs>(args?: SelectSubset<T, SupplierDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Suppliers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Suppliers
     * const supplier = await prisma.supplier.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends SupplierUpdateManyArgs>(args: SelectSubset<T, SupplierUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Supplier.
     * @param {SupplierUpsertArgs} args - Arguments to update or create a Supplier.
     * @example
     * // Update or create a Supplier
     * const supplier = await prisma.supplier.upsert({
     *   create: {
     *     // ... data to create a Supplier
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Supplier we want to update
     *   }
     * })
     */
    upsert<T extends SupplierUpsertArgs>(args: SelectSubset<T, SupplierUpsertArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Suppliers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierCountArgs} args - Arguments to filter Suppliers to count.
     * @example
     * // Count the number of Suppliers
     * const count = await prisma.supplier.count({
     *   where: {
     *     // ... the filter for the Suppliers we want to count
     *   }
     * })
    **/
    count<T extends SupplierCountArgs>(
      args?: Subset<T, SupplierCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], SupplierCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Supplier.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierAggregateArgs} 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 SupplierAggregateArgs>(args: Subset<T, SupplierAggregateArgs>): Prisma.PrismaPromise<GetSupplierAggregateType<T>>

    /**
     * Group by Supplier.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierGroupByArgs} 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 SupplierGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: SupplierGroupByArgs['orderBy'] }
        : { orderBy?: SupplierGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, SupplierGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSupplierGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Supplier model
   */
  readonly fields: SupplierFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Supplier.
   * 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__SupplierClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    state<T extends StateDefaultArgs<ExtArgs> = {}>(args?: Subset<T, StateDefaultArgs<ExtArgs>>): Prisma__StateClient<$Result.GetResult<Prisma.$StatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    district<T extends DistrictDefaultArgs<ExtArgs> = {}>(args?: Subset<T, DistrictDefaultArgs<ExtArgs>>): Prisma__DistrictClient<$Result.GetResult<Prisma.$DistrictPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    purchases<T extends Supplier$purchasesArgs<ExtArgs> = {}>(args?: Subset<T, Supplier$purchasesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    supplierPayments<T extends Supplier$supplierPaymentsArgs<ExtArgs> = {}>(args?: Subset<T, Supplier$supplierPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    boxReturns<T extends Supplier$boxReturnsArgs<ExtArgs> = {}>(args?: Subset<T, Supplier$boxReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Supplier$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Supplier$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Supplier model
   */
  interface SupplierFieldRefs {
    readonly id: FieldRef<"Supplier", 'BigInt'>
    readonly name: FieldRef<"Supplier", 'String'>
    readonly tamilName: FieldRef<"Supplier", 'String'>
    readonly mobileNo: FieldRef<"Supplier", 'String'>
    readonly address: FieldRef<"Supplier", 'String'>
    readonly stateId: FieldRef<"Supplier", 'BigInt'>
    readonly districtId: FieldRef<"Supplier", 'BigInt'>
    readonly openingBalance: FieldRef<"Supplier", 'Decimal'>
    readonly outstandingBalance: FieldRef<"Supplier", 'Decimal'>
    readonly status: FieldRef<"Supplier", 'Boolean'>
    readonly createdAt: FieldRef<"Supplier", 'DateTime'>
    readonly updatedAt: FieldRef<"Supplier", 'DateTime'>
    readonly deletedAt: FieldRef<"Supplier", 'DateTime'>
    readonly createdBy: FieldRef<"Supplier", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Supplier findUnique
   */
  export type SupplierFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter, which Supplier to fetch.
     */
    where: SupplierWhereUniqueInput
  }

  /**
   * Supplier findUniqueOrThrow
   */
  export type SupplierFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter, which Supplier to fetch.
     */
    where: SupplierWhereUniqueInput
  }

  /**
   * Supplier findFirst
   */
  export type SupplierFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter, which Supplier to fetch.
     */
    where?: SupplierWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Suppliers to fetch.
     */
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Suppliers.
     */
    cursor?: SupplierWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Suppliers 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` Suppliers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Suppliers.
     */
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * Supplier findFirstOrThrow
   */
  export type SupplierFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter, which Supplier to fetch.
     */
    where?: SupplierWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Suppliers to fetch.
     */
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Suppliers.
     */
    cursor?: SupplierWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Suppliers 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` Suppliers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Suppliers.
     */
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * Supplier findMany
   */
  export type SupplierFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter, which Suppliers to fetch.
     */
    where?: SupplierWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Suppliers to fetch.
     */
    orderBy?: SupplierOrderByWithRelationInput | SupplierOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Suppliers.
     */
    cursor?: SupplierWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Suppliers 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` Suppliers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Suppliers.
     */
    distinct?: SupplierScalarFieldEnum | SupplierScalarFieldEnum[]
  }

  /**
   * Supplier create
   */
  export type SupplierCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * The data needed to create a Supplier.
     */
    data: XOR<SupplierCreateInput, SupplierUncheckedCreateInput>
  }

  /**
   * Supplier createMany
   */
  export type SupplierCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Suppliers.
     */
    data: SupplierCreateManyInput | SupplierCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Supplier update
   */
  export type SupplierUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * The data needed to update a Supplier.
     */
    data: XOR<SupplierUpdateInput, SupplierUncheckedUpdateInput>
    /**
     * Choose, which Supplier to update.
     */
    where: SupplierWhereUniqueInput
  }

  /**
   * Supplier updateMany
   */
  export type SupplierUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Suppliers.
     */
    data: XOR<SupplierUpdateManyMutationInput, SupplierUncheckedUpdateManyInput>
    /**
     * Filter which Suppliers to update
     */
    where?: SupplierWhereInput
    /**
     * Limit how many Suppliers to update.
     */
    limit?: number
  }

  /**
   * Supplier upsert
   */
  export type SupplierUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * The filter to search for the Supplier to update in case it exists.
     */
    where: SupplierWhereUniqueInput
    /**
     * In case the Supplier found by the `where` argument doesn't exist, create a new Supplier with this data.
     */
    create: XOR<SupplierCreateInput, SupplierUncheckedCreateInput>
    /**
     * In case the Supplier was found with the provided `where` argument, update it with this data.
     */
    update: XOR<SupplierUpdateInput, SupplierUncheckedUpdateInput>
  }

  /**
   * Supplier delete
   */
  export type SupplierDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    /**
     * Filter which Supplier to delete.
     */
    where: SupplierWhereUniqueInput
  }

  /**
   * Supplier deleteMany
   */
  export type SupplierDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Suppliers to delete
     */
    where?: SupplierWhereInput
    /**
     * Limit how many Suppliers to delete.
     */
    limit?: number
  }

  /**
   * Supplier.purchases
   */
  export type Supplier$purchasesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    where?: PurchaseWhereInput
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    cursor?: PurchaseWhereUniqueInput
    take?: number
    skip?: number
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * Supplier.supplierPayments
   */
  export type Supplier$supplierPaymentsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    where?: SupplierPaymentWhereInput
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    cursor?: SupplierPaymentWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SupplierPaymentScalarFieldEnum | SupplierPaymentScalarFieldEnum[]
  }

  /**
   * Supplier.boxReturns
   */
  export type Supplier$boxReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    where?: BoxReturnWhereInput
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    cursor?: BoxReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: BoxReturnScalarFieldEnum | BoxReturnScalarFieldEnum[]
  }

  /**
   * Supplier.createdByUser
   */
  export type Supplier$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Supplier without action
   */
  export type SupplierDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
  }


  /**
   * Model SupplierPayment
   */

  export type AggregateSupplierPayment = {
    _count: SupplierPaymentCountAggregateOutputType | null
    _avg: SupplierPaymentAvgAggregateOutputType | null
    _sum: SupplierPaymentSumAggregateOutputType | null
    _min: SupplierPaymentMinAggregateOutputType | null
    _max: SupplierPaymentMaxAggregateOutputType | null
  }

  export type SupplierPaymentAvgAggregateOutputType = {
    id: number | null
    supplierId: number | null
    amount: Decimal | null
    createdBy: number | null
  }

  export type SupplierPaymentSumAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    amount: Decimal | null
    createdBy: bigint | null
  }

  export type SupplierPaymentMinAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    paymentDate: Date | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    referenceNo: string | null
    remarks: string | null
    type: $Enums.SupplierPaymentType | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SupplierPaymentMaxAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    paymentDate: Date | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    referenceNo: string | null
    remarks: string | null
    type: $Enums.SupplierPaymentType | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SupplierPaymentCountAggregateOutputType = {
    id: number
    supplierId: number
    paymentDate: number
    amount: number
    paymentMode: number
    referenceNo: number
    remarks: number
    type: number
    isWhatsappMessageSent: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type SupplierPaymentAvgAggregateInputType = {
    id?: true
    supplierId?: true
    amount?: true
    createdBy?: true
  }

  export type SupplierPaymentSumAggregateInputType = {
    id?: true
    supplierId?: true
    amount?: true
    createdBy?: true
  }

  export type SupplierPaymentMinAggregateInputType = {
    id?: true
    supplierId?: true
    paymentDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    type?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SupplierPaymentMaxAggregateInputType = {
    id?: true
    supplierId?: true
    paymentDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    type?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SupplierPaymentCountAggregateInputType = {
    id?: true
    supplierId?: true
    paymentDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    type?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type SupplierPaymentAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SupplierPayment to aggregate.
     */
    where?: SupplierPaymentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SupplierPayments to fetch.
     */
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: SupplierPaymentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SupplierPayments 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` SupplierPayments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned SupplierPayments
    **/
    _count?: true | SupplierPaymentCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: SupplierPaymentAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: SupplierPaymentSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: SupplierPaymentMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: SupplierPaymentMaxAggregateInputType
  }

  export type GetSupplierPaymentAggregateType<T extends SupplierPaymentAggregateArgs> = {
        [P in keyof T & keyof AggregateSupplierPayment]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateSupplierPayment[P]>
      : GetScalarType<T[P], AggregateSupplierPayment[P]>
  }




  export type SupplierPaymentGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SupplierPaymentWhereInput
    orderBy?: SupplierPaymentOrderByWithAggregationInput | SupplierPaymentOrderByWithAggregationInput[]
    by: SupplierPaymentScalarFieldEnum[] | SupplierPaymentScalarFieldEnum
    having?: SupplierPaymentScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: SupplierPaymentCountAggregateInputType | true
    _avg?: SupplierPaymentAvgAggregateInputType
    _sum?: SupplierPaymentSumAggregateInputType
    _min?: SupplierPaymentMinAggregateInputType
    _max?: SupplierPaymentMaxAggregateInputType
  }

  export type SupplierPaymentGroupByOutputType = {
    id: bigint
    supplierId: bigint
    paymentDate: Date
    amount: Decimal
    paymentMode: $Enums.PaymentMode
    referenceNo: string | null
    remarks: string | null
    type: $Enums.SupplierPaymentType
    isWhatsappMessageSent: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: SupplierPaymentCountAggregateOutputType | null
    _avg: SupplierPaymentAvgAggregateOutputType | null
    _sum: SupplierPaymentSumAggregateOutputType | null
    _min: SupplierPaymentMinAggregateOutputType | null
    _max: SupplierPaymentMaxAggregateOutputType | null
  }

  type GetSupplierPaymentGroupByPayload<T extends SupplierPaymentGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<SupplierPaymentGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof SupplierPaymentGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], SupplierPaymentGroupByOutputType[P]>
            : GetScalarType<T[P], SupplierPaymentGroupByOutputType[P]>
        }
      >
    >


  export type SupplierPaymentSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    supplierId?: boolean
    paymentDate?: boolean
    amount?: boolean
    paymentMode?: boolean
    referenceNo?: boolean
    remarks?: boolean
    type?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    supplier?: boolean | SupplierDefaultArgs<ExtArgs>
    createdByUser?: boolean | SupplierPayment$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["supplierPayment"]>



  export type SupplierPaymentSelectScalar = {
    id?: boolean
    supplierId?: boolean
    paymentDate?: boolean
    amount?: boolean
    paymentMode?: boolean
    referenceNo?: boolean
    remarks?: boolean
    type?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type SupplierPaymentOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "supplierId" | "paymentDate" | "amount" | "paymentMode" | "referenceNo" | "remarks" | "type" | "isWhatsappMessageSent" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["supplierPayment"]>
  export type SupplierPaymentInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    supplier?: boolean | SupplierDefaultArgs<ExtArgs>
    createdByUser?: boolean | SupplierPayment$createdByUserArgs<ExtArgs>
  }

  export type $SupplierPaymentPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "SupplierPayment"
    objects: {
      supplier: Prisma.$SupplierPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      supplierId: bigint
      paymentDate: Date
      amount: Prisma.Decimal
      paymentMode: $Enums.PaymentMode
      referenceNo: string | null
      remarks: string | null
      type: $Enums.SupplierPaymentType
      isWhatsappMessageSent: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["supplierPayment"]>
    composites: {}
  }

  type SupplierPaymentGetPayload<S extends boolean | null | undefined | SupplierPaymentDefaultArgs> = $Result.GetResult<Prisma.$SupplierPaymentPayload, S>

  type SupplierPaymentCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<SupplierPaymentFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: SupplierPaymentCountAggregateInputType | true
    }

  export interface SupplierPaymentDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['SupplierPayment'], meta: { name: 'SupplierPayment' } }
    /**
     * Find zero or one SupplierPayment that matches the filter.
     * @param {SupplierPaymentFindUniqueArgs} args - Arguments to find a SupplierPayment
     * @example
     * // Get one SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends SupplierPaymentFindUniqueArgs>(args: SelectSubset<T, SupplierPaymentFindUniqueArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one SupplierPayment that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {SupplierPaymentFindUniqueOrThrowArgs} args - Arguments to find a SupplierPayment
     * @example
     * // Get one SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends SupplierPaymentFindUniqueOrThrowArgs>(args: SelectSubset<T, SupplierPaymentFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SupplierPayment 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 {SupplierPaymentFindFirstArgs} args - Arguments to find a SupplierPayment
     * @example
     * // Get one SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends SupplierPaymentFindFirstArgs>(args?: SelectSubset<T, SupplierPaymentFindFirstArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SupplierPayment 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 {SupplierPaymentFindFirstOrThrowArgs} args - Arguments to find a SupplierPayment
     * @example
     * // Get one SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends SupplierPaymentFindFirstOrThrowArgs>(args?: SelectSubset<T, SupplierPaymentFindFirstOrThrowArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more SupplierPayments 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 {SupplierPaymentFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all SupplierPayments
     * const supplierPayments = await prisma.supplierPayment.findMany()
     * 
     * // Get first 10 SupplierPayments
     * const supplierPayments = await prisma.supplierPayment.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const supplierPaymentWithIdOnly = await prisma.supplierPayment.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends SupplierPaymentFindManyArgs>(args?: SelectSubset<T, SupplierPaymentFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a SupplierPayment.
     * @param {SupplierPaymentCreateArgs} args - Arguments to create a SupplierPayment.
     * @example
     * // Create one SupplierPayment
     * const SupplierPayment = await prisma.supplierPayment.create({
     *   data: {
     *     // ... data to create a SupplierPayment
     *   }
     * })
     * 
     */
    create<T extends SupplierPaymentCreateArgs>(args: SelectSubset<T, SupplierPaymentCreateArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many SupplierPayments.
     * @param {SupplierPaymentCreateManyArgs} args - Arguments to create many SupplierPayments.
     * @example
     * // Create many SupplierPayments
     * const supplierPayment = await prisma.supplierPayment.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends SupplierPaymentCreateManyArgs>(args?: SelectSubset<T, SupplierPaymentCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a SupplierPayment.
     * @param {SupplierPaymentDeleteArgs} args - Arguments to delete one SupplierPayment.
     * @example
     * // Delete one SupplierPayment
     * const SupplierPayment = await prisma.supplierPayment.delete({
     *   where: {
     *     // ... filter to delete one SupplierPayment
     *   }
     * })
     * 
     */
    delete<T extends SupplierPaymentDeleteArgs>(args: SelectSubset<T, SupplierPaymentDeleteArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one SupplierPayment.
     * @param {SupplierPaymentUpdateArgs} args - Arguments to update one SupplierPayment.
     * @example
     * // Update one SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends SupplierPaymentUpdateArgs>(args: SelectSubset<T, SupplierPaymentUpdateArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more SupplierPayments.
     * @param {SupplierPaymentDeleteManyArgs} args - Arguments to filter SupplierPayments to delete.
     * @example
     * // Delete a few SupplierPayments
     * const { count } = await prisma.supplierPayment.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends SupplierPaymentDeleteManyArgs>(args?: SelectSubset<T, SupplierPaymentDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more SupplierPayments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierPaymentUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many SupplierPayments
     * const supplierPayment = await prisma.supplierPayment.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends SupplierPaymentUpdateManyArgs>(args: SelectSubset<T, SupplierPaymentUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one SupplierPayment.
     * @param {SupplierPaymentUpsertArgs} args - Arguments to update or create a SupplierPayment.
     * @example
     * // Update or create a SupplierPayment
     * const supplierPayment = await prisma.supplierPayment.upsert({
     *   create: {
     *     // ... data to create a SupplierPayment
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the SupplierPayment we want to update
     *   }
     * })
     */
    upsert<T extends SupplierPaymentUpsertArgs>(args: SelectSubset<T, SupplierPaymentUpsertArgs<ExtArgs>>): Prisma__SupplierPaymentClient<$Result.GetResult<Prisma.$SupplierPaymentPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of SupplierPayments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierPaymentCountArgs} args - Arguments to filter SupplierPayments to count.
     * @example
     * // Count the number of SupplierPayments
     * const count = await prisma.supplierPayment.count({
     *   where: {
     *     // ... the filter for the SupplierPayments we want to count
     *   }
     * })
    **/
    count<T extends SupplierPaymentCountArgs>(
      args?: Subset<T, SupplierPaymentCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], SupplierPaymentCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a SupplierPayment.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierPaymentAggregateArgs} 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 SupplierPaymentAggregateArgs>(args: Subset<T, SupplierPaymentAggregateArgs>): Prisma.PrismaPromise<GetSupplierPaymentAggregateType<T>>

    /**
     * Group by SupplierPayment.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SupplierPaymentGroupByArgs} 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 SupplierPaymentGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: SupplierPaymentGroupByArgs['orderBy'] }
        : { orderBy?: SupplierPaymentGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, SupplierPaymentGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSupplierPaymentGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the SupplierPayment model
   */
  readonly fields: SupplierPaymentFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for SupplierPayment.
   * 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__SupplierPaymentClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    supplier<T extends SupplierDefaultArgs<ExtArgs> = {}>(args?: Subset<T, SupplierDefaultArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends SupplierPayment$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, SupplierPayment$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the SupplierPayment model
   */
  interface SupplierPaymentFieldRefs {
    readonly id: FieldRef<"SupplierPayment", 'BigInt'>
    readonly supplierId: FieldRef<"SupplierPayment", 'BigInt'>
    readonly paymentDate: FieldRef<"SupplierPayment", 'DateTime'>
    readonly amount: FieldRef<"SupplierPayment", 'Decimal'>
    readonly paymentMode: FieldRef<"SupplierPayment", 'PaymentMode'>
    readonly referenceNo: FieldRef<"SupplierPayment", 'String'>
    readonly remarks: FieldRef<"SupplierPayment", 'String'>
    readonly type: FieldRef<"SupplierPayment", 'SupplierPaymentType'>
    readonly isWhatsappMessageSent: FieldRef<"SupplierPayment", 'Boolean'>
    readonly createdAt: FieldRef<"SupplierPayment", 'DateTime'>
    readonly updatedAt: FieldRef<"SupplierPayment", 'DateTime'>
    readonly deletedAt: FieldRef<"SupplierPayment", 'DateTime'>
    readonly createdBy: FieldRef<"SupplierPayment", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * SupplierPayment findUnique
   */
  export type SupplierPaymentFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter, which SupplierPayment to fetch.
     */
    where: SupplierPaymentWhereUniqueInput
  }

  /**
   * SupplierPayment findUniqueOrThrow
   */
  export type SupplierPaymentFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter, which SupplierPayment to fetch.
     */
    where: SupplierPaymentWhereUniqueInput
  }

  /**
   * SupplierPayment findFirst
   */
  export type SupplierPaymentFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter, which SupplierPayment to fetch.
     */
    where?: SupplierPaymentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SupplierPayments to fetch.
     */
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SupplierPayments.
     */
    cursor?: SupplierPaymentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SupplierPayments 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` SupplierPayments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SupplierPayments.
     */
    distinct?: SupplierPaymentScalarFieldEnum | SupplierPaymentScalarFieldEnum[]
  }

  /**
   * SupplierPayment findFirstOrThrow
   */
  export type SupplierPaymentFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter, which SupplierPayment to fetch.
     */
    where?: SupplierPaymentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SupplierPayments to fetch.
     */
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SupplierPayments.
     */
    cursor?: SupplierPaymentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SupplierPayments 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` SupplierPayments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SupplierPayments.
     */
    distinct?: SupplierPaymentScalarFieldEnum | SupplierPaymentScalarFieldEnum[]
  }

  /**
   * SupplierPayment findMany
   */
  export type SupplierPaymentFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter, which SupplierPayments to fetch.
     */
    where?: SupplierPaymentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SupplierPayments to fetch.
     */
    orderBy?: SupplierPaymentOrderByWithRelationInput | SupplierPaymentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing SupplierPayments.
     */
    cursor?: SupplierPaymentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SupplierPayments 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` SupplierPayments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SupplierPayments.
     */
    distinct?: SupplierPaymentScalarFieldEnum | SupplierPaymentScalarFieldEnum[]
  }

  /**
   * SupplierPayment create
   */
  export type SupplierPaymentCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * The data needed to create a SupplierPayment.
     */
    data: XOR<SupplierPaymentCreateInput, SupplierPaymentUncheckedCreateInput>
  }

  /**
   * SupplierPayment createMany
   */
  export type SupplierPaymentCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many SupplierPayments.
     */
    data: SupplierPaymentCreateManyInput | SupplierPaymentCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * SupplierPayment update
   */
  export type SupplierPaymentUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * The data needed to update a SupplierPayment.
     */
    data: XOR<SupplierPaymentUpdateInput, SupplierPaymentUncheckedUpdateInput>
    /**
     * Choose, which SupplierPayment to update.
     */
    where: SupplierPaymentWhereUniqueInput
  }

  /**
   * SupplierPayment updateMany
   */
  export type SupplierPaymentUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update SupplierPayments.
     */
    data: XOR<SupplierPaymentUpdateManyMutationInput, SupplierPaymentUncheckedUpdateManyInput>
    /**
     * Filter which SupplierPayments to update
     */
    where?: SupplierPaymentWhereInput
    /**
     * Limit how many SupplierPayments to update.
     */
    limit?: number
  }

  /**
   * SupplierPayment upsert
   */
  export type SupplierPaymentUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * The filter to search for the SupplierPayment to update in case it exists.
     */
    where: SupplierPaymentWhereUniqueInput
    /**
     * In case the SupplierPayment found by the `where` argument doesn't exist, create a new SupplierPayment with this data.
     */
    create: XOR<SupplierPaymentCreateInput, SupplierPaymentUncheckedCreateInput>
    /**
     * In case the SupplierPayment was found with the provided `where` argument, update it with this data.
     */
    update: XOR<SupplierPaymentUpdateInput, SupplierPaymentUncheckedUpdateInput>
  }

  /**
   * SupplierPayment delete
   */
  export type SupplierPaymentDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
    /**
     * Filter which SupplierPayment to delete.
     */
    where: SupplierPaymentWhereUniqueInput
  }

  /**
   * SupplierPayment deleteMany
   */
  export type SupplierPaymentDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SupplierPayments to delete
     */
    where?: SupplierPaymentWhereInput
    /**
     * Limit how many SupplierPayments to delete.
     */
    limit?: number
  }

  /**
   * SupplierPayment.createdByUser
   */
  export type SupplierPayment$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * SupplierPayment without action
   */
  export type SupplierPaymentDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SupplierPayment
     */
    select?: SupplierPaymentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SupplierPayment
     */
    omit?: SupplierPaymentOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierPaymentInclude<ExtArgs> | null
  }


  /**
   * Model Upi
   */

  export type AggregateUpi = {
    _count: UpiCountAggregateOutputType | null
    _avg: UpiAvgAggregateOutputType | null
    _sum: UpiSumAggregateOutputType | null
    _min: UpiMinAggregateOutputType | null
    _max: UpiMaxAggregateOutputType | null
  }

  export type UpiAvgAggregateOutputType = {
    id: number | null
    createdBy: number | null
  }

  export type UpiSumAggregateOutputType = {
    id: number | null
    createdBy: bigint | null
  }

  export type UpiMinAggregateOutputType = {
    id: number | null
    upiId: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type UpiMaxAggregateOutputType = {
    id: number | null
    upiId: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type UpiCountAggregateOutputType = {
    id: number
    upiId: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type UpiAvgAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type UpiSumAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type UpiMinAggregateInputType = {
    id?: true
    upiId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type UpiMaxAggregateInputType = {
    id?: true
    upiId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type UpiCountAggregateInputType = {
    id?: true
    upiId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type UpiAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Upi to aggregate.
     */
    where?: UpiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Upis to fetch.
     */
    orderBy?: UpiOrderByWithRelationInput | UpiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UpiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Upis 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` Upis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Upis
    **/
    _count?: true | UpiCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: UpiAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: UpiSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UpiMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UpiMaxAggregateInputType
  }

  export type GetUpiAggregateType<T extends UpiAggregateArgs> = {
        [P in keyof T & keyof AggregateUpi]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUpi[P]>
      : GetScalarType<T[P], AggregateUpi[P]>
  }




  export type UpiGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UpiWhereInput
    orderBy?: UpiOrderByWithAggregationInput | UpiOrderByWithAggregationInput[]
    by: UpiScalarFieldEnum[] | UpiScalarFieldEnum
    having?: UpiScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UpiCountAggregateInputType | true
    _avg?: UpiAvgAggregateInputType
    _sum?: UpiSumAggregateInputType
    _min?: UpiMinAggregateInputType
    _max?: UpiMaxAggregateInputType
  }

  export type UpiGroupByOutputType = {
    id: number
    upiId: string
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: UpiCountAggregateOutputType | null
    _avg: UpiAvgAggregateOutputType | null
    _sum: UpiSumAggregateOutputType | null
    _min: UpiMinAggregateOutputType | null
    _max: UpiMaxAggregateOutputType | null
  }

  type GetUpiGroupByPayload<T extends UpiGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UpiGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UpiGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UpiGroupByOutputType[P]>
            : GetScalarType<T[P], UpiGroupByOutputType[P]>
        }
      >
    >


  export type UpiSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    upiId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    createdByUser?: boolean | Upi$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["upi"]>



  export type UpiSelectScalar = {
    id?: boolean
    upiId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type UpiOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "upiId" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["upi"]>
  export type UpiInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    createdByUser?: boolean | Upi$createdByUserArgs<ExtArgs>
  }

  export type $UpiPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Upi"
    objects: {
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      upiId: string
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["upi"]>
    composites: {}
  }

  type UpiGetPayload<S extends boolean | null | undefined | UpiDefaultArgs> = $Result.GetResult<Prisma.$UpiPayload, S>

  type UpiCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UpiFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UpiCountAggregateInputType | true
    }

  export interface UpiDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Upi'], meta: { name: 'Upi' } }
    /**
     * Find zero or one Upi that matches the filter.
     * @param {UpiFindUniqueArgs} args - Arguments to find a Upi
     * @example
     * // Get one Upi
     * const upi = await prisma.upi.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UpiFindUniqueArgs>(args: SelectSubset<T, UpiFindUniqueArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Upi that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UpiFindUniqueOrThrowArgs} args - Arguments to find a Upi
     * @example
     * // Get one Upi
     * const upi = await prisma.upi.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UpiFindUniqueOrThrowArgs>(args: SelectSubset<T, UpiFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Upi 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 {UpiFindFirstArgs} args - Arguments to find a Upi
     * @example
     * // Get one Upi
     * const upi = await prisma.upi.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UpiFindFirstArgs>(args?: SelectSubset<T, UpiFindFirstArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Upi 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 {UpiFindFirstOrThrowArgs} args - Arguments to find a Upi
     * @example
     * // Get one Upi
     * const upi = await prisma.upi.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UpiFindFirstOrThrowArgs>(args?: SelectSubset<T, UpiFindFirstOrThrowArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Upis 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 {UpiFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Upis
     * const upis = await prisma.upi.findMany()
     * 
     * // Get first 10 Upis
     * const upis = await prisma.upi.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const upiWithIdOnly = await prisma.upi.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UpiFindManyArgs>(args?: SelectSubset<T, UpiFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Upi.
     * @param {UpiCreateArgs} args - Arguments to create a Upi.
     * @example
     * // Create one Upi
     * const Upi = await prisma.upi.create({
     *   data: {
     *     // ... data to create a Upi
     *   }
     * })
     * 
     */
    create<T extends UpiCreateArgs>(args: SelectSubset<T, UpiCreateArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Upis.
     * @param {UpiCreateManyArgs} args - Arguments to create many Upis.
     * @example
     * // Create many Upis
     * const upi = await prisma.upi.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UpiCreateManyArgs>(args?: SelectSubset<T, UpiCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Upi.
     * @param {UpiDeleteArgs} args - Arguments to delete one Upi.
     * @example
     * // Delete one Upi
     * const Upi = await prisma.upi.delete({
     *   where: {
     *     // ... filter to delete one Upi
     *   }
     * })
     * 
     */
    delete<T extends UpiDeleteArgs>(args: SelectSubset<T, UpiDeleteArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Upi.
     * @param {UpiUpdateArgs} args - Arguments to update one Upi.
     * @example
     * // Update one Upi
     * const upi = await prisma.upi.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UpiUpdateArgs>(args: SelectSubset<T, UpiUpdateArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Upis.
     * @param {UpiDeleteManyArgs} args - Arguments to filter Upis to delete.
     * @example
     * // Delete a few Upis
     * const { count } = await prisma.upi.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UpiDeleteManyArgs>(args?: SelectSubset<T, UpiDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Upis.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UpiUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Upis
     * const upi = await prisma.upi.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UpiUpdateManyArgs>(args: SelectSubset<T, UpiUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Upi.
     * @param {UpiUpsertArgs} args - Arguments to update or create a Upi.
     * @example
     * // Update or create a Upi
     * const upi = await prisma.upi.upsert({
     *   create: {
     *     // ... data to create a Upi
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Upi we want to update
     *   }
     * })
     */
    upsert<T extends UpiUpsertArgs>(args: SelectSubset<T, UpiUpsertArgs<ExtArgs>>): Prisma__UpiClient<$Result.GetResult<Prisma.$UpiPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Upis.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UpiCountArgs} args - Arguments to filter Upis to count.
     * @example
     * // Count the number of Upis
     * const count = await prisma.upi.count({
     *   where: {
     *     // ... the filter for the Upis we want to count
     *   }
     * })
    **/
    count<T extends UpiCountArgs>(
      args?: Subset<T, UpiCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UpiCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Upi.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UpiAggregateArgs} 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 UpiAggregateArgs>(args: Subset<T, UpiAggregateArgs>): Prisma.PrismaPromise<GetUpiAggregateType<T>>

    /**
     * Group by Upi.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UpiGroupByArgs} 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 UpiGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UpiGroupByArgs['orderBy'] }
        : { orderBy?: UpiGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UpiGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUpiGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Upi model
   */
  readonly fields: UpiFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Upi.
   * 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__UpiClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    createdByUser<T extends Upi$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Upi$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Upi model
   */
  interface UpiFieldRefs {
    readonly id: FieldRef<"Upi", 'Int'>
    readonly upiId: FieldRef<"Upi", 'String'>
    readonly createdAt: FieldRef<"Upi", 'DateTime'>
    readonly updatedAt: FieldRef<"Upi", 'DateTime'>
    readonly createdBy: FieldRef<"Upi", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Upi findUnique
   */
  export type UpiFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter, which Upi to fetch.
     */
    where: UpiWhereUniqueInput
  }

  /**
   * Upi findUniqueOrThrow
   */
  export type UpiFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter, which Upi to fetch.
     */
    where: UpiWhereUniqueInput
  }

  /**
   * Upi findFirst
   */
  export type UpiFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter, which Upi to fetch.
     */
    where?: UpiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Upis to fetch.
     */
    orderBy?: UpiOrderByWithRelationInput | UpiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Upis.
     */
    cursor?: UpiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Upis 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` Upis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Upis.
     */
    distinct?: UpiScalarFieldEnum | UpiScalarFieldEnum[]
  }

  /**
   * Upi findFirstOrThrow
   */
  export type UpiFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter, which Upi to fetch.
     */
    where?: UpiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Upis to fetch.
     */
    orderBy?: UpiOrderByWithRelationInput | UpiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Upis.
     */
    cursor?: UpiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Upis 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` Upis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Upis.
     */
    distinct?: UpiScalarFieldEnum | UpiScalarFieldEnum[]
  }

  /**
   * Upi findMany
   */
  export type UpiFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter, which Upis to fetch.
     */
    where?: UpiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Upis to fetch.
     */
    orderBy?: UpiOrderByWithRelationInput | UpiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Upis.
     */
    cursor?: UpiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Upis 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` Upis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Upis.
     */
    distinct?: UpiScalarFieldEnum | UpiScalarFieldEnum[]
  }

  /**
   * Upi create
   */
  export type UpiCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * The data needed to create a Upi.
     */
    data: XOR<UpiCreateInput, UpiUncheckedCreateInput>
  }

  /**
   * Upi createMany
   */
  export type UpiCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Upis.
     */
    data: UpiCreateManyInput | UpiCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Upi update
   */
  export type UpiUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * The data needed to update a Upi.
     */
    data: XOR<UpiUpdateInput, UpiUncheckedUpdateInput>
    /**
     * Choose, which Upi to update.
     */
    where: UpiWhereUniqueInput
  }

  /**
   * Upi updateMany
   */
  export type UpiUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Upis.
     */
    data: XOR<UpiUpdateManyMutationInput, UpiUncheckedUpdateManyInput>
    /**
     * Filter which Upis to update
     */
    where?: UpiWhereInput
    /**
     * Limit how many Upis to update.
     */
    limit?: number
  }

  /**
   * Upi upsert
   */
  export type UpiUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * The filter to search for the Upi to update in case it exists.
     */
    where: UpiWhereUniqueInput
    /**
     * In case the Upi found by the `where` argument doesn't exist, create a new Upi with this data.
     */
    create: XOR<UpiCreateInput, UpiUncheckedCreateInput>
    /**
     * In case the Upi was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UpiUpdateInput, UpiUncheckedUpdateInput>
  }

  /**
   * Upi delete
   */
  export type UpiDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
    /**
     * Filter which Upi to delete.
     */
    where: UpiWhereUniqueInput
  }

  /**
   * Upi deleteMany
   */
  export type UpiDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Upis to delete
     */
    where?: UpiWhereInput
    /**
     * Limit how many Upis to delete.
     */
    limit?: number
  }

  /**
   * Upi.createdByUser
   */
  export type Upi$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Upi without action
   */
  export type UpiDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Upi
     */
    select?: UpiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Upi
     */
    omit?: UpiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UpiInclude<ExtArgs> | null
  }


  /**
   * Model Purchase
   */

  export type AggregatePurchase = {
    _count: PurchaseCountAggregateOutputType | null
    _avg: PurchaseAvgAggregateOutputType | null
    _sum: PurchaseSumAggregateOutputType | null
    _min: PurchaseMinAggregateOutputType | null
    _max: PurchaseMaxAggregateOutputType | null
  }

  export type PurchaseAvgAggregateOutputType = {
    id: number | null
    supplierId: number | null
    vegetableId: number | null
    bags: Decimal | null
    weightPerBag: Decimal | null
    quantity: Decimal | null
    ratePerUnit: Decimal | null
    freight: Decimal | null
    extraFreight: Decimal | null
    associationFee: Decimal | null
    unloadingFee: Decimal | null
    miscellaneousFee: Decimal | null
    totalFreight: Decimal | null
    transportFee: Decimal | null
    loadingUnloadingFee: Decimal | null
    otherCharges: Decimal | null
    thaiyalCharges: Decimal | null
    extraCharges: Decimal | null
    goodsTotal: Decimal | null
    surchargeTotal: Decimal | null
    costPerUnit: Decimal | null
    grandTotal: Decimal | null
    advanceAmount: Decimal | null
    balanceAmount: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    createdBy: number | null
  }

  export type PurchaseSumAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    vegetableId: bigint | null
    bags: Decimal | null
    weightPerBag: Decimal | null
    quantity: Decimal | null
    ratePerUnit: Decimal | null
    freight: Decimal | null
    extraFreight: Decimal | null
    associationFee: Decimal | null
    unloadingFee: Decimal | null
    miscellaneousFee: Decimal | null
    totalFreight: Decimal | null
    transportFee: Decimal | null
    loadingUnloadingFee: Decimal | null
    otherCharges: Decimal | null
    thaiyalCharges: Decimal | null
    extraCharges: Decimal | null
    goodsTotal: Decimal | null
    surchargeTotal: Decimal | null
    costPerUnit: Decimal | null
    grandTotal: Decimal | null
    advanceAmount: Decimal | null
    balanceAmount: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    createdBy: bigint | null
  }

  export type PurchaseMinAggregateOutputType = {
    id: bigint | null
    purchaseDate: Date | null
    billNo: string | null
    supplierId: bigint | null
    cashSupplierName: string | null
    vegetableId: bigint | null
    lotNo: string | null
    purchaseType: $Enums.PurchaseType | null
    status: $Enums.PurchaseStatus | null
    unit: $Enums.PurchaseUnit | null
    rateType: $Enums.RateType | null
    bags: Decimal | null
    weightPerBag: Decimal | null
    quantity: Decimal | null
    ratePerUnit: Decimal | null
    freight: Decimal | null
    extraFreight: Decimal | null
    associationFee: Decimal | null
    unloadingFee: Decimal | null
    miscellaneousFee: Decimal | null
    totalFreight: Decimal | null
    transportFee: Decimal | null
    loadingUnloadingFee: Decimal | null
    otherCharges: Decimal | null
    thaiyalCharges: Decimal | null
    extraCharges: Decimal | null
    goodsTotal: Decimal | null
    surchargeTotal: Decimal | null
    costPerUnit: Decimal | null
    grandTotal: Decimal | null
    dateOfDespatch: Date | null
    arrivalDate: Date | null
    placeOfDespatch: string | null
    placeOfArrival: string | null
    truckNo: string | null
    agentName: string | null
    advanceAmount: Decimal | null
    balanceAmount: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    remarks: string | null
    closedAt: Date | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type PurchaseMaxAggregateOutputType = {
    id: bigint | null
    purchaseDate: Date | null
    billNo: string | null
    supplierId: bigint | null
    cashSupplierName: string | null
    vegetableId: bigint | null
    lotNo: string | null
    purchaseType: $Enums.PurchaseType | null
    status: $Enums.PurchaseStatus | null
    unit: $Enums.PurchaseUnit | null
    rateType: $Enums.RateType | null
    bags: Decimal | null
    weightPerBag: Decimal | null
    quantity: Decimal | null
    ratePerUnit: Decimal | null
    freight: Decimal | null
    extraFreight: Decimal | null
    associationFee: Decimal | null
    unloadingFee: Decimal | null
    miscellaneousFee: Decimal | null
    totalFreight: Decimal | null
    transportFee: Decimal | null
    loadingUnloadingFee: Decimal | null
    otherCharges: Decimal | null
    thaiyalCharges: Decimal | null
    extraCharges: Decimal | null
    goodsTotal: Decimal | null
    surchargeTotal: Decimal | null
    costPerUnit: Decimal | null
    grandTotal: Decimal | null
    dateOfDespatch: Date | null
    arrivalDate: Date | null
    placeOfDespatch: string | null
    placeOfArrival: string | null
    truckNo: string | null
    agentName: string | null
    advanceAmount: Decimal | null
    balanceAmount: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    remarks: string | null
    closedAt: Date | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type PurchaseCountAggregateOutputType = {
    id: number
    purchaseDate: number
    billNo: number
    supplierId: number
    cashSupplierName: number
    vegetableId: number
    lotNo: number
    purchaseType: number
    status: number
    unit: number
    rateType: number
    bags: number
    weightPerBag: number
    quantity: number
    ratePerUnit: number
    freight: number
    extraFreight: number
    associationFee: number
    unloadingFee: number
    miscellaneousFee: number
    totalFreight: number
    transportFee: number
    loadingUnloadingFee: number
    otherCharges: number
    thaiyalCharges: number
    extraCharges: number
    goodsTotal: number
    surchargeTotal: number
    costPerUnit: number
    grandTotal: number
    dateOfDespatch: number
    arrivalDate: number
    placeOfDespatch: number
    placeOfArrival: number
    truckNo: number
    agentName: number
    advanceAmount: number
    balanceAmount: number
    remainingQuantity: number
    remainingBags: number
    remarks: number
    closedAt: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type PurchaseAvgAggregateInputType = {
    id?: true
    supplierId?: true
    vegetableId?: true
    bags?: true
    weightPerBag?: true
    quantity?: true
    ratePerUnit?: true
    freight?: true
    extraFreight?: true
    associationFee?: true
    unloadingFee?: true
    miscellaneousFee?: true
    totalFreight?: true
    transportFee?: true
    loadingUnloadingFee?: true
    otherCharges?: true
    thaiyalCharges?: true
    extraCharges?: true
    goodsTotal?: true
    surchargeTotal?: true
    costPerUnit?: true
    grandTotal?: true
    advanceAmount?: true
    balanceAmount?: true
    remainingQuantity?: true
    remainingBags?: true
    createdBy?: true
  }

  export type PurchaseSumAggregateInputType = {
    id?: true
    supplierId?: true
    vegetableId?: true
    bags?: true
    weightPerBag?: true
    quantity?: true
    ratePerUnit?: true
    freight?: true
    extraFreight?: true
    associationFee?: true
    unloadingFee?: true
    miscellaneousFee?: true
    totalFreight?: true
    transportFee?: true
    loadingUnloadingFee?: true
    otherCharges?: true
    thaiyalCharges?: true
    extraCharges?: true
    goodsTotal?: true
    surchargeTotal?: true
    costPerUnit?: true
    grandTotal?: true
    advanceAmount?: true
    balanceAmount?: true
    remainingQuantity?: true
    remainingBags?: true
    createdBy?: true
  }

  export type PurchaseMinAggregateInputType = {
    id?: true
    purchaseDate?: true
    billNo?: true
    supplierId?: true
    cashSupplierName?: true
    vegetableId?: true
    lotNo?: true
    purchaseType?: true
    status?: true
    unit?: true
    rateType?: true
    bags?: true
    weightPerBag?: true
    quantity?: true
    ratePerUnit?: true
    freight?: true
    extraFreight?: true
    associationFee?: true
    unloadingFee?: true
    miscellaneousFee?: true
    totalFreight?: true
    transportFee?: true
    loadingUnloadingFee?: true
    otherCharges?: true
    thaiyalCharges?: true
    extraCharges?: true
    goodsTotal?: true
    surchargeTotal?: true
    costPerUnit?: true
    grandTotal?: true
    dateOfDespatch?: true
    arrivalDate?: true
    placeOfDespatch?: true
    placeOfArrival?: true
    truckNo?: true
    agentName?: true
    advanceAmount?: true
    balanceAmount?: true
    remainingQuantity?: true
    remainingBags?: true
    remarks?: true
    closedAt?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type PurchaseMaxAggregateInputType = {
    id?: true
    purchaseDate?: true
    billNo?: true
    supplierId?: true
    cashSupplierName?: true
    vegetableId?: true
    lotNo?: true
    purchaseType?: true
    status?: true
    unit?: true
    rateType?: true
    bags?: true
    weightPerBag?: true
    quantity?: true
    ratePerUnit?: true
    freight?: true
    extraFreight?: true
    associationFee?: true
    unloadingFee?: true
    miscellaneousFee?: true
    totalFreight?: true
    transportFee?: true
    loadingUnloadingFee?: true
    otherCharges?: true
    thaiyalCharges?: true
    extraCharges?: true
    goodsTotal?: true
    surchargeTotal?: true
    costPerUnit?: true
    grandTotal?: true
    dateOfDespatch?: true
    arrivalDate?: true
    placeOfDespatch?: true
    placeOfArrival?: true
    truckNo?: true
    agentName?: true
    advanceAmount?: true
    balanceAmount?: true
    remainingQuantity?: true
    remainingBags?: true
    remarks?: true
    closedAt?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type PurchaseCountAggregateInputType = {
    id?: true
    purchaseDate?: true
    billNo?: true
    supplierId?: true
    cashSupplierName?: true
    vegetableId?: true
    lotNo?: true
    purchaseType?: true
    status?: true
    unit?: true
    rateType?: true
    bags?: true
    weightPerBag?: true
    quantity?: true
    ratePerUnit?: true
    freight?: true
    extraFreight?: true
    associationFee?: true
    unloadingFee?: true
    miscellaneousFee?: true
    totalFreight?: true
    transportFee?: true
    loadingUnloadingFee?: true
    otherCharges?: true
    thaiyalCharges?: true
    extraCharges?: true
    goodsTotal?: true
    surchargeTotal?: true
    costPerUnit?: true
    grandTotal?: true
    dateOfDespatch?: true
    arrivalDate?: true
    placeOfDespatch?: true
    placeOfArrival?: true
    truckNo?: true
    agentName?: true
    advanceAmount?: true
    balanceAmount?: true
    remainingQuantity?: true
    remainingBags?: true
    remarks?: true
    closedAt?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type PurchaseAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Purchase to aggregate.
     */
    where?: PurchaseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Purchases to fetch.
     */
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: PurchaseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Purchases 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` Purchases.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Purchases
    **/
    _count?: true | PurchaseCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: PurchaseAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: PurchaseSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: PurchaseMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: PurchaseMaxAggregateInputType
  }

  export type GetPurchaseAggregateType<T extends PurchaseAggregateArgs> = {
        [P in keyof T & keyof AggregatePurchase]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregatePurchase[P]>
      : GetScalarType<T[P], AggregatePurchase[P]>
  }




  export type PurchaseGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseWhereInput
    orderBy?: PurchaseOrderByWithAggregationInput | PurchaseOrderByWithAggregationInput[]
    by: PurchaseScalarFieldEnum[] | PurchaseScalarFieldEnum
    having?: PurchaseScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: PurchaseCountAggregateInputType | true
    _avg?: PurchaseAvgAggregateInputType
    _sum?: PurchaseSumAggregateInputType
    _min?: PurchaseMinAggregateInputType
    _max?: PurchaseMaxAggregateInputType
  }

  export type PurchaseGroupByOutputType = {
    id: bigint
    purchaseDate: Date
    billNo: string | null
    supplierId: bigint | null
    cashSupplierName: string | null
    vegetableId: bigint
    lotNo: string
    purchaseType: $Enums.PurchaseType
    status: $Enums.PurchaseStatus
    unit: $Enums.PurchaseUnit
    rateType: $Enums.RateType
    bags: Decimal
    weightPerBag: Decimal | null
    quantity: Decimal
    ratePerUnit: Decimal
    freight: Decimal
    extraFreight: Decimal
    associationFee: Decimal
    unloadingFee: Decimal
    miscellaneousFee: Decimal
    totalFreight: Decimal
    transportFee: Decimal
    loadingUnloadingFee: Decimal
    otherCharges: Decimal
    thaiyalCharges: Decimal
    extraCharges: Decimal
    goodsTotal: Decimal
    surchargeTotal: Decimal
    costPerUnit: Decimal
    grandTotal: Decimal
    dateOfDespatch: Date | null
    arrivalDate: Date | null
    placeOfDespatch: string | null
    placeOfArrival: string | null
    truckNo: string | null
    agentName: string | null
    advanceAmount: Decimal
    balanceAmount: Decimal
    remainingQuantity: Decimal
    remainingBags: Decimal
    remarks: string | null
    closedAt: Date | null
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: PurchaseCountAggregateOutputType | null
    _avg: PurchaseAvgAggregateOutputType | null
    _sum: PurchaseSumAggregateOutputType | null
    _min: PurchaseMinAggregateOutputType | null
    _max: PurchaseMaxAggregateOutputType | null
  }

  type GetPurchaseGroupByPayload<T extends PurchaseGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<PurchaseGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof PurchaseGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], PurchaseGroupByOutputType[P]>
            : GetScalarType<T[P], PurchaseGroupByOutputType[P]>
        }
      >
    >


  export type PurchaseSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseDate?: boolean
    billNo?: boolean
    supplierId?: boolean
    cashSupplierName?: boolean
    vegetableId?: boolean
    lotNo?: boolean
    purchaseType?: boolean
    status?: boolean
    unit?: boolean
    rateType?: boolean
    bags?: boolean
    weightPerBag?: boolean
    quantity?: boolean
    ratePerUnit?: boolean
    freight?: boolean
    extraFreight?: boolean
    associationFee?: boolean
    unloadingFee?: boolean
    miscellaneousFee?: boolean
    totalFreight?: boolean
    transportFee?: boolean
    loadingUnloadingFee?: boolean
    otherCharges?: boolean
    thaiyalCharges?: boolean
    extraCharges?: boolean
    goodsTotal?: boolean
    surchargeTotal?: boolean
    costPerUnit?: boolean
    grandTotal?: boolean
    dateOfDespatch?: boolean
    arrivalDate?: boolean
    placeOfDespatch?: boolean
    placeOfArrival?: boolean
    truckNo?: boolean
    agentName?: boolean
    advanceAmount?: boolean
    balanceAmount?: boolean
    remainingQuantity?: boolean
    remainingBags?: boolean
    remarks?: boolean
    closedAt?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    supplier?: boolean | Purchase$supplierArgs<ExtArgs>
    vegetable?: boolean | VegetableDefaultArgs<ExtArgs>
    arrivalSettlement?: boolean | Purchase$arrivalSettlementArgs<ExtArgs>
    arrivalCustomPatti?: boolean | Purchase$arrivalCustomPattiArgs<ExtArgs>
    saleItems?: boolean | Purchase$saleItemsArgs<ExtArgs>
    stockSpoilages?: boolean | Purchase$stockSpoilagesArgs<ExtArgs>
    saleReturns?: boolean | Purchase$saleReturnsArgs<ExtArgs>
    purchaseReturns?: boolean | Purchase$purchaseReturnsArgs<ExtArgs>
    retailStocks?: boolean | Purchase$retailStocksArgs<ExtArgs>
    expenses?: boolean | Purchase$expensesArgs<ExtArgs>
    createdByUser?: boolean | Purchase$createdByUserArgs<ExtArgs>
    _count?: boolean | PurchaseCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["purchase"]>



  export type PurchaseSelectScalar = {
    id?: boolean
    purchaseDate?: boolean
    billNo?: boolean
    supplierId?: boolean
    cashSupplierName?: boolean
    vegetableId?: boolean
    lotNo?: boolean
    purchaseType?: boolean
    status?: boolean
    unit?: boolean
    rateType?: boolean
    bags?: boolean
    weightPerBag?: boolean
    quantity?: boolean
    ratePerUnit?: boolean
    freight?: boolean
    extraFreight?: boolean
    associationFee?: boolean
    unloadingFee?: boolean
    miscellaneousFee?: boolean
    totalFreight?: boolean
    transportFee?: boolean
    loadingUnloadingFee?: boolean
    otherCharges?: boolean
    thaiyalCharges?: boolean
    extraCharges?: boolean
    goodsTotal?: boolean
    surchargeTotal?: boolean
    costPerUnit?: boolean
    grandTotal?: boolean
    dateOfDespatch?: boolean
    arrivalDate?: boolean
    placeOfDespatch?: boolean
    placeOfArrival?: boolean
    truckNo?: boolean
    agentName?: boolean
    advanceAmount?: boolean
    balanceAmount?: boolean
    remainingQuantity?: boolean
    remainingBags?: boolean
    remarks?: boolean
    closedAt?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type PurchaseOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseDate" | "billNo" | "supplierId" | "cashSupplierName" | "vegetableId" | "lotNo" | "purchaseType" | "status" | "unit" | "rateType" | "bags" | "weightPerBag" | "quantity" | "ratePerUnit" | "freight" | "extraFreight" | "associationFee" | "unloadingFee" | "miscellaneousFee" | "totalFreight" | "transportFee" | "loadingUnloadingFee" | "otherCharges" | "thaiyalCharges" | "extraCharges" | "goodsTotal" | "surchargeTotal" | "costPerUnit" | "grandTotal" | "dateOfDespatch" | "arrivalDate" | "placeOfDespatch" | "placeOfArrival" | "truckNo" | "agentName" | "advanceAmount" | "balanceAmount" | "remainingQuantity" | "remainingBags" | "remarks" | "closedAt" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["purchase"]>
  export type PurchaseInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    supplier?: boolean | Purchase$supplierArgs<ExtArgs>
    vegetable?: boolean | VegetableDefaultArgs<ExtArgs>
    arrivalSettlement?: boolean | Purchase$arrivalSettlementArgs<ExtArgs>
    arrivalCustomPatti?: boolean | Purchase$arrivalCustomPattiArgs<ExtArgs>
    saleItems?: boolean | Purchase$saleItemsArgs<ExtArgs>
    stockSpoilages?: boolean | Purchase$stockSpoilagesArgs<ExtArgs>
    saleReturns?: boolean | Purchase$saleReturnsArgs<ExtArgs>
    purchaseReturns?: boolean | Purchase$purchaseReturnsArgs<ExtArgs>
    retailStocks?: boolean | Purchase$retailStocksArgs<ExtArgs>
    expenses?: boolean | Purchase$expensesArgs<ExtArgs>
    createdByUser?: boolean | Purchase$createdByUserArgs<ExtArgs>
    _count?: boolean | PurchaseCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $PurchasePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Purchase"
    objects: {
      supplier: Prisma.$SupplierPayload<ExtArgs> | null
      vegetable: Prisma.$VegetablePayload<ExtArgs>
      arrivalSettlement: Prisma.$ArrivalSettlementPayload<ExtArgs> | null
      arrivalCustomPatti: Prisma.$ArrivalCustomPattiPayload<ExtArgs> | null
      saleItems: Prisma.$SaleItemPayload<ExtArgs>[]
      stockSpoilages: Prisma.$StockSpoilagePayload<ExtArgs>[]
      saleReturns: Prisma.$SaleReturnPayload<ExtArgs>[]
      purchaseReturns: Prisma.$PurchaseReturnPayload<ExtArgs>[]
      retailStocks: Prisma.$RetailStockPayload<ExtArgs>[]
      expenses: Prisma.$ExpensePayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseDate: Date
      billNo: string | null
      supplierId: bigint | null
      cashSupplierName: string | null
      vegetableId: bigint
      lotNo: string
      purchaseType: $Enums.PurchaseType
      status: $Enums.PurchaseStatus
      unit: $Enums.PurchaseUnit
      rateType: $Enums.RateType
      bags: Prisma.Decimal
      weightPerBag: Prisma.Decimal | null
      quantity: Prisma.Decimal
      ratePerUnit: Prisma.Decimal
      freight: Prisma.Decimal
      extraFreight: Prisma.Decimal
      associationFee: Prisma.Decimal
      unloadingFee: Prisma.Decimal
      miscellaneousFee: Prisma.Decimal
      totalFreight: Prisma.Decimal
      transportFee: Prisma.Decimal
      loadingUnloadingFee: Prisma.Decimal
      otherCharges: Prisma.Decimal
      thaiyalCharges: Prisma.Decimal
      extraCharges: Prisma.Decimal
      goodsTotal: Prisma.Decimal
      surchargeTotal: Prisma.Decimal
      costPerUnit: Prisma.Decimal
      grandTotal: Prisma.Decimal
      dateOfDespatch: Date | null
      arrivalDate: Date | null
      placeOfDespatch: string | null
      placeOfArrival: string | null
      truckNo: string | null
      agentName: string | null
      advanceAmount: Prisma.Decimal
      balanceAmount: Prisma.Decimal
      remainingQuantity: Prisma.Decimal
      remainingBags: Prisma.Decimal
      remarks: string | null
      closedAt: Date | null
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["purchase"]>
    composites: {}
  }

  type PurchaseGetPayload<S extends boolean | null | undefined | PurchaseDefaultArgs> = $Result.GetResult<Prisma.$PurchasePayload, S>

  type PurchaseCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<PurchaseFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: PurchaseCountAggregateInputType | true
    }

  export interface PurchaseDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Purchase'], meta: { name: 'Purchase' } }
    /**
     * Find zero or one Purchase that matches the filter.
     * @param {PurchaseFindUniqueArgs} args - Arguments to find a Purchase
     * @example
     * // Get one Purchase
     * const purchase = await prisma.purchase.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends PurchaseFindUniqueArgs>(args: SelectSubset<T, PurchaseFindUniqueArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Purchase that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {PurchaseFindUniqueOrThrowArgs} args - Arguments to find a Purchase
     * @example
     * // Get one Purchase
     * const purchase = await prisma.purchase.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends PurchaseFindUniqueOrThrowArgs>(args: SelectSubset<T, PurchaseFindUniqueOrThrowArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Purchase 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 {PurchaseFindFirstArgs} args - Arguments to find a Purchase
     * @example
     * // Get one Purchase
     * const purchase = await prisma.purchase.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends PurchaseFindFirstArgs>(args?: SelectSubset<T, PurchaseFindFirstArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Purchase 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 {PurchaseFindFirstOrThrowArgs} args - Arguments to find a Purchase
     * @example
     * // Get one Purchase
     * const purchase = await prisma.purchase.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends PurchaseFindFirstOrThrowArgs>(args?: SelectSubset<T, PurchaseFindFirstOrThrowArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Purchases 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 {PurchaseFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Purchases
     * const purchases = await prisma.purchase.findMany()
     * 
     * // Get first 10 Purchases
     * const purchases = await prisma.purchase.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const purchaseWithIdOnly = await prisma.purchase.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends PurchaseFindManyArgs>(args?: SelectSubset<T, PurchaseFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Purchase.
     * @param {PurchaseCreateArgs} args - Arguments to create a Purchase.
     * @example
     * // Create one Purchase
     * const Purchase = await prisma.purchase.create({
     *   data: {
     *     // ... data to create a Purchase
     *   }
     * })
     * 
     */
    create<T extends PurchaseCreateArgs>(args: SelectSubset<T, PurchaseCreateArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Purchases.
     * @param {PurchaseCreateManyArgs} args - Arguments to create many Purchases.
     * @example
     * // Create many Purchases
     * const purchase = await prisma.purchase.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends PurchaseCreateManyArgs>(args?: SelectSubset<T, PurchaseCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Purchase.
     * @param {PurchaseDeleteArgs} args - Arguments to delete one Purchase.
     * @example
     * // Delete one Purchase
     * const Purchase = await prisma.purchase.delete({
     *   where: {
     *     // ... filter to delete one Purchase
     *   }
     * })
     * 
     */
    delete<T extends PurchaseDeleteArgs>(args: SelectSubset<T, PurchaseDeleteArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Purchase.
     * @param {PurchaseUpdateArgs} args - Arguments to update one Purchase.
     * @example
     * // Update one Purchase
     * const purchase = await prisma.purchase.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends PurchaseUpdateArgs>(args: SelectSubset<T, PurchaseUpdateArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Purchases.
     * @param {PurchaseDeleteManyArgs} args - Arguments to filter Purchases to delete.
     * @example
     * // Delete a few Purchases
     * const { count } = await prisma.purchase.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends PurchaseDeleteManyArgs>(args?: SelectSubset<T, PurchaseDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Purchases.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Purchases
     * const purchase = await prisma.purchase.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends PurchaseUpdateManyArgs>(args: SelectSubset<T, PurchaseUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Purchase.
     * @param {PurchaseUpsertArgs} args - Arguments to update or create a Purchase.
     * @example
     * // Update or create a Purchase
     * const purchase = await prisma.purchase.upsert({
     *   create: {
     *     // ... data to create a Purchase
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Purchase we want to update
     *   }
     * })
     */
    upsert<T extends PurchaseUpsertArgs>(args: SelectSubset<T, PurchaseUpsertArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Purchases.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseCountArgs} args - Arguments to filter Purchases to count.
     * @example
     * // Count the number of Purchases
     * const count = await prisma.purchase.count({
     *   where: {
     *     // ... the filter for the Purchases we want to count
     *   }
     * })
    **/
    count<T extends PurchaseCountArgs>(
      args?: Subset<T, PurchaseCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], PurchaseCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Purchase.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseAggregateArgs} 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 PurchaseAggregateArgs>(args: Subset<T, PurchaseAggregateArgs>): Prisma.PrismaPromise<GetPurchaseAggregateType<T>>

    /**
     * Group by Purchase.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseGroupByArgs} 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 PurchaseGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: PurchaseGroupByArgs['orderBy'] }
        : { orderBy?: PurchaseGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, PurchaseGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPurchaseGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Purchase model
   */
  readonly fields: PurchaseFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Purchase.
   * 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__PurchaseClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    supplier<T extends Purchase$supplierArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$supplierArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    vegetable<T extends VegetableDefaultArgs<ExtArgs> = {}>(args?: Subset<T, VegetableDefaultArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    arrivalSettlement<T extends Purchase$arrivalSettlementArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$arrivalSettlementArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    arrivalCustomPatti<T extends Purchase$arrivalCustomPattiArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$arrivalCustomPattiArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    saleItems<T extends Purchase$saleItemsArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$saleItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    stockSpoilages<T extends Purchase$stockSpoilagesArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$stockSpoilagesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    saleReturns<T extends Purchase$saleReturnsArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$saleReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    purchaseReturns<T extends Purchase$purchaseReturnsArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$purchaseReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    retailStocks<T extends Purchase$retailStocksArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$retailStocksArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    expenses<T extends Purchase$expensesArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$expensesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Purchase$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Purchase$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Purchase model
   */
  interface PurchaseFieldRefs {
    readonly id: FieldRef<"Purchase", 'BigInt'>
    readonly purchaseDate: FieldRef<"Purchase", 'DateTime'>
    readonly billNo: FieldRef<"Purchase", 'String'>
    readonly supplierId: FieldRef<"Purchase", 'BigInt'>
    readonly cashSupplierName: FieldRef<"Purchase", 'String'>
    readonly vegetableId: FieldRef<"Purchase", 'BigInt'>
    readonly lotNo: FieldRef<"Purchase", 'String'>
    readonly purchaseType: FieldRef<"Purchase", 'PurchaseType'>
    readonly status: FieldRef<"Purchase", 'PurchaseStatus'>
    readonly unit: FieldRef<"Purchase", 'PurchaseUnit'>
    readonly rateType: FieldRef<"Purchase", 'RateType'>
    readonly bags: FieldRef<"Purchase", 'Decimal'>
    readonly weightPerBag: FieldRef<"Purchase", 'Decimal'>
    readonly quantity: FieldRef<"Purchase", 'Decimal'>
    readonly ratePerUnit: FieldRef<"Purchase", 'Decimal'>
    readonly freight: FieldRef<"Purchase", 'Decimal'>
    readonly extraFreight: FieldRef<"Purchase", 'Decimal'>
    readonly associationFee: FieldRef<"Purchase", 'Decimal'>
    readonly unloadingFee: FieldRef<"Purchase", 'Decimal'>
    readonly miscellaneousFee: FieldRef<"Purchase", 'Decimal'>
    readonly totalFreight: FieldRef<"Purchase", 'Decimal'>
    readonly transportFee: FieldRef<"Purchase", 'Decimal'>
    readonly loadingUnloadingFee: FieldRef<"Purchase", 'Decimal'>
    readonly otherCharges: FieldRef<"Purchase", 'Decimal'>
    readonly thaiyalCharges: FieldRef<"Purchase", 'Decimal'>
    readonly extraCharges: FieldRef<"Purchase", 'Decimal'>
    readonly goodsTotal: FieldRef<"Purchase", 'Decimal'>
    readonly surchargeTotal: FieldRef<"Purchase", 'Decimal'>
    readonly costPerUnit: FieldRef<"Purchase", 'Decimal'>
    readonly grandTotal: FieldRef<"Purchase", 'Decimal'>
    readonly dateOfDespatch: FieldRef<"Purchase", 'DateTime'>
    readonly arrivalDate: FieldRef<"Purchase", 'DateTime'>
    readonly placeOfDespatch: FieldRef<"Purchase", 'String'>
    readonly placeOfArrival: FieldRef<"Purchase", 'String'>
    readonly truckNo: FieldRef<"Purchase", 'String'>
    readonly agentName: FieldRef<"Purchase", 'String'>
    readonly advanceAmount: FieldRef<"Purchase", 'Decimal'>
    readonly balanceAmount: FieldRef<"Purchase", 'Decimal'>
    readonly remainingQuantity: FieldRef<"Purchase", 'Decimal'>
    readonly remainingBags: FieldRef<"Purchase", 'Decimal'>
    readonly remarks: FieldRef<"Purchase", 'String'>
    readonly closedAt: FieldRef<"Purchase", 'DateTime'>
    readonly createdAt: FieldRef<"Purchase", 'DateTime'>
    readonly updatedAt: FieldRef<"Purchase", 'DateTime'>
    readonly deletedAt: FieldRef<"Purchase", 'DateTime'>
    readonly createdBy: FieldRef<"Purchase", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Purchase findUnique
   */
  export type PurchaseFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter, which Purchase to fetch.
     */
    where: PurchaseWhereUniqueInput
  }

  /**
   * Purchase findUniqueOrThrow
   */
  export type PurchaseFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter, which Purchase to fetch.
     */
    where: PurchaseWhereUniqueInput
  }

  /**
   * Purchase findFirst
   */
  export type PurchaseFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter, which Purchase to fetch.
     */
    where?: PurchaseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Purchases to fetch.
     */
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Purchases.
     */
    cursor?: PurchaseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Purchases 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` Purchases.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Purchases.
     */
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * Purchase findFirstOrThrow
   */
  export type PurchaseFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter, which Purchase to fetch.
     */
    where?: PurchaseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Purchases to fetch.
     */
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Purchases.
     */
    cursor?: PurchaseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Purchases 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` Purchases.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Purchases.
     */
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * Purchase findMany
   */
  export type PurchaseFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter, which Purchases to fetch.
     */
    where?: PurchaseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Purchases to fetch.
     */
    orderBy?: PurchaseOrderByWithRelationInput | PurchaseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Purchases.
     */
    cursor?: PurchaseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Purchases 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` Purchases.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Purchases.
     */
    distinct?: PurchaseScalarFieldEnum | PurchaseScalarFieldEnum[]
  }

  /**
   * Purchase create
   */
  export type PurchaseCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * The data needed to create a Purchase.
     */
    data: XOR<PurchaseCreateInput, PurchaseUncheckedCreateInput>
  }

  /**
   * Purchase createMany
   */
  export type PurchaseCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Purchases.
     */
    data: PurchaseCreateManyInput | PurchaseCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Purchase update
   */
  export type PurchaseUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * The data needed to update a Purchase.
     */
    data: XOR<PurchaseUpdateInput, PurchaseUncheckedUpdateInput>
    /**
     * Choose, which Purchase to update.
     */
    where: PurchaseWhereUniqueInput
  }

  /**
   * Purchase updateMany
   */
  export type PurchaseUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Purchases.
     */
    data: XOR<PurchaseUpdateManyMutationInput, PurchaseUncheckedUpdateManyInput>
    /**
     * Filter which Purchases to update
     */
    where?: PurchaseWhereInput
    /**
     * Limit how many Purchases to update.
     */
    limit?: number
  }

  /**
   * Purchase upsert
   */
  export type PurchaseUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * The filter to search for the Purchase to update in case it exists.
     */
    where: PurchaseWhereUniqueInput
    /**
     * In case the Purchase found by the `where` argument doesn't exist, create a new Purchase with this data.
     */
    create: XOR<PurchaseCreateInput, PurchaseUncheckedCreateInput>
    /**
     * In case the Purchase was found with the provided `where` argument, update it with this data.
     */
    update: XOR<PurchaseUpdateInput, PurchaseUncheckedUpdateInput>
  }

  /**
   * Purchase delete
   */
  export type PurchaseDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    /**
     * Filter which Purchase to delete.
     */
    where: PurchaseWhereUniqueInput
  }

  /**
   * Purchase deleteMany
   */
  export type PurchaseDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Purchases to delete
     */
    where?: PurchaseWhereInput
    /**
     * Limit how many Purchases to delete.
     */
    limit?: number
  }

  /**
   * Purchase.supplier
   */
  export type Purchase$supplierArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Supplier
     */
    select?: SupplierSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Supplier
     */
    omit?: SupplierOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SupplierInclude<ExtArgs> | null
    where?: SupplierWhereInput
  }

  /**
   * Purchase.arrivalSettlement
   */
  export type Purchase$arrivalSettlementArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    where?: ArrivalSettlementWhereInput
  }

  /**
   * Purchase.arrivalCustomPatti
   */
  export type Purchase$arrivalCustomPattiArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    where?: ArrivalCustomPattiWhereInput
  }

  /**
   * Purchase.saleItems
   */
  export type Purchase$saleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    where?: SaleItemWhereInput
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    cursor?: SaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * Purchase.stockSpoilages
   */
  export type Purchase$stockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    where?: StockSpoilageWhereInput
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    cursor?: StockSpoilageWhereUniqueInput
    take?: number
    skip?: number
    distinct?: StockSpoilageScalarFieldEnum | StockSpoilageScalarFieldEnum[]
  }

  /**
   * Purchase.saleReturns
   */
  export type Purchase$saleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    where?: SaleReturnWhereInput
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    cursor?: SaleReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * Purchase.purchaseReturns
   */
  export type Purchase$purchaseReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    where?: PurchaseReturnWhereInput
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    cursor?: PurchaseReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: PurchaseReturnScalarFieldEnum | PurchaseReturnScalarFieldEnum[]
  }

  /**
   * Purchase.retailStocks
   */
  export type Purchase$retailStocksArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    where?: RetailStockWhereInput
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    cursor?: RetailStockWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockScalarFieldEnum | RetailStockScalarFieldEnum[]
  }

  /**
   * Purchase.expenses
   */
  export type Purchase$expensesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    where?: ExpenseWhereInput
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    cursor?: ExpenseWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ExpenseScalarFieldEnum | ExpenseScalarFieldEnum[]
  }

  /**
   * Purchase.createdByUser
   */
  export type Purchase$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Purchase without action
   */
  export type PurchaseDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
  }


  /**
   * Model Shop
   */

  export type AggregateShop = {
    _count: ShopCountAggregateOutputType | null
    _avg: ShopAvgAggregateOutputType | null
    _sum: ShopSumAggregateOutputType | null
    _min: ShopMinAggregateOutputType | null
    _max: ShopMaxAggregateOutputType | null
  }

  export type ShopAvgAggregateOutputType = {
    id: number | null
    createdBy: number | null
  }

  export type ShopSumAggregateOutputType = {
    id: number | null
    createdBy: bigint | null
  }

  export type ShopMinAggregateOutputType = {
    id: number | null
    shopName: string | null
    shortName: string | null
    address: string | null
    mobile: string | null
    mobile2: string | null
    mapUrl: string | null
    godName1: string | null
    godName2: string | null
    godName3: string | null
    logo: string | null
    godImage1: string | null
    godImage2: string | null
    authorizedSign: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ShopMaxAggregateOutputType = {
    id: number | null
    shopName: string | null
    shortName: string | null
    address: string | null
    mobile: string | null
    mobile2: string | null
    mapUrl: string | null
    godName1: string | null
    godName2: string | null
    godName3: string | null
    logo: string | null
    godImage1: string | null
    godImage2: string | null
    authorizedSign: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ShopCountAggregateOutputType = {
    id: number
    shopName: number
    shortName: number
    address: number
    mobile: number
    mobile2: number
    mapUrl: number
    godName1: number
    godName2: number
    godName3: number
    logo: number
    godImage1: number
    godImage2: number
    authorizedSign: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type ShopAvgAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type ShopSumAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type ShopMinAggregateInputType = {
    id?: true
    shopName?: true
    shortName?: true
    address?: true
    mobile?: true
    mobile2?: true
    mapUrl?: true
    godName1?: true
    godName2?: true
    godName3?: true
    logo?: true
    godImage1?: true
    godImage2?: true
    authorizedSign?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ShopMaxAggregateInputType = {
    id?: true
    shopName?: true
    shortName?: true
    address?: true
    mobile?: true
    mobile2?: true
    mapUrl?: true
    godName1?: true
    godName2?: true
    godName3?: true
    logo?: true
    godImage1?: true
    godImage2?: true
    authorizedSign?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ShopCountAggregateInputType = {
    id?: true
    shopName?: true
    shortName?: true
    address?: true
    mobile?: true
    mobile2?: true
    mapUrl?: true
    godName1?: true
    godName2?: true
    godName3?: true
    logo?: true
    godImage1?: true
    godImage2?: true
    authorizedSign?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type ShopAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Shop to aggregate.
     */
    where?: ShopWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Shops to fetch.
     */
    orderBy?: ShopOrderByWithRelationInput | ShopOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ShopWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Shops 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` Shops.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Shops
    **/
    _count?: true | ShopCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ShopAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ShopSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ShopMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ShopMaxAggregateInputType
  }

  export type GetShopAggregateType<T extends ShopAggregateArgs> = {
        [P in keyof T & keyof AggregateShop]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateShop[P]>
      : GetScalarType<T[P], AggregateShop[P]>
  }




  export type ShopGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ShopWhereInput
    orderBy?: ShopOrderByWithAggregationInput | ShopOrderByWithAggregationInput[]
    by: ShopScalarFieldEnum[] | ShopScalarFieldEnum
    having?: ShopScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ShopCountAggregateInputType | true
    _avg?: ShopAvgAggregateInputType
    _sum?: ShopSumAggregateInputType
    _min?: ShopMinAggregateInputType
    _max?: ShopMaxAggregateInputType
  }

  export type ShopGroupByOutputType = {
    id: number
    shopName: string
    shortName: string | null
    address: string
    mobile: string
    mobile2: string | null
    mapUrl: string | null
    godName1: string | null
    godName2: string | null
    godName3: string | null
    logo: string | null
    godImage1: string | null
    godImage2: string | null
    authorizedSign: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: ShopCountAggregateOutputType | null
    _avg: ShopAvgAggregateOutputType | null
    _sum: ShopSumAggregateOutputType | null
    _min: ShopMinAggregateOutputType | null
    _max: ShopMaxAggregateOutputType | null
  }

  type GetShopGroupByPayload<T extends ShopGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ShopGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ShopGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ShopGroupByOutputType[P]>
            : GetScalarType<T[P], ShopGroupByOutputType[P]>
        }
      >
    >


  export type ShopSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    shopName?: boolean
    shortName?: boolean
    address?: boolean
    mobile?: boolean
    mobile2?: boolean
    mapUrl?: boolean
    godName1?: boolean
    godName2?: boolean
    godName3?: boolean
    logo?: boolean
    godImage1?: boolean
    godImage2?: boolean
    authorizedSign?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    createdByUser?: boolean | Shop$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["shop"]>



  export type ShopSelectScalar = {
    id?: boolean
    shopName?: boolean
    shortName?: boolean
    address?: boolean
    mobile?: boolean
    mobile2?: boolean
    mapUrl?: boolean
    godName1?: boolean
    godName2?: boolean
    godName3?: boolean
    logo?: boolean
    godImage1?: boolean
    godImage2?: boolean
    authorizedSign?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type ShopOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "shopName" | "shortName" | "address" | "mobile" | "mobile2" | "mapUrl" | "godName1" | "godName2" | "godName3" | "logo" | "godImage1" | "godImage2" | "authorizedSign" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["shop"]>
  export type ShopInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    createdByUser?: boolean | Shop$createdByUserArgs<ExtArgs>
  }

  export type $ShopPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Shop"
    objects: {
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      shopName: string
      shortName: string | null
      address: string
      mobile: string
      mobile2: string | null
      mapUrl: string | null
      godName1: string | null
      godName2: string | null
      godName3: string | null
      logo: string | null
      godImage1: string | null
      godImage2: string | null
      authorizedSign: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["shop"]>
    composites: {}
  }

  type ShopGetPayload<S extends boolean | null | undefined | ShopDefaultArgs> = $Result.GetResult<Prisma.$ShopPayload, S>

  type ShopCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ShopFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ShopCountAggregateInputType | true
    }

  export interface ShopDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Shop'], meta: { name: 'Shop' } }
    /**
     * Find zero or one Shop that matches the filter.
     * @param {ShopFindUniqueArgs} args - Arguments to find a Shop
     * @example
     * // Get one Shop
     * const shop = await prisma.shop.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ShopFindUniqueArgs>(args: SelectSubset<T, ShopFindUniqueArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Shop that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ShopFindUniqueOrThrowArgs} args - Arguments to find a Shop
     * @example
     * // Get one Shop
     * const shop = await prisma.shop.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ShopFindUniqueOrThrowArgs>(args: SelectSubset<T, ShopFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Shop 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 {ShopFindFirstArgs} args - Arguments to find a Shop
     * @example
     * // Get one Shop
     * const shop = await prisma.shop.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ShopFindFirstArgs>(args?: SelectSubset<T, ShopFindFirstArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Shop 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 {ShopFindFirstOrThrowArgs} args - Arguments to find a Shop
     * @example
     * // Get one Shop
     * const shop = await prisma.shop.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ShopFindFirstOrThrowArgs>(args?: SelectSubset<T, ShopFindFirstOrThrowArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Shops 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 {ShopFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Shops
     * const shops = await prisma.shop.findMany()
     * 
     * // Get first 10 Shops
     * const shops = await prisma.shop.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const shopWithIdOnly = await prisma.shop.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ShopFindManyArgs>(args?: SelectSubset<T, ShopFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Shop.
     * @param {ShopCreateArgs} args - Arguments to create a Shop.
     * @example
     * // Create one Shop
     * const Shop = await prisma.shop.create({
     *   data: {
     *     // ... data to create a Shop
     *   }
     * })
     * 
     */
    create<T extends ShopCreateArgs>(args: SelectSubset<T, ShopCreateArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Shops.
     * @param {ShopCreateManyArgs} args - Arguments to create many Shops.
     * @example
     * // Create many Shops
     * const shop = await prisma.shop.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ShopCreateManyArgs>(args?: SelectSubset<T, ShopCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Shop.
     * @param {ShopDeleteArgs} args - Arguments to delete one Shop.
     * @example
     * // Delete one Shop
     * const Shop = await prisma.shop.delete({
     *   where: {
     *     // ... filter to delete one Shop
     *   }
     * })
     * 
     */
    delete<T extends ShopDeleteArgs>(args: SelectSubset<T, ShopDeleteArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Shop.
     * @param {ShopUpdateArgs} args - Arguments to update one Shop.
     * @example
     * // Update one Shop
     * const shop = await prisma.shop.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ShopUpdateArgs>(args: SelectSubset<T, ShopUpdateArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Shops.
     * @param {ShopDeleteManyArgs} args - Arguments to filter Shops to delete.
     * @example
     * // Delete a few Shops
     * const { count } = await prisma.shop.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ShopDeleteManyArgs>(args?: SelectSubset<T, ShopDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Shops.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ShopUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Shops
     * const shop = await prisma.shop.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ShopUpdateManyArgs>(args: SelectSubset<T, ShopUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Shop.
     * @param {ShopUpsertArgs} args - Arguments to update or create a Shop.
     * @example
     * // Update or create a Shop
     * const shop = await prisma.shop.upsert({
     *   create: {
     *     // ... data to create a Shop
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Shop we want to update
     *   }
     * })
     */
    upsert<T extends ShopUpsertArgs>(args: SelectSubset<T, ShopUpsertArgs<ExtArgs>>): Prisma__ShopClient<$Result.GetResult<Prisma.$ShopPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Shops.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ShopCountArgs} args - Arguments to filter Shops to count.
     * @example
     * // Count the number of Shops
     * const count = await prisma.shop.count({
     *   where: {
     *     // ... the filter for the Shops we want to count
     *   }
     * })
    **/
    count<T extends ShopCountArgs>(
      args?: Subset<T, ShopCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ShopCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Shop.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ShopAggregateArgs} 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 ShopAggregateArgs>(args: Subset<T, ShopAggregateArgs>): Prisma.PrismaPromise<GetShopAggregateType<T>>

    /**
     * Group by Shop.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ShopGroupByArgs} 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 ShopGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ShopGroupByArgs['orderBy'] }
        : { orderBy?: ShopGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ShopGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetShopGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Shop model
   */
  readonly fields: ShopFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Shop.
   * 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__ShopClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    createdByUser<T extends Shop$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Shop$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Shop model
   */
  interface ShopFieldRefs {
    readonly id: FieldRef<"Shop", 'Int'>
    readonly shopName: FieldRef<"Shop", 'String'>
    readonly shortName: FieldRef<"Shop", 'String'>
    readonly address: FieldRef<"Shop", 'String'>
    readonly mobile: FieldRef<"Shop", 'String'>
    readonly mobile2: FieldRef<"Shop", 'String'>
    readonly mapUrl: FieldRef<"Shop", 'String'>
    readonly godName1: FieldRef<"Shop", 'String'>
    readonly godName2: FieldRef<"Shop", 'String'>
    readonly godName3: FieldRef<"Shop", 'String'>
    readonly logo: FieldRef<"Shop", 'String'>
    readonly godImage1: FieldRef<"Shop", 'String'>
    readonly godImage2: FieldRef<"Shop", 'String'>
    readonly authorizedSign: FieldRef<"Shop", 'String'>
    readonly createdAt: FieldRef<"Shop", 'DateTime'>
    readonly updatedAt: FieldRef<"Shop", 'DateTime'>
    readonly createdBy: FieldRef<"Shop", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Shop findUnique
   */
  export type ShopFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter, which Shop to fetch.
     */
    where: ShopWhereUniqueInput
  }

  /**
   * Shop findUniqueOrThrow
   */
  export type ShopFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter, which Shop to fetch.
     */
    where: ShopWhereUniqueInput
  }

  /**
   * Shop findFirst
   */
  export type ShopFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter, which Shop to fetch.
     */
    where?: ShopWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Shops to fetch.
     */
    orderBy?: ShopOrderByWithRelationInput | ShopOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Shops.
     */
    cursor?: ShopWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Shops 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` Shops.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Shops.
     */
    distinct?: ShopScalarFieldEnum | ShopScalarFieldEnum[]
  }

  /**
   * Shop findFirstOrThrow
   */
  export type ShopFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter, which Shop to fetch.
     */
    where?: ShopWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Shops to fetch.
     */
    orderBy?: ShopOrderByWithRelationInput | ShopOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Shops.
     */
    cursor?: ShopWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Shops 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` Shops.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Shops.
     */
    distinct?: ShopScalarFieldEnum | ShopScalarFieldEnum[]
  }

  /**
   * Shop findMany
   */
  export type ShopFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter, which Shops to fetch.
     */
    where?: ShopWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Shops to fetch.
     */
    orderBy?: ShopOrderByWithRelationInput | ShopOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Shops.
     */
    cursor?: ShopWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Shops 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` Shops.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Shops.
     */
    distinct?: ShopScalarFieldEnum | ShopScalarFieldEnum[]
  }

  /**
   * Shop create
   */
  export type ShopCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * The data needed to create a Shop.
     */
    data: XOR<ShopCreateInput, ShopUncheckedCreateInput>
  }

  /**
   * Shop createMany
   */
  export type ShopCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Shops.
     */
    data: ShopCreateManyInput | ShopCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Shop update
   */
  export type ShopUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * The data needed to update a Shop.
     */
    data: XOR<ShopUpdateInput, ShopUncheckedUpdateInput>
    /**
     * Choose, which Shop to update.
     */
    where: ShopWhereUniqueInput
  }

  /**
   * Shop updateMany
   */
  export type ShopUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Shops.
     */
    data: XOR<ShopUpdateManyMutationInput, ShopUncheckedUpdateManyInput>
    /**
     * Filter which Shops to update
     */
    where?: ShopWhereInput
    /**
     * Limit how many Shops to update.
     */
    limit?: number
  }

  /**
   * Shop upsert
   */
  export type ShopUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * The filter to search for the Shop to update in case it exists.
     */
    where: ShopWhereUniqueInput
    /**
     * In case the Shop found by the `where` argument doesn't exist, create a new Shop with this data.
     */
    create: XOR<ShopCreateInput, ShopUncheckedCreateInput>
    /**
     * In case the Shop was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ShopUpdateInput, ShopUncheckedUpdateInput>
  }

  /**
   * Shop delete
   */
  export type ShopDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
    /**
     * Filter which Shop to delete.
     */
    where: ShopWhereUniqueInput
  }

  /**
   * Shop deleteMany
   */
  export type ShopDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Shops to delete
     */
    where?: ShopWhereInput
    /**
     * Limit how many Shops to delete.
     */
    limit?: number
  }

  /**
   * Shop.createdByUser
   */
  export type Shop$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Shop without action
   */
  export type ShopDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Shop
     */
    select?: ShopSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Shop
     */
    omit?: ShopOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ShopInclude<ExtArgs> | null
  }


  /**
   * Model Sale
   */

  export type AggregateSale = {
    _count: SaleCountAggregateOutputType | null
    _avg: SaleAvgAggregateOutputType | null
    _sum: SaleSumAggregateOutputType | null
    _min: SaleMinAggregateOutputType | null
    _max: SaleMaxAggregateOutputType | null
  }

  export type SaleAvgAggregateOutputType = {
    id: number | null
    customerId: number | null
    subTotal: Decimal | null
    discount: Decimal | null
    freightCharge: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    cashAmount: Decimal | null
    upiAmount: Decimal | null
    bankAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: number | null
  }

  export type SaleSumAggregateOutputType = {
    id: bigint | null
    customerId: bigint | null
    subTotal: Decimal | null
    discount: Decimal | null
    freightCharge: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    cashAmount: Decimal | null
    upiAmount: Decimal | null
    bankAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: bigint | null
  }

  export type SaleMinAggregateOutputType = {
    id: bigint | null
    invoiceNo: string | null
    customerId: bigint | null
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date | null
    subTotal: Decimal | null
    discount: Decimal | null
    freightCharge: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    cashAmount: Decimal | null
    upiAmount: Decimal | null
    bankAmount: Decimal | null
    balanceAmount: Decimal | null
    paymentStatus: $Enums.SalePaymentStatus | null
    remarks: string | null
    invoiceDownloadToken: string | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleMaxAggregateOutputType = {
    id: bigint | null
    invoiceNo: string | null
    customerId: bigint | null
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date | null
    subTotal: Decimal | null
    discount: Decimal | null
    freightCharge: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    cashAmount: Decimal | null
    upiAmount: Decimal | null
    bankAmount: Decimal | null
    balanceAmount: Decimal | null
    paymentStatus: $Enums.SalePaymentStatus | null
    remarks: string | null
    invoiceDownloadToken: string | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleCountAggregateOutputType = {
    id: number
    invoiceNo: number
    customerId: number
    walkInName: number
    walkInMobile: number
    invoiceDate: number
    subTotal: number
    discount: number
    freightCharge: number
    grandTotal: number
    receivedAmount: number
    cashAmount: number
    upiAmount: number
    bankAmount: number
    balanceAmount: number
    paymentStatus: number
    remarks: number
    images: number
    invoiceDownloadToken: number
    isWhatsappMessageSent: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type SaleAvgAggregateInputType = {
    id?: true
    customerId?: true
    subTotal?: true
    discount?: true
    freightCharge?: true
    grandTotal?: true
    receivedAmount?: true
    cashAmount?: true
    upiAmount?: true
    bankAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type SaleSumAggregateInputType = {
    id?: true
    customerId?: true
    subTotal?: true
    discount?: true
    freightCharge?: true
    grandTotal?: true
    receivedAmount?: true
    cashAmount?: true
    upiAmount?: true
    bankAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type SaleMinAggregateInputType = {
    id?: true
    invoiceNo?: true
    customerId?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    freightCharge?: true
    grandTotal?: true
    receivedAmount?: true
    cashAmount?: true
    upiAmount?: true
    bankAmount?: true
    balanceAmount?: true
    paymentStatus?: true
    remarks?: true
    invoiceDownloadToken?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SaleMaxAggregateInputType = {
    id?: true
    invoiceNo?: true
    customerId?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    freightCharge?: true
    grandTotal?: true
    receivedAmount?: true
    cashAmount?: true
    upiAmount?: true
    bankAmount?: true
    balanceAmount?: true
    paymentStatus?: true
    remarks?: true
    invoiceDownloadToken?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type SaleCountAggregateInputType = {
    id?: true
    invoiceNo?: true
    customerId?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    freightCharge?: true
    grandTotal?: true
    receivedAmount?: true
    cashAmount?: true
    upiAmount?: true
    bankAmount?: true
    balanceAmount?: true
    paymentStatus?: true
    remarks?: true
    images?: true
    invoiceDownloadToken?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type SaleAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Sale to aggregate.
     */
    where?: SaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Sales to fetch.
     */
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: SaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Sales 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` Sales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Sales
    **/
    _count?: true | SaleCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: SaleAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: SaleSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: SaleMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: SaleMaxAggregateInputType
  }

  export type GetSaleAggregateType<T extends SaleAggregateArgs> = {
        [P in keyof T & keyof AggregateSale]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateSale[P]>
      : GetScalarType<T[P], AggregateSale[P]>
  }




  export type SaleGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleWhereInput
    orderBy?: SaleOrderByWithAggregationInput | SaleOrderByWithAggregationInput[]
    by: SaleScalarFieldEnum[] | SaleScalarFieldEnum
    having?: SaleScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: SaleCountAggregateInputType | true
    _avg?: SaleAvgAggregateInputType
    _sum?: SaleSumAggregateInputType
    _min?: SaleMinAggregateInputType
    _max?: SaleMaxAggregateInputType
  }

  export type SaleGroupByOutputType = {
    id: bigint
    invoiceNo: string
    customerId: bigint | null
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date
    subTotal: Decimal
    discount: Decimal
    freightCharge: Decimal
    grandTotal: Decimal
    receivedAmount: Decimal
    cashAmount: Decimal
    upiAmount: Decimal
    bankAmount: Decimal
    balanceAmount: Decimal
    paymentStatus: $Enums.SalePaymentStatus
    remarks: string | null
    images: JsonValue | null
    invoiceDownloadToken: string
    isWhatsappMessageSent: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: SaleCountAggregateOutputType | null
    _avg: SaleAvgAggregateOutputType | null
    _sum: SaleSumAggregateOutputType | null
    _min: SaleMinAggregateOutputType | null
    _max: SaleMaxAggregateOutputType | null
  }

  type GetSaleGroupByPayload<T extends SaleGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<SaleGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof SaleGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], SaleGroupByOutputType[P]>
            : GetScalarType<T[P], SaleGroupByOutputType[P]>
        }
      >
    >


  export type SaleSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    invoiceNo?: boolean
    customerId?: boolean
    walkInName?: boolean
    walkInMobile?: boolean
    invoiceDate?: boolean
    subTotal?: boolean
    discount?: boolean
    freightCharge?: boolean
    grandTotal?: boolean
    receivedAmount?: boolean
    cashAmount?: boolean
    upiAmount?: boolean
    bankAmount?: boolean
    balanceAmount?: boolean
    paymentStatus?: boolean
    remarks?: boolean
    images?: boolean
    invoiceDownloadToken?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    customer?: boolean | Sale$customerArgs<ExtArgs>
    items?: boolean | Sale$itemsArgs<ExtArgs>
    createdByUser?: boolean | Sale$createdByUserArgs<ExtArgs>
    _count?: boolean | SaleCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["sale"]>



  export type SaleSelectScalar = {
    id?: boolean
    invoiceNo?: boolean
    customerId?: boolean
    walkInName?: boolean
    walkInMobile?: boolean
    invoiceDate?: boolean
    subTotal?: boolean
    discount?: boolean
    freightCharge?: boolean
    grandTotal?: boolean
    receivedAmount?: boolean
    cashAmount?: boolean
    upiAmount?: boolean
    bankAmount?: boolean
    balanceAmount?: boolean
    paymentStatus?: boolean
    remarks?: boolean
    images?: boolean
    invoiceDownloadToken?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type SaleOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "invoiceNo" | "customerId" | "walkInName" | "walkInMobile" | "invoiceDate" | "subTotal" | "discount" | "freightCharge" | "grandTotal" | "receivedAmount" | "cashAmount" | "upiAmount" | "bankAmount" | "balanceAmount" | "paymentStatus" | "remarks" | "images" | "invoiceDownloadToken" | "isWhatsappMessageSent" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["sale"]>
  export type SaleInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    customer?: boolean | Sale$customerArgs<ExtArgs>
    items?: boolean | Sale$itemsArgs<ExtArgs>
    createdByUser?: boolean | Sale$createdByUserArgs<ExtArgs>
    _count?: boolean | SaleCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $SalePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Sale"
    objects: {
      customer: Prisma.$CustomerPayload<ExtArgs> | null
      items: Prisma.$SaleItemPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      invoiceNo: string
      customerId: bigint | null
      walkInName: string | null
      walkInMobile: string | null
      invoiceDate: Date
      subTotal: Prisma.Decimal
      discount: Prisma.Decimal
      freightCharge: Prisma.Decimal
      grandTotal: Prisma.Decimal
      receivedAmount: Prisma.Decimal
      cashAmount: Prisma.Decimal
      upiAmount: Prisma.Decimal
      bankAmount: Prisma.Decimal
      balanceAmount: Prisma.Decimal
      paymentStatus: $Enums.SalePaymentStatus
      remarks: string | null
      images: Prisma.JsonValue | null
      invoiceDownloadToken: string
      isWhatsappMessageSent: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["sale"]>
    composites: {}
  }

  type SaleGetPayload<S extends boolean | null | undefined | SaleDefaultArgs> = $Result.GetResult<Prisma.$SalePayload, S>

  type SaleCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<SaleFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: SaleCountAggregateInputType | true
    }

  export interface SaleDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Sale'], meta: { name: 'Sale' } }
    /**
     * Find zero or one Sale that matches the filter.
     * @param {SaleFindUniqueArgs} args - Arguments to find a Sale
     * @example
     * // Get one Sale
     * const sale = await prisma.sale.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends SaleFindUniqueArgs>(args: SelectSubset<T, SaleFindUniqueArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Sale that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {SaleFindUniqueOrThrowArgs} args - Arguments to find a Sale
     * @example
     * // Get one Sale
     * const sale = await prisma.sale.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends SaleFindUniqueOrThrowArgs>(args: SelectSubset<T, SaleFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Sale 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 {SaleFindFirstArgs} args - Arguments to find a Sale
     * @example
     * // Get one Sale
     * const sale = await prisma.sale.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends SaleFindFirstArgs>(args?: SelectSubset<T, SaleFindFirstArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Sale 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 {SaleFindFirstOrThrowArgs} args - Arguments to find a Sale
     * @example
     * // Get one Sale
     * const sale = await prisma.sale.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends SaleFindFirstOrThrowArgs>(args?: SelectSubset<T, SaleFindFirstOrThrowArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Sales 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 {SaleFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Sales
     * const sales = await prisma.sale.findMany()
     * 
     * // Get first 10 Sales
     * const sales = await prisma.sale.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const saleWithIdOnly = await prisma.sale.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends SaleFindManyArgs>(args?: SelectSubset<T, SaleFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Sale.
     * @param {SaleCreateArgs} args - Arguments to create a Sale.
     * @example
     * // Create one Sale
     * const Sale = await prisma.sale.create({
     *   data: {
     *     // ... data to create a Sale
     *   }
     * })
     * 
     */
    create<T extends SaleCreateArgs>(args: SelectSubset<T, SaleCreateArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Sales.
     * @param {SaleCreateManyArgs} args - Arguments to create many Sales.
     * @example
     * // Create many Sales
     * const sale = await prisma.sale.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends SaleCreateManyArgs>(args?: SelectSubset<T, SaleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Sale.
     * @param {SaleDeleteArgs} args - Arguments to delete one Sale.
     * @example
     * // Delete one Sale
     * const Sale = await prisma.sale.delete({
     *   where: {
     *     // ... filter to delete one Sale
     *   }
     * })
     * 
     */
    delete<T extends SaleDeleteArgs>(args: SelectSubset<T, SaleDeleteArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Sale.
     * @param {SaleUpdateArgs} args - Arguments to update one Sale.
     * @example
     * // Update one Sale
     * const sale = await prisma.sale.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends SaleUpdateArgs>(args: SelectSubset<T, SaleUpdateArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Sales.
     * @param {SaleDeleteManyArgs} args - Arguments to filter Sales to delete.
     * @example
     * // Delete a few Sales
     * const { count } = await prisma.sale.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends SaleDeleteManyArgs>(args?: SelectSubset<T, SaleDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Sales.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Sales
     * const sale = await prisma.sale.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends SaleUpdateManyArgs>(args: SelectSubset<T, SaleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Sale.
     * @param {SaleUpsertArgs} args - Arguments to update or create a Sale.
     * @example
     * // Update or create a Sale
     * const sale = await prisma.sale.upsert({
     *   create: {
     *     // ... data to create a Sale
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Sale we want to update
     *   }
     * })
     */
    upsert<T extends SaleUpsertArgs>(args: SelectSubset<T, SaleUpsertArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Sales.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleCountArgs} args - Arguments to filter Sales to count.
     * @example
     * // Count the number of Sales
     * const count = await prisma.sale.count({
     *   where: {
     *     // ... the filter for the Sales we want to count
     *   }
     * })
    **/
    count<T extends SaleCountArgs>(
      args?: Subset<T, SaleCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], SaleCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Sale.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleAggregateArgs} 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 SaleAggregateArgs>(args: Subset<T, SaleAggregateArgs>): Prisma.PrismaPromise<GetSaleAggregateType<T>>

    /**
     * Group by Sale.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleGroupByArgs} 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 SaleGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: SaleGroupByArgs['orderBy'] }
        : { orderBy?: SaleGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, SaleGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSaleGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Sale model
   */
  readonly fields: SaleFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Sale.
   * 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__SaleClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    customer<T extends Sale$customerArgs<ExtArgs> = {}>(args?: Subset<T, Sale$customerArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    items<T extends Sale$itemsArgs<ExtArgs> = {}>(args?: Subset<T, Sale$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Sale$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Sale$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Sale model
   */
  interface SaleFieldRefs {
    readonly id: FieldRef<"Sale", 'BigInt'>
    readonly invoiceNo: FieldRef<"Sale", 'String'>
    readonly customerId: FieldRef<"Sale", 'BigInt'>
    readonly walkInName: FieldRef<"Sale", 'String'>
    readonly walkInMobile: FieldRef<"Sale", 'String'>
    readonly invoiceDate: FieldRef<"Sale", 'DateTime'>
    readonly subTotal: FieldRef<"Sale", 'Decimal'>
    readonly discount: FieldRef<"Sale", 'Decimal'>
    readonly freightCharge: FieldRef<"Sale", 'Decimal'>
    readonly grandTotal: FieldRef<"Sale", 'Decimal'>
    readonly receivedAmount: FieldRef<"Sale", 'Decimal'>
    readonly cashAmount: FieldRef<"Sale", 'Decimal'>
    readonly upiAmount: FieldRef<"Sale", 'Decimal'>
    readonly bankAmount: FieldRef<"Sale", 'Decimal'>
    readonly balanceAmount: FieldRef<"Sale", 'Decimal'>
    readonly paymentStatus: FieldRef<"Sale", 'SalePaymentStatus'>
    readonly remarks: FieldRef<"Sale", 'String'>
    readonly images: FieldRef<"Sale", 'Json'>
    readonly invoiceDownloadToken: FieldRef<"Sale", 'String'>
    readonly isWhatsappMessageSent: FieldRef<"Sale", 'Boolean'>
    readonly createdAt: FieldRef<"Sale", 'DateTime'>
    readonly updatedAt: FieldRef<"Sale", 'DateTime'>
    readonly deletedAt: FieldRef<"Sale", 'DateTime'>
    readonly createdBy: FieldRef<"Sale", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Sale findUnique
   */
  export type SaleFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter, which Sale to fetch.
     */
    where: SaleWhereUniqueInput
  }

  /**
   * Sale findUniqueOrThrow
   */
  export type SaleFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter, which Sale to fetch.
     */
    where: SaleWhereUniqueInput
  }

  /**
   * Sale findFirst
   */
  export type SaleFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter, which Sale to fetch.
     */
    where?: SaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Sales to fetch.
     */
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Sales.
     */
    cursor?: SaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Sales 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` Sales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Sales.
     */
    distinct?: SaleScalarFieldEnum | SaleScalarFieldEnum[]
  }

  /**
   * Sale findFirstOrThrow
   */
  export type SaleFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter, which Sale to fetch.
     */
    where?: SaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Sales to fetch.
     */
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Sales.
     */
    cursor?: SaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Sales 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` Sales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Sales.
     */
    distinct?: SaleScalarFieldEnum | SaleScalarFieldEnum[]
  }

  /**
   * Sale findMany
   */
  export type SaleFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter, which Sales to fetch.
     */
    where?: SaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Sales to fetch.
     */
    orderBy?: SaleOrderByWithRelationInput | SaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Sales.
     */
    cursor?: SaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Sales 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` Sales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Sales.
     */
    distinct?: SaleScalarFieldEnum | SaleScalarFieldEnum[]
  }

  /**
   * Sale create
   */
  export type SaleCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * The data needed to create a Sale.
     */
    data: XOR<SaleCreateInput, SaleUncheckedCreateInput>
  }

  /**
   * Sale createMany
   */
  export type SaleCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Sales.
     */
    data: SaleCreateManyInput | SaleCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Sale update
   */
  export type SaleUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * The data needed to update a Sale.
     */
    data: XOR<SaleUpdateInput, SaleUncheckedUpdateInput>
    /**
     * Choose, which Sale to update.
     */
    where: SaleWhereUniqueInput
  }

  /**
   * Sale updateMany
   */
  export type SaleUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Sales.
     */
    data: XOR<SaleUpdateManyMutationInput, SaleUncheckedUpdateManyInput>
    /**
     * Filter which Sales to update
     */
    where?: SaleWhereInput
    /**
     * Limit how many Sales to update.
     */
    limit?: number
  }

  /**
   * Sale upsert
   */
  export type SaleUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * The filter to search for the Sale to update in case it exists.
     */
    where: SaleWhereUniqueInput
    /**
     * In case the Sale found by the `where` argument doesn't exist, create a new Sale with this data.
     */
    create: XOR<SaleCreateInput, SaleUncheckedCreateInput>
    /**
     * In case the Sale was found with the provided `where` argument, update it with this data.
     */
    update: XOR<SaleUpdateInput, SaleUncheckedUpdateInput>
  }

  /**
   * Sale delete
   */
  export type SaleDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
    /**
     * Filter which Sale to delete.
     */
    where: SaleWhereUniqueInput
  }

  /**
   * Sale deleteMany
   */
  export type SaleDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Sales to delete
     */
    where?: SaleWhereInput
    /**
     * Limit how many Sales to delete.
     */
    limit?: number
  }

  /**
   * Sale.customer
   */
  export type Sale$customerArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    where?: CustomerWhereInput
  }

  /**
   * Sale.items
   */
  export type Sale$itemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    where?: SaleItemWhereInput
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    cursor?: SaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * Sale.createdByUser
   */
  export type Sale$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Sale without action
   */
  export type SaleDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Sale
     */
    select?: SaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Sale
     */
    omit?: SaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleInclude<ExtArgs> | null
  }


  /**
   * Model SaleItem
   */

  export type AggregateSaleItem = {
    _count: SaleItemCountAggregateOutputType | null
    _avg: SaleItemAvgAggregateOutputType | null
    _sum: SaleItemSumAggregateOutputType | null
    _min: SaleItemMinAggregateOutputType | null
    _max: SaleItemMaxAggregateOutputType | null
  }

  export type SaleItemAvgAggregateOutputType = {
    id: number | null
    saleId: number | null
    purchaseId: number | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdBy: number | null
  }

  export type SaleItemSumAggregateOutputType = {
    id: bigint | null
    saleId: bigint | null
    purchaseId: bigint | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdBy: bigint | null
  }

  export type SaleItemMinAggregateOutputType = {
    id: bigint | null
    saleId: bigint | null
    purchaseId: bigint | null
    saleUnit: $Enums.PurchaseUnit | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleItemMaxAggregateOutputType = {
    id: bigint | null
    saleId: bigint | null
    purchaseId: bigint | null
    saleUnit: $Enums.PurchaseUnit | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleItemCountAggregateOutputType = {
    id: number
    saleId: number
    purchaseId: number
    saleUnit: number
    quantity: number
    bags: number
    costPerUnit: number
    sellingRate: number
    total: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type SaleItemAvgAggregateInputType = {
    id?: true
    saleId?: true
    purchaseId?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdBy?: true
  }

  export type SaleItemSumAggregateInputType = {
    id?: true
    saleId?: true
    purchaseId?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdBy?: true
  }

  export type SaleItemMinAggregateInputType = {
    id?: true
    saleId?: true
    purchaseId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type SaleItemMaxAggregateInputType = {
    id?: true
    saleId?: true
    purchaseId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type SaleItemCountAggregateInputType = {
    id?: true
    saleId?: true
    purchaseId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type SaleItemAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SaleItem to aggregate.
     */
    where?: SaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleItems to fetch.
     */
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: SaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleItems 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` SaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned SaleItems
    **/
    _count?: true | SaleItemCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: SaleItemAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: SaleItemSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: SaleItemMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: SaleItemMaxAggregateInputType
  }

  export type GetSaleItemAggregateType<T extends SaleItemAggregateArgs> = {
        [P in keyof T & keyof AggregateSaleItem]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateSaleItem[P]>
      : GetScalarType<T[P], AggregateSaleItem[P]>
  }




  export type SaleItemGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleItemWhereInput
    orderBy?: SaleItemOrderByWithAggregationInput | SaleItemOrderByWithAggregationInput[]
    by: SaleItemScalarFieldEnum[] | SaleItemScalarFieldEnum
    having?: SaleItemScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: SaleItemCountAggregateInputType | true
    _avg?: SaleItemAvgAggregateInputType
    _sum?: SaleItemSumAggregateInputType
    _min?: SaleItemMinAggregateInputType
    _max?: SaleItemMaxAggregateInputType
  }

  export type SaleItemGroupByOutputType = {
    id: bigint
    saleId: bigint
    purchaseId: bigint
    saleUnit: $Enums.PurchaseUnit
    quantity: Decimal
    bags: Decimal | null
    costPerUnit: Decimal
    sellingRate: Decimal
    total: Decimal
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: SaleItemCountAggregateOutputType | null
    _avg: SaleItemAvgAggregateOutputType | null
    _sum: SaleItemSumAggregateOutputType | null
    _min: SaleItemMinAggregateOutputType | null
    _max: SaleItemMaxAggregateOutputType | null
  }

  type GetSaleItemGroupByPayload<T extends SaleItemGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<SaleItemGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof SaleItemGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], SaleItemGroupByOutputType[P]>
            : GetScalarType<T[P], SaleItemGroupByOutputType[P]>
        }
      >
    >


  export type SaleItemSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    saleId?: boolean
    purchaseId?: boolean
    saleUnit?: boolean
    quantity?: boolean
    bags?: boolean
    costPerUnit?: boolean
    sellingRate?: boolean
    total?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    sale?: boolean | SaleDefaultArgs<ExtArgs>
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    saleReturns?: boolean | SaleItem$saleReturnsArgs<ExtArgs>
    createdByUser?: boolean | SaleItem$createdByUserArgs<ExtArgs>
    _count?: boolean | SaleItemCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["saleItem"]>



  export type SaleItemSelectScalar = {
    id?: boolean
    saleId?: boolean
    purchaseId?: boolean
    saleUnit?: boolean
    quantity?: boolean
    bags?: boolean
    costPerUnit?: boolean
    sellingRate?: boolean
    total?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type SaleItemOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "saleId" | "purchaseId" | "saleUnit" | "quantity" | "bags" | "costPerUnit" | "sellingRate" | "total" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["saleItem"]>
  export type SaleItemInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    sale?: boolean | SaleDefaultArgs<ExtArgs>
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    saleReturns?: boolean | SaleItem$saleReturnsArgs<ExtArgs>
    createdByUser?: boolean | SaleItem$createdByUserArgs<ExtArgs>
    _count?: boolean | SaleItemCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $SaleItemPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "SaleItem"
    objects: {
      sale: Prisma.$SalePayload<ExtArgs>
      purchase: Prisma.$PurchasePayload<ExtArgs>
      saleReturns: Prisma.$SaleReturnPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      saleId: bigint
      purchaseId: bigint
      saleUnit: $Enums.PurchaseUnit
      quantity: Prisma.Decimal
      bags: Prisma.Decimal | null
      costPerUnit: Prisma.Decimal
      sellingRate: Prisma.Decimal
      total: Prisma.Decimal
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["saleItem"]>
    composites: {}
  }

  type SaleItemGetPayload<S extends boolean | null | undefined | SaleItemDefaultArgs> = $Result.GetResult<Prisma.$SaleItemPayload, S>

  type SaleItemCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<SaleItemFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: SaleItemCountAggregateInputType | true
    }

  export interface SaleItemDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['SaleItem'], meta: { name: 'SaleItem' } }
    /**
     * Find zero or one SaleItem that matches the filter.
     * @param {SaleItemFindUniqueArgs} args - Arguments to find a SaleItem
     * @example
     * // Get one SaleItem
     * const saleItem = await prisma.saleItem.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends SaleItemFindUniqueArgs>(args: SelectSubset<T, SaleItemFindUniqueArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one SaleItem that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {SaleItemFindUniqueOrThrowArgs} args - Arguments to find a SaleItem
     * @example
     * // Get one SaleItem
     * const saleItem = await prisma.saleItem.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends SaleItemFindUniqueOrThrowArgs>(args: SelectSubset<T, SaleItemFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SaleItem 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 {SaleItemFindFirstArgs} args - Arguments to find a SaleItem
     * @example
     * // Get one SaleItem
     * const saleItem = await prisma.saleItem.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends SaleItemFindFirstArgs>(args?: SelectSubset<T, SaleItemFindFirstArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SaleItem 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 {SaleItemFindFirstOrThrowArgs} args - Arguments to find a SaleItem
     * @example
     * // Get one SaleItem
     * const saleItem = await prisma.saleItem.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends SaleItemFindFirstOrThrowArgs>(args?: SelectSubset<T, SaleItemFindFirstOrThrowArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more SaleItems 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 {SaleItemFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all SaleItems
     * const saleItems = await prisma.saleItem.findMany()
     * 
     * // Get first 10 SaleItems
     * const saleItems = await prisma.saleItem.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const saleItemWithIdOnly = await prisma.saleItem.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends SaleItemFindManyArgs>(args?: SelectSubset<T, SaleItemFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a SaleItem.
     * @param {SaleItemCreateArgs} args - Arguments to create a SaleItem.
     * @example
     * // Create one SaleItem
     * const SaleItem = await prisma.saleItem.create({
     *   data: {
     *     // ... data to create a SaleItem
     *   }
     * })
     * 
     */
    create<T extends SaleItemCreateArgs>(args: SelectSubset<T, SaleItemCreateArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many SaleItems.
     * @param {SaleItemCreateManyArgs} args - Arguments to create many SaleItems.
     * @example
     * // Create many SaleItems
     * const saleItem = await prisma.saleItem.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends SaleItemCreateManyArgs>(args?: SelectSubset<T, SaleItemCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a SaleItem.
     * @param {SaleItemDeleteArgs} args - Arguments to delete one SaleItem.
     * @example
     * // Delete one SaleItem
     * const SaleItem = await prisma.saleItem.delete({
     *   where: {
     *     // ... filter to delete one SaleItem
     *   }
     * })
     * 
     */
    delete<T extends SaleItemDeleteArgs>(args: SelectSubset<T, SaleItemDeleteArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one SaleItem.
     * @param {SaleItemUpdateArgs} args - Arguments to update one SaleItem.
     * @example
     * // Update one SaleItem
     * const saleItem = await prisma.saleItem.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends SaleItemUpdateArgs>(args: SelectSubset<T, SaleItemUpdateArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more SaleItems.
     * @param {SaleItemDeleteManyArgs} args - Arguments to filter SaleItems to delete.
     * @example
     * // Delete a few SaleItems
     * const { count } = await prisma.saleItem.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends SaleItemDeleteManyArgs>(args?: SelectSubset<T, SaleItemDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more SaleItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleItemUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many SaleItems
     * const saleItem = await prisma.saleItem.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends SaleItemUpdateManyArgs>(args: SelectSubset<T, SaleItemUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one SaleItem.
     * @param {SaleItemUpsertArgs} args - Arguments to update or create a SaleItem.
     * @example
     * // Update or create a SaleItem
     * const saleItem = await prisma.saleItem.upsert({
     *   create: {
     *     // ... data to create a SaleItem
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the SaleItem we want to update
     *   }
     * })
     */
    upsert<T extends SaleItemUpsertArgs>(args: SelectSubset<T, SaleItemUpsertArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of SaleItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleItemCountArgs} args - Arguments to filter SaleItems to count.
     * @example
     * // Count the number of SaleItems
     * const count = await prisma.saleItem.count({
     *   where: {
     *     // ... the filter for the SaleItems we want to count
     *   }
     * })
    **/
    count<T extends SaleItemCountArgs>(
      args?: Subset<T, SaleItemCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], SaleItemCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a SaleItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleItemAggregateArgs} 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 SaleItemAggregateArgs>(args: Subset<T, SaleItemAggregateArgs>): Prisma.PrismaPromise<GetSaleItemAggregateType<T>>

    /**
     * Group by SaleItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleItemGroupByArgs} 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 SaleItemGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: SaleItemGroupByArgs['orderBy'] }
        : { orderBy?: SaleItemGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, SaleItemGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSaleItemGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the SaleItem model
   */
  readonly fields: SaleItemFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for SaleItem.
   * 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__SaleItemClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    sale<T extends SaleDefaultArgs<ExtArgs> = {}>(args?: Subset<T, SaleDefaultArgs<ExtArgs>>): Prisma__SaleClient<$Result.GetResult<Prisma.$SalePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    saleReturns<T extends SaleItem$saleReturnsArgs<ExtArgs> = {}>(args?: Subset<T, SaleItem$saleReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends SaleItem$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, SaleItem$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the SaleItem model
   */
  interface SaleItemFieldRefs {
    readonly id: FieldRef<"SaleItem", 'BigInt'>
    readonly saleId: FieldRef<"SaleItem", 'BigInt'>
    readonly purchaseId: FieldRef<"SaleItem", 'BigInt'>
    readonly saleUnit: FieldRef<"SaleItem", 'PurchaseUnit'>
    readonly quantity: FieldRef<"SaleItem", 'Decimal'>
    readonly bags: FieldRef<"SaleItem", 'Decimal'>
    readonly costPerUnit: FieldRef<"SaleItem", 'Decimal'>
    readonly sellingRate: FieldRef<"SaleItem", 'Decimal'>
    readonly total: FieldRef<"SaleItem", 'Decimal'>
    readonly createdAt: FieldRef<"SaleItem", 'DateTime'>
    readonly updatedAt: FieldRef<"SaleItem", 'DateTime'>
    readonly createdBy: FieldRef<"SaleItem", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * SaleItem findUnique
   */
  export type SaleItemFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter, which SaleItem to fetch.
     */
    where: SaleItemWhereUniqueInput
  }

  /**
   * SaleItem findUniqueOrThrow
   */
  export type SaleItemFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter, which SaleItem to fetch.
     */
    where: SaleItemWhereUniqueInput
  }

  /**
   * SaleItem findFirst
   */
  export type SaleItemFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter, which SaleItem to fetch.
     */
    where?: SaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleItems to fetch.
     */
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SaleItems.
     */
    cursor?: SaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleItems 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` SaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleItems.
     */
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * SaleItem findFirstOrThrow
   */
  export type SaleItemFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter, which SaleItem to fetch.
     */
    where?: SaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleItems to fetch.
     */
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SaleItems.
     */
    cursor?: SaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleItems 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` SaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleItems.
     */
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * SaleItem findMany
   */
  export type SaleItemFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter, which SaleItems to fetch.
     */
    where?: SaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleItems to fetch.
     */
    orderBy?: SaleItemOrderByWithRelationInput | SaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing SaleItems.
     */
    cursor?: SaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleItems 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` SaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleItems.
     */
    distinct?: SaleItemScalarFieldEnum | SaleItemScalarFieldEnum[]
  }

  /**
   * SaleItem create
   */
  export type SaleItemCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * The data needed to create a SaleItem.
     */
    data: XOR<SaleItemCreateInput, SaleItemUncheckedCreateInput>
  }

  /**
   * SaleItem createMany
   */
  export type SaleItemCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many SaleItems.
     */
    data: SaleItemCreateManyInput | SaleItemCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * SaleItem update
   */
  export type SaleItemUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * The data needed to update a SaleItem.
     */
    data: XOR<SaleItemUpdateInput, SaleItemUncheckedUpdateInput>
    /**
     * Choose, which SaleItem to update.
     */
    where: SaleItemWhereUniqueInput
  }

  /**
   * SaleItem updateMany
   */
  export type SaleItemUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update SaleItems.
     */
    data: XOR<SaleItemUpdateManyMutationInput, SaleItemUncheckedUpdateManyInput>
    /**
     * Filter which SaleItems to update
     */
    where?: SaleItemWhereInput
    /**
     * Limit how many SaleItems to update.
     */
    limit?: number
  }

  /**
   * SaleItem upsert
   */
  export type SaleItemUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * The filter to search for the SaleItem to update in case it exists.
     */
    where: SaleItemWhereUniqueInput
    /**
     * In case the SaleItem found by the `where` argument doesn't exist, create a new SaleItem with this data.
     */
    create: XOR<SaleItemCreateInput, SaleItemUncheckedCreateInput>
    /**
     * In case the SaleItem was found with the provided `where` argument, update it with this data.
     */
    update: XOR<SaleItemUpdateInput, SaleItemUncheckedUpdateInput>
  }

  /**
   * SaleItem delete
   */
  export type SaleItemDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
    /**
     * Filter which SaleItem to delete.
     */
    where: SaleItemWhereUniqueInput
  }

  /**
   * SaleItem deleteMany
   */
  export type SaleItemDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SaleItems to delete
     */
    where?: SaleItemWhereInput
    /**
     * Limit how many SaleItems to delete.
     */
    limit?: number
  }

  /**
   * SaleItem.saleReturns
   */
  export type SaleItem$saleReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    where?: SaleReturnWhereInput
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    cursor?: SaleReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * SaleItem.createdByUser
   */
  export type SaleItem$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * SaleItem without action
   */
  export type SaleItemDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleItem
     */
    select?: SaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleItem
     */
    omit?: SaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleItemInclude<ExtArgs> | null
  }


  /**
   * Model CustomerReceipt
   */

  export type AggregateCustomerReceipt = {
    _count: CustomerReceiptCountAggregateOutputType | null
    _avg: CustomerReceiptAvgAggregateOutputType | null
    _sum: CustomerReceiptSumAggregateOutputType | null
    _min: CustomerReceiptMinAggregateOutputType | null
    _max: CustomerReceiptMaxAggregateOutputType | null
  }

  export type CustomerReceiptAvgAggregateOutputType = {
    id: number | null
    customerId: number | null
    amount: Decimal | null
    createdBy: number | null
  }

  export type CustomerReceiptSumAggregateOutputType = {
    id: bigint | null
    customerId: bigint | null
    amount: Decimal | null
    createdBy: bigint | null
  }

  export type CustomerReceiptMinAggregateOutputType = {
    id: bigint | null
    customerId: bigint | null
    receiptDate: Date | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    referenceNo: string | null
    remarks: string | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type CustomerReceiptMaxAggregateOutputType = {
    id: bigint | null
    customerId: bigint | null
    receiptDate: Date | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    referenceNo: string | null
    remarks: string | null
    isWhatsappMessageSent: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type CustomerReceiptCountAggregateOutputType = {
    id: number
    customerId: number
    receiptDate: number
    amount: number
    paymentMode: number
    referenceNo: number
    remarks: number
    isWhatsappMessageSent: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type CustomerReceiptAvgAggregateInputType = {
    id?: true
    customerId?: true
    amount?: true
    createdBy?: true
  }

  export type CustomerReceiptSumAggregateInputType = {
    id?: true
    customerId?: true
    amount?: true
    createdBy?: true
  }

  export type CustomerReceiptMinAggregateInputType = {
    id?: true
    customerId?: true
    receiptDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type CustomerReceiptMaxAggregateInputType = {
    id?: true
    customerId?: true
    receiptDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type CustomerReceiptCountAggregateInputType = {
    id?: true
    customerId?: true
    receiptDate?: true
    amount?: true
    paymentMode?: true
    referenceNo?: true
    remarks?: true
    isWhatsappMessageSent?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type CustomerReceiptAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CustomerReceipt to aggregate.
     */
    where?: CustomerReceiptWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CustomerReceipts to fetch.
     */
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: CustomerReceiptWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CustomerReceipts 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` CustomerReceipts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned CustomerReceipts
    **/
    _count?: true | CustomerReceiptCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: CustomerReceiptAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: CustomerReceiptSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: CustomerReceiptMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: CustomerReceiptMaxAggregateInputType
  }

  export type GetCustomerReceiptAggregateType<T extends CustomerReceiptAggregateArgs> = {
        [P in keyof T & keyof AggregateCustomerReceipt]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateCustomerReceipt[P]>
      : GetScalarType<T[P], AggregateCustomerReceipt[P]>
  }




  export type CustomerReceiptGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CustomerReceiptWhereInput
    orderBy?: CustomerReceiptOrderByWithAggregationInput | CustomerReceiptOrderByWithAggregationInput[]
    by: CustomerReceiptScalarFieldEnum[] | CustomerReceiptScalarFieldEnum
    having?: CustomerReceiptScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: CustomerReceiptCountAggregateInputType | true
    _avg?: CustomerReceiptAvgAggregateInputType
    _sum?: CustomerReceiptSumAggregateInputType
    _min?: CustomerReceiptMinAggregateInputType
    _max?: CustomerReceiptMaxAggregateInputType
  }

  export type CustomerReceiptGroupByOutputType = {
    id: bigint
    customerId: bigint
    receiptDate: Date
    amount: Decimal
    paymentMode: $Enums.PaymentMode
    referenceNo: string | null
    remarks: string | null
    isWhatsappMessageSent: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: CustomerReceiptCountAggregateOutputType | null
    _avg: CustomerReceiptAvgAggregateOutputType | null
    _sum: CustomerReceiptSumAggregateOutputType | null
    _min: CustomerReceiptMinAggregateOutputType | null
    _max: CustomerReceiptMaxAggregateOutputType | null
  }

  type GetCustomerReceiptGroupByPayload<T extends CustomerReceiptGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<CustomerReceiptGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof CustomerReceiptGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], CustomerReceiptGroupByOutputType[P]>
            : GetScalarType<T[P], CustomerReceiptGroupByOutputType[P]>
        }
      >
    >


  export type CustomerReceiptSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    customerId?: boolean
    receiptDate?: boolean
    amount?: boolean
    paymentMode?: boolean
    referenceNo?: boolean
    remarks?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    customer?: boolean | CustomerDefaultArgs<ExtArgs>
    createdByUser?: boolean | CustomerReceipt$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["customerReceipt"]>



  export type CustomerReceiptSelectScalar = {
    id?: boolean
    customerId?: boolean
    receiptDate?: boolean
    amount?: boolean
    paymentMode?: boolean
    referenceNo?: boolean
    remarks?: boolean
    isWhatsappMessageSent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type CustomerReceiptOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "customerId" | "receiptDate" | "amount" | "paymentMode" | "referenceNo" | "remarks" | "isWhatsappMessageSent" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["customerReceipt"]>
  export type CustomerReceiptInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    customer?: boolean | CustomerDefaultArgs<ExtArgs>
    createdByUser?: boolean | CustomerReceipt$createdByUserArgs<ExtArgs>
  }

  export type $CustomerReceiptPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "CustomerReceipt"
    objects: {
      customer: Prisma.$CustomerPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      customerId: bigint
      receiptDate: Date
      amount: Prisma.Decimal
      paymentMode: $Enums.PaymentMode
      referenceNo: string | null
      remarks: string | null
      isWhatsappMessageSent: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["customerReceipt"]>
    composites: {}
  }

  type CustomerReceiptGetPayload<S extends boolean | null | undefined | CustomerReceiptDefaultArgs> = $Result.GetResult<Prisma.$CustomerReceiptPayload, S>

  type CustomerReceiptCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<CustomerReceiptFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: CustomerReceiptCountAggregateInputType | true
    }

  export interface CustomerReceiptDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['CustomerReceipt'], meta: { name: 'CustomerReceipt' } }
    /**
     * Find zero or one CustomerReceipt that matches the filter.
     * @param {CustomerReceiptFindUniqueArgs} args - Arguments to find a CustomerReceipt
     * @example
     * // Get one CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends CustomerReceiptFindUniqueArgs>(args: SelectSubset<T, CustomerReceiptFindUniqueArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one CustomerReceipt that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {CustomerReceiptFindUniqueOrThrowArgs} args - Arguments to find a CustomerReceipt
     * @example
     * // Get one CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends CustomerReceiptFindUniqueOrThrowArgs>(args: SelectSubset<T, CustomerReceiptFindUniqueOrThrowArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CustomerReceipt 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 {CustomerReceiptFindFirstArgs} args - Arguments to find a CustomerReceipt
     * @example
     * // Get one CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends CustomerReceiptFindFirstArgs>(args?: SelectSubset<T, CustomerReceiptFindFirstArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CustomerReceipt 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 {CustomerReceiptFindFirstOrThrowArgs} args - Arguments to find a CustomerReceipt
     * @example
     * // Get one CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends CustomerReceiptFindFirstOrThrowArgs>(args?: SelectSubset<T, CustomerReceiptFindFirstOrThrowArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more CustomerReceipts 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 {CustomerReceiptFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all CustomerReceipts
     * const customerReceipts = await prisma.customerReceipt.findMany()
     * 
     * // Get first 10 CustomerReceipts
     * const customerReceipts = await prisma.customerReceipt.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const customerReceiptWithIdOnly = await prisma.customerReceipt.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends CustomerReceiptFindManyArgs>(args?: SelectSubset<T, CustomerReceiptFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a CustomerReceipt.
     * @param {CustomerReceiptCreateArgs} args - Arguments to create a CustomerReceipt.
     * @example
     * // Create one CustomerReceipt
     * const CustomerReceipt = await prisma.customerReceipt.create({
     *   data: {
     *     // ... data to create a CustomerReceipt
     *   }
     * })
     * 
     */
    create<T extends CustomerReceiptCreateArgs>(args: SelectSubset<T, CustomerReceiptCreateArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many CustomerReceipts.
     * @param {CustomerReceiptCreateManyArgs} args - Arguments to create many CustomerReceipts.
     * @example
     * // Create many CustomerReceipts
     * const customerReceipt = await prisma.customerReceipt.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends CustomerReceiptCreateManyArgs>(args?: SelectSubset<T, CustomerReceiptCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a CustomerReceipt.
     * @param {CustomerReceiptDeleteArgs} args - Arguments to delete one CustomerReceipt.
     * @example
     * // Delete one CustomerReceipt
     * const CustomerReceipt = await prisma.customerReceipt.delete({
     *   where: {
     *     // ... filter to delete one CustomerReceipt
     *   }
     * })
     * 
     */
    delete<T extends CustomerReceiptDeleteArgs>(args: SelectSubset<T, CustomerReceiptDeleteArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one CustomerReceipt.
     * @param {CustomerReceiptUpdateArgs} args - Arguments to update one CustomerReceipt.
     * @example
     * // Update one CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends CustomerReceiptUpdateArgs>(args: SelectSubset<T, CustomerReceiptUpdateArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more CustomerReceipts.
     * @param {CustomerReceiptDeleteManyArgs} args - Arguments to filter CustomerReceipts to delete.
     * @example
     * // Delete a few CustomerReceipts
     * const { count } = await prisma.customerReceipt.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends CustomerReceiptDeleteManyArgs>(args?: SelectSubset<T, CustomerReceiptDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more CustomerReceipts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerReceiptUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many CustomerReceipts
     * const customerReceipt = await prisma.customerReceipt.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends CustomerReceiptUpdateManyArgs>(args: SelectSubset<T, CustomerReceiptUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one CustomerReceipt.
     * @param {CustomerReceiptUpsertArgs} args - Arguments to update or create a CustomerReceipt.
     * @example
     * // Update or create a CustomerReceipt
     * const customerReceipt = await prisma.customerReceipt.upsert({
     *   create: {
     *     // ... data to create a CustomerReceipt
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the CustomerReceipt we want to update
     *   }
     * })
     */
    upsert<T extends CustomerReceiptUpsertArgs>(args: SelectSubset<T, CustomerReceiptUpsertArgs<ExtArgs>>): Prisma__CustomerReceiptClient<$Result.GetResult<Prisma.$CustomerReceiptPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of CustomerReceipts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerReceiptCountArgs} args - Arguments to filter CustomerReceipts to count.
     * @example
     * // Count the number of CustomerReceipts
     * const count = await prisma.customerReceipt.count({
     *   where: {
     *     // ... the filter for the CustomerReceipts we want to count
     *   }
     * })
    **/
    count<T extends CustomerReceiptCountArgs>(
      args?: Subset<T, CustomerReceiptCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], CustomerReceiptCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a CustomerReceipt.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerReceiptAggregateArgs} 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 CustomerReceiptAggregateArgs>(args: Subset<T, CustomerReceiptAggregateArgs>): Prisma.PrismaPromise<GetCustomerReceiptAggregateType<T>>

    /**
     * Group by CustomerReceipt.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CustomerReceiptGroupByArgs} 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 CustomerReceiptGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: CustomerReceiptGroupByArgs['orderBy'] }
        : { orderBy?: CustomerReceiptGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, CustomerReceiptGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCustomerReceiptGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the CustomerReceipt model
   */
  readonly fields: CustomerReceiptFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for CustomerReceipt.
   * 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__CustomerReceiptClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    customer<T extends CustomerDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CustomerDefaultArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends CustomerReceipt$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, CustomerReceipt$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the CustomerReceipt model
   */
  interface CustomerReceiptFieldRefs {
    readonly id: FieldRef<"CustomerReceipt", 'BigInt'>
    readonly customerId: FieldRef<"CustomerReceipt", 'BigInt'>
    readonly receiptDate: FieldRef<"CustomerReceipt", 'DateTime'>
    readonly amount: FieldRef<"CustomerReceipt", 'Decimal'>
    readonly paymentMode: FieldRef<"CustomerReceipt", 'PaymentMode'>
    readonly referenceNo: FieldRef<"CustomerReceipt", 'String'>
    readonly remarks: FieldRef<"CustomerReceipt", 'String'>
    readonly isWhatsappMessageSent: FieldRef<"CustomerReceipt", 'Boolean'>
    readonly createdAt: FieldRef<"CustomerReceipt", 'DateTime'>
    readonly updatedAt: FieldRef<"CustomerReceipt", 'DateTime'>
    readonly deletedAt: FieldRef<"CustomerReceipt", 'DateTime'>
    readonly createdBy: FieldRef<"CustomerReceipt", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * CustomerReceipt findUnique
   */
  export type CustomerReceiptFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter, which CustomerReceipt to fetch.
     */
    where: CustomerReceiptWhereUniqueInput
  }

  /**
   * CustomerReceipt findUniqueOrThrow
   */
  export type CustomerReceiptFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter, which CustomerReceipt to fetch.
     */
    where: CustomerReceiptWhereUniqueInput
  }

  /**
   * CustomerReceipt findFirst
   */
  export type CustomerReceiptFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter, which CustomerReceipt to fetch.
     */
    where?: CustomerReceiptWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CustomerReceipts to fetch.
     */
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CustomerReceipts.
     */
    cursor?: CustomerReceiptWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CustomerReceipts 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` CustomerReceipts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CustomerReceipts.
     */
    distinct?: CustomerReceiptScalarFieldEnum | CustomerReceiptScalarFieldEnum[]
  }

  /**
   * CustomerReceipt findFirstOrThrow
   */
  export type CustomerReceiptFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter, which CustomerReceipt to fetch.
     */
    where?: CustomerReceiptWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CustomerReceipts to fetch.
     */
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CustomerReceipts.
     */
    cursor?: CustomerReceiptWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CustomerReceipts 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` CustomerReceipts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CustomerReceipts.
     */
    distinct?: CustomerReceiptScalarFieldEnum | CustomerReceiptScalarFieldEnum[]
  }

  /**
   * CustomerReceipt findMany
   */
  export type CustomerReceiptFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter, which CustomerReceipts to fetch.
     */
    where?: CustomerReceiptWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CustomerReceipts to fetch.
     */
    orderBy?: CustomerReceiptOrderByWithRelationInput | CustomerReceiptOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing CustomerReceipts.
     */
    cursor?: CustomerReceiptWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CustomerReceipts 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` CustomerReceipts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CustomerReceipts.
     */
    distinct?: CustomerReceiptScalarFieldEnum | CustomerReceiptScalarFieldEnum[]
  }

  /**
   * CustomerReceipt create
   */
  export type CustomerReceiptCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * The data needed to create a CustomerReceipt.
     */
    data: XOR<CustomerReceiptCreateInput, CustomerReceiptUncheckedCreateInput>
  }

  /**
   * CustomerReceipt createMany
   */
  export type CustomerReceiptCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many CustomerReceipts.
     */
    data: CustomerReceiptCreateManyInput | CustomerReceiptCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * CustomerReceipt update
   */
  export type CustomerReceiptUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * The data needed to update a CustomerReceipt.
     */
    data: XOR<CustomerReceiptUpdateInput, CustomerReceiptUncheckedUpdateInput>
    /**
     * Choose, which CustomerReceipt to update.
     */
    where: CustomerReceiptWhereUniqueInput
  }

  /**
   * CustomerReceipt updateMany
   */
  export type CustomerReceiptUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update CustomerReceipts.
     */
    data: XOR<CustomerReceiptUpdateManyMutationInput, CustomerReceiptUncheckedUpdateManyInput>
    /**
     * Filter which CustomerReceipts to update
     */
    where?: CustomerReceiptWhereInput
    /**
     * Limit how many CustomerReceipts to update.
     */
    limit?: number
  }

  /**
   * CustomerReceipt upsert
   */
  export type CustomerReceiptUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * The filter to search for the CustomerReceipt to update in case it exists.
     */
    where: CustomerReceiptWhereUniqueInput
    /**
     * In case the CustomerReceipt found by the `where` argument doesn't exist, create a new CustomerReceipt with this data.
     */
    create: XOR<CustomerReceiptCreateInput, CustomerReceiptUncheckedCreateInput>
    /**
     * In case the CustomerReceipt was found with the provided `where` argument, update it with this data.
     */
    update: XOR<CustomerReceiptUpdateInput, CustomerReceiptUncheckedUpdateInput>
  }

  /**
   * CustomerReceipt delete
   */
  export type CustomerReceiptDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
    /**
     * Filter which CustomerReceipt to delete.
     */
    where: CustomerReceiptWhereUniqueInput
  }

  /**
   * CustomerReceipt deleteMany
   */
  export type CustomerReceiptDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CustomerReceipts to delete
     */
    where?: CustomerReceiptWhereInput
    /**
     * Limit how many CustomerReceipts to delete.
     */
    limit?: number
  }

  /**
   * CustomerReceipt.createdByUser
   */
  export type CustomerReceipt$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * CustomerReceipt without action
   */
  export type CustomerReceiptDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CustomerReceipt
     */
    select?: CustomerReceiptSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CustomerReceipt
     */
    omit?: CustomerReceiptOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerReceiptInclude<ExtArgs> | null
  }


  /**
   * Model Expense
   */

  export type AggregateExpense = {
    _count: ExpenseCountAggregateOutputType | null
    _avg: ExpenseAvgAggregateOutputType | null
    _sum: ExpenseSumAggregateOutputType | null
    _min: ExpenseMinAggregateOutputType | null
    _max: ExpenseMaxAggregateOutputType | null
  }

  export type ExpenseAvgAggregateOutputType = {
    id: number | null
    amount: Decimal | null
    purchaseId: number | null
    createdBy: number | null
  }

  export type ExpenseSumAggregateOutputType = {
    id: number | null
    amount: Decimal | null
    purchaseId: bigint | null
    createdBy: bigint | null
  }

  export type ExpenseMinAggregateOutputType = {
    id: number | null
    expenseDate: Date | null
    category: string | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    remarks: string | null
    purchaseId: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ExpenseMaxAggregateOutputType = {
    id: number | null
    expenseDate: Date | null
    category: string | null
    amount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    remarks: string | null
    purchaseId: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ExpenseCountAggregateOutputType = {
    id: number
    expenseDate: number
    category: number
    amount: number
    paymentMode: number
    remarks: number
    purchaseId: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type ExpenseAvgAggregateInputType = {
    id?: true
    amount?: true
    purchaseId?: true
    createdBy?: true
  }

  export type ExpenseSumAggregateInputType = {
    id?: true
    amount?: true
    purchaseId?: true
    createdBy?: true
  }

  export type ExpenseMinAggregateInputType = {
    id?: true
    expenseDate?: true
    category?: true
    amount?: true
    paymentMode?: true
    remarks?: true
    purchaseId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ExpenseMaxAggregateInputType = {
    id?: true
    expenseDate?: true
    category?: true
    amount?: true
    paymentMode?: true
    remarks?: true
    purchaseId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ExpenseCountAggregateInputType = {
    id?: true
    expenseDate?: true
    category?: true
    amount?: true
    paymentMode?: true
    remarks?: true
    purchaseId?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type ExpenseAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Expense to aggregate.
     */
    where?: ExpenseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Expenses to fetch.
     */
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ExpenseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Expenses 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` Expenses.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Expenses
    **/
    _count?: true | ExpenseCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ExpenseAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ExpenseSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ExpenseMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ExpenseMaxAggregateInputType
  }

  export type GetExpenseAggregateType<T extends ExpenseAggregateArgs> = {
        [P in keyof T & keyof AggregateExpense]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateExpense[P]>
      : GetScalarType<T[P], AggregateExpense[P]>
  }




  export type ExpenseGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ExpenseWhereInput
    orderBy?: ExpenseOrderByWithAggregationInput | ExpenseOrderByWithAggregationInput[]
    by: ExpenseScalarFieldEnum[] | ExpenseScalarFieldEnum
    having?: ExpenseScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ExpenseCountAggregateInputType | true
    _avg?: ExpenseAvgAggregateInputType
    _sum?: ExpenseSumAggregateInputType
    _min?: ExpenseMinAggregateInputType
    _max?: ExpenseMaxAggregateInputType
  }

  export type ExpenseGroupByOutputType = {
    id: number
    expenseDate: Date
    category: string
    amount: Decimal
    paymentMode: $Enums.PaymentMode
    remarks: string | null
    purchaseId: bigint | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: ExpenseCountAggregateOutputType | null
    _avg: ExpenseAvgAggregateOutputType | null
    _sum: ExpenseSumAggregateOutputType | null
    _min: ExpenseMinAggregateOutputType | null
    _max: ExpenseMaxAggregateOutputType | null
  }

  type GetExpenseGroupByPayload<T extends ExpenseGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ExpenseGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ExpenseGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ExpenseGroupByOutputType[P]>
            : GetScalarType<T[P], ExpenseGroupByOutputType[P]>
        }
      >
    >


  export type ExpenseSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    expenseDate?: boolean
    category?: boolean
    amount?: boolean
    paymentMode?: boolean
    remarks?: boolean
    purchaseId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | Expense$purchaseArgs<ExtArgs>
    createdByUser?: boolean | Expense$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["expense"]>



  export type ExpenseSelectScalar = {
    id?: boolean
    expenseDate?: boolean
    category?: boolean
    amount?: boolean
    paymentMode?: boolean
    remarks?: boolean
    purchaseId?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type ExpenseOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "expenseDate" | "category" | "amount" | "paymentMode" | "remarks" | "purchaseId" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["expense"]>
  export type ExpenseInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | Expense$purchaseArgs<ExtArgs>
    createdByUser?: boolean | Expense$createdByUserArgs<ExtArgs>
  }

  export type $ExpensePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Expense"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs> | null
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      expenseDate: Date
      category: string
      amount: Prisma.Decimal
      paymentMode: $Enums.PaymentMode
      remarks: string | null
      purchaseId: bigint | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["expense"]>
    composites: {}
  }

  type ExpenseGetPayload<S extends boolean | null | undefined | ExpenseDefaultArgs> = $Result.GetResult<Prisma.$ExpensePayload, S>

  type ExpenseCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ExpenseFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ExpenseCountAggregateInputType | true
    }

  export interface ExpenseDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Expense'], meta: { name: 'Expense' } }
    /**
     * Find zero or one Expense that matches the filter.
     * @param {ExpenseFindUniqueArgs} args - Arguments to find a Expense
     * @example
     * // Get one Expense
     * const expense = await prisma.expense.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ExpenseFindUniqueArgs>(args: SelectSubset<T, ExpenseFindUniqueArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Expense that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ExpenseFindUniqueOrThrowArgs} args - Arguments to find a Expense
     * @example
     * // Get one Expense
     * const expense = await prisma.expense.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ExpenseFindUniqueOrThrowArgs>(args: SelectSubset<T, ExpenseFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Expense 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 {ExpenseFindFirstArgs} args - Arguments to find a Expense
     * @example
     * // Get one Expense
     * const expense = await prisma.expense.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ExpenseFindFirstArgs>(args?: SelectSubset<T, ExpenseFindFirstArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Expense 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 {ExpenseFindFirstOrThrowArgs} args - Arguments to find a Expense
     * @example
     * // Get one Expense
     * const expense = await prisma.expense.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ExpenseFindFirstOrThrowArgs>(args?: SelectSubset<T, ExpenseFindFirstOrThrowArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Expenses 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 {ExpenseFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Expenses
     * const expenses = await prisma.expense.findMany()
     * 
     * // Get first 10 Expenses
     * const expenses = await prisma.expense.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const expenseWithIdOnly = await prisma.expense.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ExpenseFindManyArgs>(args?: SelectSubset<T, ExpenseFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Expense.
     * @param {ExpenseCreateArgs} args - Arguments to create a Expense.
     * @example
     * // Create one Expense
     * const Expense = await prisma.expense.create({
     *   data: {
     *     // ... data to create a Expense
     *   }
     * })
     * 
     */
    create<T extends ExpenseCreateArgs>(args: SelectSubset<T, ExpenseCreateArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Expenses.
     * @param {ExpenseCreateManyArgs} args - Arguments to create many Expenses.
     * @example
     * // Create many Expenses
     * const expense = await prisma.expense.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ExpenseCreateManyArgs>(args?: SelectSubset<T, ExpenseCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Expense.
     * @param {ExpenseDeleteArgs} args - Arguments to delete one Expense.
     * @example
     * // Delete one Expense
     * const Expense = await prisma.expense.delete({
     *   where: {
     *     // ... filter to delete one Expense
     *   }
     * })
     * 
     */
    delete<T extends ExpenseDeleteArgs>(args: SelectSubset<T, ExpenseDeleteArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Expense.
     * @param {ExpenseUpdateArgs} args - Arguments to update one Expense.
     * @example
     * // Update one Expense
     * const expense = await prisma.expense.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ExpenseUpdateArgs>(args: SelectSubset<T, ExpenseUpdateArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Expenses.
     * @param {ExpenseDeleteManyArgs} args - Arguments to filter Expenses to delete.
     * @example
     * // Delete a few Expenses
     * const { count } = await prisma.expense.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ExpenseDeleteManyArgs>(args?: SelectSubset<T, ExpenseDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Expenses.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ExpenseUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Expenses
     * const expense = await prisma.expense.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ExpenseUpdateManyArgs>(args: SelectSubset<T, ExpenseUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Expense.
     * @param {ExpenseUpsertArgs} args - Arguments to update or create a Expense.
     * @example
     * // Update or create a Expense
     * const expense = await prisma.expense.upsert({
     *   create: {
     *     // ... data to create a Expense
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Expense we want to update
     *   }
     * })
     */
    upsert<T extends ExpenseUpsertArgs>(args: SelectSubset<T, ExpenseUpsertArgs<ExtArgs>>): Prisma__ExpenseClient<$Result.GetResult<Prisma.$ExpensePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Expenses.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ExpenseCountArgs} args - Arguments to filter Expenses to count.
     * @example
     * // Count the number of Expenses
     * const count = await prisma.expense.count({
     *   where: {
     *     // ... the filter for the Expenses we want to count
     *   }
     * })
    **/
    count<T extends ExpenseCountArgs>(
      args?: Subset<T, ExpenseCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ExpenseCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Expense.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ExpenseAggregateArgs} 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 ExpenseAggregateArgs>(args: Subset<T, ExpenseAggregateArgs>): Prisma.PrismaPromise<GetExpenseAggregateType<T>>

    /**
     * Group by Expense.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ExpenseGroupByArgs} 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 ExpenseGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ExpenseGroupByArgs['orderBy'] }
        : { orderBy?: ExpenseGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ExpenseGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetExpenseGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Expense model
   */
  readonly fields: ExpenseFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Expense.
   * 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__ExpenseClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends Expense$purchaseArgs<ExtArgs> = {}>(args?: Subset<T, Expense$purchaseArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends Expense$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Expense$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Expense model
   */
  interface ExpenseFieldRefs {
    readonly id: FieldRef<"Expense", 'Int'>
    readonly expenseDate: FieldRef<"Expense", 'DateTime'>
    readonly category: FieldRef<"Expense", 'String'>
    readonly amount: FieldRef<"Expense", 'Decimal'>
    readonly paymentMode: FieldRef<"Expense", 'PaymentMode'>
    readonly remarks: FieldRef<"Expense", 'String'>
    readonly purchaseId: FieldRef<"Expense", 'BigInt'>
    readonly createdAt: FieldRef<"Expense", 'DateTime'>
    readonly updatedAt: FieldRef<"Expense", 'DateTime'>
    readonly createdBy: FieldRef<"Expense", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Expense findUnique
   */
  export type ExpenseFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter, which Expense to fetch.
     */
    where: ExpenseWhereUniqueInput
  }

  /**
   * Expense findUniqueOrThrow
   */
  export type ExpenseFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter, which Expense to fetch.
     */
    where: ExpenseWhereUniqueInput
  }

  /**
   * Expense findFirst
   */
  export type ExpenseFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter, which Expense to fetch.
     */
    where?: ExpenseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Expenses to fetch.
     */
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Expenses.
     */
    cursor?: ExpenseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Expenses 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` Expenses.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Expenses.
     */
    distinct?: ExpenseScalarFieldEnum | ExpenseScalarFieldEnum[]
  }

  /**
   * Expense findFirstOrThrow
   */
  export type ExpenseFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter, which Expense to fetch.
     */
    where?: ExpenseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Expenses to fetch.
     */
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Expenses.
     */
    cursor?: ExpenseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Expenses 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` Expenses.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Expenses.
     */
    distinct?: ExpenseScalarFieldEnum | ExpenseScalarFieldEnum[]
  }

  /**
   * Expense findMany
   */
  export type ExpenseFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter, which Expenses to fetch.
     */
    where?: ExpenseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Expenses to fetch.
     */
    orderBy?: ExpenseOrderByWithRelationInput | ExpenseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Expenses.
     */
    cursor?: ExpenseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Expenses 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` Expenses.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Expenses.
     */
    distinct?: ExpenseScalarFieldEnum | ExpenseScalarFieldEnum[]
  }

  /**
   * Expense create
   */
  export type ExpenseCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * The data needed to create a Expense.
     */
    data: XOR<ExpenseCreateInput, ExpenseUncheckedCreateInput>
  }

  /**
   * Expense createMany
   */
  export type ExpenseCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Expenses.
     */
    data: ExpenseCreateManyInput | ExpenseCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Expense update
   */
  export type ExpenseUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * The data needed to update a Expense.
     */
    data: XOR<ExpenseUpdateInput, ExpenseUncheckedUpdateInput>
    /**
     * Choose, which Expense to update.
     */
    where: ExpenseWhereUniqueInput
  }

  /**
   * Expense updateMany
   */
  export type ExpenseUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Expenses.
     */
    data: XOR<ExpenseUpdateManyMutationInput, ExpenseUncheckedUpdateManyInput>
    /**
     * Filter which Expenses to update
     */
    where?: ExpenseWhereInput
    /**
     * Limit how many Expenses to update.
     */
    limit?: number
  }

  /**
   * Expense upsert
   */
  export type ExpenseUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * The filter to search for the Expense to update in case it exists.
     */
    where: ExpenseWhereUniqueInput
    /**
     * In case the Expense found by the `where` argument doesn't exist, create a new Expense with this data.
     */
    create: XOR<ExpenseCreateInput, ExpenseUncheckedCreateInput>
    /**
     * In case the Expense was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ExpenseUpdateInput, ExpenseUncheckedUpdateInput>
  }

  /**
   * Expense delete
   */
  export type ExpenseDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
    /**
     * Filter which Expense to delete.
     */
    where: ExpenseWhereUniqueInput
  }

  /**
   * Expense deleteMany
   */
  export type ExpenseDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Expenses to delete
     */
    where?: ExpenseWhereInput
    /**
     * Limit how many Expenses to delete.
     */
    limit?: number
  }

  /**
   * Expense.purchase
   */
  export type Expense$purchaseArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Purchase
     */
    select?: PurchaseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Purchase
     */
    omit?: PurchaseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseInclude<ExtArgs> | null
    where?: PurchaseWhereInput
  }

  /**
   * Expense.createdByUser
   */
  export type Expense$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Expense without action
   */
  export type ExpenseDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Expense
     */
    select?: ExpenseSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Expense
     */
    omit?: ExpenseOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ExpenseInclude<ExtArgs> | null
  }


  /**
   * Model ForgotPassword
   */

  export type AggregateForgotPassword = {
    _count: ForgotPasswordCountAggregateOutputType | null
    _avg: ForgotPasswordAvgAggregateOutputType | null
    _sum: ForgotPasswordSumAggregateOutputType | null
    _min: ForgotPasswordMinAggregateOutputType | null
    _max: ForgotPasswordMaxAggregateOutputType | null
  }

  export type ForgotPasswordAvgAggregateOutputType = {
    userId: number | null
    attempts: number | null
  }

  export type ForgotPasswordSumAggregateOutputType = {
    userId: bigint | null
    attempts: number | null
  }

  export type ForgotPasswordMinAggregateOutputType = {
    userId: bigint | null
    otp: string | null
    expiresAt: Date | null
    attempts: number | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ForgotPasswordMaxAggregateOutputType = {
    userId: bigint | null
    otp: string | null
    expiresAt: Date | null
    attempts: number | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ForgotPasswordCountAggregateOutputType = {
    userId: number
    otp: number
    expiresAt: number
    attempts: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type ForgotPasswordAvgAggregateInputType = {
    userId?: true
    attempts?: true
  }

  export type ForgotPasswordSumAggregateInputType = {
    userId?: true
    attempts?: true
  }

  export type ForgotPasswordMinAggregateInputType = {
    userId?: true
    otp?: true
    expiresAt?: true
    attempts?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ForgotPasswordMaxAggregateInputType = {
    userId?: true
    otp?: true
    expiresAt?: true
    attempts?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ForgotPasswordCountAggregateInputType = {
    userId?: true
    otp?: true
    expiresAt?: true
    attempts?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type ForgotPasswordAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ForgotPassword to aggregate.
     */
    where?: ForgotPasswordWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ForgotPasswords to fetch.
     */
    orderBy?: ForgotPasswordOrderByWithRelationInput | ForgotPasswordOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ForgotPasswordWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ForgotPasswords 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` ForgotPasswords.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned ForgotPasswords
    **/
    _count?: true | ForgotPasswordCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ForgotPasswordAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ForgotPasswordSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ForgotPasswordMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ForgotPasswordMaxAggregateInputType
  }

  export type GetForgotPasswordAggregateType<T extends ForgotPasswordAggregateArgs> = {
        [P in keyof T & keyof AggregateForgotPassword]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateForgotPassword[P]>
      : GetScalarType<T[P], AggregateForgotPassword[P]>
  }




  export type ForgotPasswordGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ForgotPasswordWhereInput
    orderBy?: ForgotPasswordOrderByWithAggregationInput | ForgotPasswordOrderByWithAggregationInput[]
    by: ForgotPasswordScalarFieldEnum[] | ForgotPasswordScalarFieldEnum
    having?: ForgotPasswordScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ForgotPasswordCountAggregateInputType | true
    _avg?: ForgotPasswordAvgAggregateInputType
    _sum?: ForgotPasswordSumAggregateInputType
    _min?: ForgotPasswordMinAggregateInputType
    _max?: ForgotPasswordMaxAggregateInputType
  }

  export type ForgotPasswordGroupByOutputType = {
    userId: bigint
    otp: string
    expiresAt: Date
    attempts: number
    createdAt: Date
    updatedAt: Date
    _count: ForgotPasswordCountAggregateOutputType | null
    _avg: ForgotPasswordAvgAggregateOutputType | null
    _sum: ForgotPasswordSumAggregateOutputType | null
    _min: ForgotPasswordMinAggregateOutputType | null
    _max: ForgotPasswordMaxAggregateOutputType | null
  }

  type GetForgotPasswordGroupByPayload<T extends ForgotPasswordGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ForgotPasswordGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ForgotPasswordGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ForgotPasswordGroupByOutputType[P]>
            : GetScalarType<T[P], ForgotPasswordGroupByOutputType[P]>
        }
      >
    >


  export type ForgotPasswordSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    userId?: boolean
    otp?: boolean
    expiresAt?: boolean
    attempts?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    user?: boolean | UserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["forgotPassword"]>



  export type ForgotPasswordSelectScalar = {
    userId?: boolean
    otp?: boolean
    expiresAt?: boolean
    attempts?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type ForgotPasswordOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"userId" | "otp" | "expiresAt" | "attempts" | "createdAt" | "updatedAt", ExtArgs["result"]["forgotPassword"]>
  export type ForgotPasswordInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    user?: boolean | UserDefaultArgs<ExtArgs>
  }

  export type $ForgotPasswordPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "ForgotPassword"
    objects: {
      user: Prisma.$UserPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      userId: bigint
      otp: string
      expiresAt: Date
      attempts: number
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["forgotPassword"]>
    composites: {}
  }

  type ForgotPasswordGetPayload<S extends boolean | null | undefined | ForgotPasswordDefaultArgs> = $Result.GetResult<Prisma.$ForgotPasswordPayload, S>

  type ForgotPasswordCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ForgotPasswordFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ForgotPasswordCountAggregateInputType | true
    }

  export interface ForgotPasswordDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ForgotPassword'], meta: { name: 'ForgotPassword' } }
    /**
     * Find zero or one ForgotPassword that matches the filter.
     * @param {ForgotPasswordFindUniqueArgs} args - Arguments to find a ForgotPassword
     * @example
     * // Get one ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ForgotPasswordFindUniqueArgs>(args: SelectSubset<T, ForgotPasswordFindUniqueArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one ForgotPassword that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ForgotPasswordFindUniqueOrThrowArgs} args - Arguments to find a ForgotPassword
     * @example
     * // Get one ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ForgotPasswordFindUniqueOrThrowArgs>(args: SelectSubset<T, ForgotPasswordFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ForgotPassword 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 {ForgotPasswordFindFirstArgs} args - Arguments to find a ForgotPassword
     * @example
     * // Get one ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ForgotPasswordFindFirstArgs>(args?: SelectSubset<T, ForgotPasswordFindFirstArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ForgotPassword 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 {ForgotPasswordFindFirstOrThrowArgs} args - Arguments to find a ForgotPassword
     * @example
     * // Get one ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ForgotPasswordFindFirstOrThrowArgs>(args?: SelectSubset<T, ForgotPasswordFindFirstOrThrowArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more ForgotPasswords 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 {ForgotPasswordFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all ForgotPasswords
     * const forgotPasswords = await prisma.forgotPassword.findMany()
     * 
     * // Get first 10 ForgotPasswords
     * const forgotPasswords = await prisma.forgotPassword.findMany({ take: 10 })
     * 
     * // Only select the `userId`
     * const forgotPasswordWithUserIdOnly = await prisma.forgotPassword.findMany({ select: { userId: true } })
     * 
     */
    findMany<T extends ForgotPasswordFindManyArgs>(args?: SelectSubset<T, ForgotPasswordFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a ForgotPassword.
     * @param {ForgotPasswordCreateArgs} args - Arguments to create a ForgotPassword.
     * @example
     * // Create one ForgotPassword
     * const ForgotPassword = await prisma.forgotPassword.create({
     *   data: {
     *     // ... data to create a ForgotPassword
     *   }
     * })
     * 
     */
    create<T extends ForgotPasswordCreateArgs>(args: SelectSubset<T, ForgotPasswordCreateArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many ForgotPasswords.
     * @param {ForgotPasswordCreateManyArgs} args - Arguments to create many ForgotPasswords.
     * @example
     * // Create many ForgotPasswords
     * const forgotPassword = await prisma.forgotPassword.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ForgotPasswordCreateManyArgs>(args?: SelectSubset<T, ForgotPasswordCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a ForgotPassword.
     * @param {ForgotPasswordDeleteArgs} args - Arguments to delete one ForgotPassword.
     * @example
     * // Delete one ForgotPassword
     * const ForgotPassword = await prisma.forgotPassword.delete({
     *   where: {
     *     // ... filter to delete one ForgotPassword
     *   }
     * })
     * 
     */
    delete<T extends ForgotPasswordDeleteArgs>(args: SelectSubset<T, ForgotPasswordDeleteArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one ForgotPassword.
     * @param {ForgotPasswordUpdateArgs} args - Arguments to update one ForgotPassword.
     * @example
     * // Update one ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ForgotPasswordUpdateArgs>(args: SelectSubset<T, ForgotPasswordUpdateArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more ForgotPasswords.
     * @param {ForgotPasswordDeleteManyArgs} args - Arguments to filter ForgotPasswords to delete.
     * @example
     * // Delete a few ForgotPasswords
     * const { count } = await prisma.forgotPassword.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ForgotPasswordDeleteManyArgs>(args?: SelectSubset<T, ForgotPasswordDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more ForgotPasswords.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ForgotPasswordUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many ForgotPasswords
     * const forgotPassword = await prisma.forgotPassword.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ForgotPasswordUpdateManyArgs>(args: SelectSubset<T, ForgotPasswordUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one ForgotPassword.
     * @param {ForgotPasswordUpsertArgs} args - Arguments to update or create a ForgotPassword.
     * @example
     * // Update or create a ForgotPassword
     * const forgotPassword = await prisma.forgotPassword.upsert({
     *   create: {
     *     // ... data to create a ForgotPassword
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the ForgotPassword we want to update
     *   }
     * })
     */
    upsert<T extends ForgotPasswordUpsertArgs>(args: SelectSubset<T, ForgotPasswordUpsertArgs<ExtArgs>>): Prisma__ForgotPasswordClient<$Result.GetResult<Prisma.$ForgotPasswordPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of ForgotPasswords.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ForgotPasswordCountArgs} args - Arguments to filter ForgotPasswords to count.
     * @example
     * // Count the number of ForgotPasswords
     * const count = await prisma.forgotPassword.count({
     *   where: {
     *     // ... the filter for the ForgotPasswords we want to count
     *   }
     * })
    **/
    count<T extends ForgotPasswordCountArgs>(
      args?: Subset<T, ForgotPasswordCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ForgotPasswordCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a ForgotPassword.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ForgotPasswordAggregateArgs} 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 ForgotPasswordAggregateArgs>(args: Subset<T, ForgotPasswordAggregateArgs>): Prisma.PrismaPromise<GetForgotPasswordAggregateType<T>>

    /**
     * Group by ForgotPassword.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ForgotPasswordGroupByArgs} 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 ForgotPasswordGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ForgotPasswordGroupByArgs['orderBy'] }
        : { orderBy?: ForgotPasswordGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ForgotPasswordGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetForgotPasswordGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the ForgotPassword model
   */
  readonly fields: ForgotPasswordFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for ForgotPassword.
   * 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__ForgotPasswordClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the ForgotPassword model
   */
  interface ForgotPasswordFieldRefs {
    readonly userId: FieldRef<"ForgotPassword", 'BigInt'>
    readonly otp: FieldRef<"ForgotPassword", 'String'>
    readonly expiresAt: FieldRef<"ForgotPassword", 'DateTime'>
    readonly attempts: FieldRef<"ForgotPassword", 'Int'>
    readonly createdAt: FieldRef<"ForgotPassword", 'DateTime'>
    readonly updatedAt: FieldRef<"ForgotPassword", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * ForgotPassword findUnique
   */
  export type ForgotPasswordFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter, which ForgotPassword to fetch.
     */
    where: ForgotPasswordWhereUniqueInput
  }

  /**
   * ForgotPassword findUniqueOrThrow
   */
  export type ForgotPasswordFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter, which ForgotPassword to fetch.
     */
    where: ForgotPasswordWhereUniqueInput
  }

  /**
   * ForgotPassword findFirst
   */
  export type ForgotPasswordFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter, which ForgotPassword to fetch.
     */
    where?: ForgotPasswordWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ForgotPasswords to fetch.
     */
    orderBy?: ForgotPasswordOrderByWithRelationInput | ForgotPasswordOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ForgotPasswords.
     */
    cursor?: ForgotPasswordWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ForgotPasswords 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` ForgotPasswords.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ForgotPasswords.
     */
    distinct?: ForgotPasswordScalarFieldEnum | ForgotPasswordScalarFieldEnum[]
  }

  /**
   * ForgotPassword findFirstOrThrow
   */
  export type ForgotPasswordFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter, which ForgotPassword to fetch.
     */
    where?: ForgotPasswordWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ForgotPasswords to fetch.
     */
    orderBy?: ForgotPasswordOrderByWithRelationInput | ForgotPasswordOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ForgotPasswords.
     */
    cursor?: ForgotPasswordWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ForgotPasswords 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` ForgotPasswords.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ForgotPasswords.
     */
    distinct?: ForgotPasswordScalarFieldEnum | ForgotPasswordScalarFieldEnum[]
  }

  /**
   * ForgotPassword findMany
   */
  export type ForgotPasswordFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter, which ForgotPasswords to fetch.
     */
    where?: ForgotPasswordWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ForgotPasswords to fetch.
     */
    orderBy?: ForgotPasswordOrderByWithRelationInput | ForgotPasswordOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing ForgotPasswords.
     */
    cursor?: ForgotPasswordWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ForgotPasswords 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` ForgotPasswords.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ForgotPasswords.
     */
    distinct?: ForgotPasswordScalarFieldEnum | ForgotPasswordScalarFieldEnum[]
  }

  /**
   * ForgotPassword create
   */
  export type ForgotPasswordCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * The data needed to create a ForgotPassword.
     */
    data: XOR<ForgotPasswordCreateInput, ForgotPasswordUncheckedCreateInput>
  }

  /**
   * ForgotPassword createMany
   */
  export type ForgotPasswordCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many ForgotPasswords.
     */
    data: ForgotPasswordCreateManyInput | ForgotPasswordCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * ForgotPassword update
   */
  export type ForgotPasswordUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * The data needed to update a ForgotPassword.
     */
    data: XOR<ForgotPasswordUpdateInput, ForgotPasswordUncheckedUpdateInput>
    /**
     * Choose, which ForgotPassword to update.
     */
    where: ForgotPasswordWhereUniqueInput
  }

  /**
   * ForgotPassword updateMany
   */
  export type ForgotPasswordUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update ForgotPasswords.
     */
    data: XOR<ForgotPasswordUpdateManyMutationInput, ForgotPasswordUncheckedUpdateManyInput>
    /**
     * Filter which ForgotPasswords to update
     */
    where?: ForgotPasswordWhereInput
    /**
     * Limit how many ForgotPasswords to update.
     */
    limit?: number
  }

  /**
   * ForgotPassword upsert
   */
  export type ForgotPasswordUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * The filter to search for the ForgotPassword to update in case it exists.
     */
    where: ForgotPasswordWhereUniqueInput
    /**
     * In case the ForgotPassword found by the `where` argument doesn't exist, create a new ForgotPassword with this data.
     */
    create: XOR<ForgotPasswordCreateInput, ForgotPasswordUncheckedCreateInput>
    /**
     * In case the ForgotPassword was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ForgotPasswordUpdateInput, ForgotPasswordUncheckedUpdateInput>
  }

  /**
   * ForgotPassword delete
   */
  export type ForgotPasswordDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
    /**
     * Filter which ForgotPassword to delete.
     */
    where: ForgotPasswordWhereUniqueInput
  }

  /**
   * ForgotPassword deleteMany
   */
  export type ForgotPasswordDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ForgotPasswords to delete
     */
    where?: ForgotPasswordWhereInput
    /**
     * Limit how many ForgotPasswords to delete.
     */
    limit?: number
  }

  /**
   * ForgotPassword without action
   */
  export type ForgotPasswordDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ForgotPassword
     */
    select?: ForgotPasswordSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ForgotPassword
     */
    omit?: ForgotPasswordOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ForgotPasswordInclude<ExtArgs> | null
  }


  /**
   * Model StockSpoilage
   */

  export type AggregateStockSpoilage = {
    _count: StockSpoilageCountAggregateOutputType | null
    _avg: StockSpoilageAvgAggregateOutputType | null
    _sum: StockSpoilageSumAggregateOutputType | null
    _min: StockSpoilageMinAggregateOutputType | null
    _max: StockSpoilageMaxAggregateOutputType | null
  }

  export type StockSpoilageAvgAggregateOutputType = {
    id: number | null
    purchaseId: number | null
    quantity: Decimal | null
    createdBy: number | null
  }

  export type StockSpoilageSumAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    quantity: Decimal | null
    createdBy: bigint | null
  }

  export type StockSpoilageMinAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    spoilageDate: Date | null
    quantity: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type StockSpoilageMaxAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    spoilageDate: Date | null
    quantity: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type StockSpoilageCountAggregateOutputType = {
    id: number
    purchaseId: number
    spoilageDate: number
    quantity: number
    reason: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type StockSpoilageAvgAggregateInputType = {
    id?: true
    purchaseId?: true
    quantity?: true
    createdBy?: true
  }

  export type StockSpoilageSumAggregateInputType = {
    id?: true
    purchaseId?: true
    quantity?: true
    createdBy?: true
  }

  export type StockSpoilageMinAggregateInputType = {
    id?: true
    purchaseId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type StockSpoilageMaxAggregateInputType = {
    id?: true
    purchaseId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type StockSpoilageCountAggregateInputType = {
    id?: true
    purchaseId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type StockSpoilageAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which StockSpoilage to aggregate.
     */
    where?: StockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of StockSpoilages to fetch.
     */
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: StockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` StockSpoilages 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` StockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned StockSpoilages
    **/
    _count?: true | StockSpoilageCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: StockSpoilageAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: StockSpoilageSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: StockSpoilageMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: StockSpoilageMaxAggregateInputType
  }

  export type GetStockSpoilageAggregateType<T extends StockSpoilageAggregateArgs> = {
        [P in keyof T & keyof AggregateStockSpoilage]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateStockSpoilage[P]>
      : GetScalarType<T[P], AggregateStockSpoilage[P]>
  }




  export type StockSpoilageGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: StockSpoilageWhereInput
    orderBy?: StockSpoilageOrderByWithAggregationInput | StockSpoilageOrderByWithAggregationInput[]
    by: StockSpoilageScalarFieldEnum[] | StockSpoilageScalarFieldEnum
    having?: StockSpoilageScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: StockSpoilageCountAggregateInputType | true
    _avg?: StockSpoilageAvgAggregateInputType
    _sum?: StockSpoilageSumAggregateInputType
    _min?: StockSpoilageMinAggregateInputType
    _max?: StockSpoilageMaxAggregateInputType
  }

  export type StockSpoilageGroupByOutputType = {
    id: bigint
    purchaseId: bigint
    spoilageDate: Date
    quantity: Decimal
    reason: string | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: StockSpoilageCountAggregateOutputType | null
    _avg: StockSpoilageAvgAggregateOutputType | null
    _sum: StockSpoilageSumAggregateOutputType | null
    _min: StockSpoilageMinAggregateOutputType | null
    _max: StockSpoilageMaxAggregateOutputType | null
  }

  type GetStockSpoilageGroupByPayload<T extends StockSpoilageGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<StockSpoilageGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof StockSpoilageGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], StockSpoilageGroupByOutputType[P]>
            : GetScalarType<T[P], StockSpoilageGroupByOutputType[P]>
        }
      >
    >


  export type StockSpoilageSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseId?: boolean
    spoilageDate?: boolean
    quantity?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | StockSpoilage$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["stockSpoilage"]>



  export type StockSpoilageSelectScalar = {
    id?: boolean
    purchaseId?: boolean
    spoilageDate?: boolean
    quantity?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type StockSpoilageOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseId" | "spoilageDate" | "quantity" | "reason" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["stockSpoilage"]>
  export type StockSpoilageInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | StockSpoilage$createdByUserArgs<ExtArgs>
  }

  export type $StockSpoilagePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "StockSpoilage"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseId: bigint
      spoilageDate: Date
      quantity: Prisma.Decimal
      reason: string | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["stockSpoilage"]>
    composites: {}
  }

  type StockSpoilageGetPayload<S extends boolean | null | undefined | StockSpoilageDefaultArgs> = $Result.GetResult<Prisma.$StockSpoilagePayload, S>

  type StockSpoilageCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<StockSpoilageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: StockSpoilageCountAggregateInputType | true
    }

  export interface StockSpoilageDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['StockSpoilage'], meta: { name: 'StockSpoilage' } }
    /**
     * Find zero or one StockSpoilage that matches the filter.
     * @param {StockSpoilageFindUniqueArgs} args - Arguments to find a StockSpoilage
     * @example
     * // Get one StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends StockSpoilageFindUniqueArgs>(args: SelectSubset<T, StockSpoilageFindUniqueArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one StockSpoilage that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {StockSpoilageFindUniqueOrThrowArgs} args - Arguments to find a StockSpoilage
     * @example
     * // Get one StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends StockSpoilageFindUniqueOrThrowArgs>(args: SelectSubset<T, StockSpoilageFindUniqueOrThrowArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first StockSpoilage 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 {StockSpoilageFindFirstArgs} args - Arguments to find a StockSpoilage
     * @example
     * // Get one StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends StockSpoilageFindFirstArgs>(args?: SelectSubset<T, StockSpoilageFindFirstArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first StockSpoilage 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 {StockSpoilageFindFirstOrThrowArgs} args - Arguments to find a StockSpoilage
     * @example
     * // Get one StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends StockSpoilageFindFirstOrThrowArgs>(args?: SelectSubset<T, StockSpoilageFindFirstOrThrowArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more StockSpoilages 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 {StockSpoilageFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all StockSpoilages
     * const stockSpoilages = await prisma.stockSpoilage.findMany()
     * 
     * // Get first 10 StockSpoilages
     * const stockSpoilages = await prisma.stockSpoilage.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const stockSpoilageWithIdOnly = await prisma.stockSpoilage.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends StockSpoilageFindManyArgs>(args?: SelectSubset<T, StockSpoilageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a StockSpoilage.
     * @param {StockSpoilageCreateArgs} args - Arguments to create a StockSpoilage.
     * @example
     * // Create one StockSpoilage
     * const StockSpoilage = await prisma.stockSpoilage.create({
     *   data: {
     *     // ... data to create a StockSpoilage
     *   }
     * })
     * 
     */
    create<T extends StockSpoilageCreateArgs>(args: SelectSubset<T, StockSpoilageCreateArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many StockSpoilages.
     * @param {StockSpoilageCreateManyArgs} args - Arguments to create many StockSpoilages.
     * @example
     * // Create many StockSpoilages
     * const stockSpoilage = await prisma.stockSpoilage.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends StockSpoilageCreateManyArgs>(args?: SelectSubset<T, StockSpoilageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a StockSpoilage.
     * @param {StockSpoilageDeleteArgs} args - Arguments to delete one StockSpoilage.
     * @example
     * // Delete one StockSpoilage
     * const StockSpoilage = await prisma.stockSpoilage.delete({
     *   where: {
     *     // ... filter to delete one StockSpoilage
     *   }
     * })
     * 
     */
    delete<T extends StockSpoilageDeleteArgs>(args: SelectSubset<T, StockSpoilageDeleteArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one StockSpoilage.
     * @param {StockSpoilageUpdateArgs} args - Arguments to update one StockSpoilage.
     * @example
     * // Update one StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends StockSpoilageUpdateArgs>(args: SelectSubset<T, StockSpoilageUpdateArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more StockSpoilages.
     * @param {StockSpoilageDeleteManyArgs} args - Arguments to filter StockSpoilages to delete.
     * @example
     * // Delete a few StockSpoilages
     * const { count } = await prisma.stockSpoilage.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends StockSpoilageDeleteManyArgs>(args?: SelectSubset<T, StockSpoilageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more StockSpoilages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StockSpoilageUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many StockSpoilages
     * const stockSpoilage = await prisma.stockSpoilage.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends StockSpoilageUpdateManyArgs>(args: SelectSubset<T, StockSpoilageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one StockSpoilage.
     * @param {StockSpoilageUpsertArgs} args - Arguments to update or create a StockSpoilage.
     * @example
     * // Update or create a StockSpoilage
     * const stockSpoilage = await prisma.stockSpoilage.upsert({
     *   create: {
     *     // ... data to create a StockSpoilage
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the StockSpoilage we want to update
     *   }
     * })
     */
    upsert<T extends StockSpoilageUpsertArgs>(args: SelectSubset<T, StockSpoilageUpsertArgs<ExtArgs>>): Prisma__StockSpoilageClient<$Result.GetResult<Prisma.$StockSpoilagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of StockSpoilages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StockSpoilageCountArgs} args - Arguments to filter StockSpoilages to count.
     * @example
     * // Count the number of StockSpoilages
     * const count = await prisma.stockSpoilage.count({
     *   where: {
     *     // ... the filter for the StockSpoilages we want to count
     *   }
     * })
    **/
    count<T extends StockSpoilageCountArgs>(
      args?: Subset<T, StockSpoilageCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], StockSpoilageCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a StockSpoilage.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StockSpoilageAggregateArgs} 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 StockSpoilageAggregateArgs>(args: Subset<T, StockSpoilageAggregateArgs>): Prisma.PrismaPromise<GetStockSpoilageAggregateType<T>>

    /**
     * Group by StockSpoilage.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {StockSpoilageGroupByArgs} 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 StockSpoilageGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: StockSpoilageGroupByArgs['orderBy'] }
        : { orderBy?: StockSpoilageGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, StockSpoilageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStockSpoilageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the StockSpoilage model
   */
  readonly fields: StockSpoilageFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for StockSpoilage.
   * 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__StockSpoilageClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends StockSpoilage$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, StockSpoilage$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the StockSpoilage model
   */
  interface StockSpoilageFieldRefs {
    readonly id: FieldRef<"StockSpoilage", 'BigInt'>
    readonly purchaseId: FieldRef<"StockSpoilage", 'BigInt'>
    readonly spoilageDate: FieldRef<"StockSpoilage", 'DateTime'>
    readonly quantity: FieldRef<"StockSpoilage", 'Decimal'>
    readonly reason: FieldRef<"StockSpoilage", 'String'>
    readonly remarks: FieldRef<"StockSpoilage", 'String'>
    readonly createdAt: FieldRef<"StockSpoilage", 'DateTime'>
    readonly updatedAt: FieldRef<"StockSpoilage", 'DateTime'>
    readonly createdBy: FieldRef<"StockSpoilage", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * StockSpoilage findUnique
   */
  export type StockSpoilageFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which StockSpoilage to fetch.
     */
    where: StockSpoilageWhereUniqueInput
  }

  /**
   * StockSpoilage findUniqueOrThrow
   */
  export type StockSpoilageFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which StockSpoilage to fetch.
     */
    where: StockSpoilageWhereUniqueInput
  }

  /**
   * StockSpoilage findFirst
   */
  export type StockSpoilageFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which StockSpoilage to fetch.
     */
    where?: StockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of StockSpoilages to fetch.
     */
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for StockSpoilages.
     */
    cursor?: StockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` StockSpoilages 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` StockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of StockSpoilages.
     */
    distinct?: StockSpoilageScalarFieldEnum | StockSpoilageScalarFieldEnum[]
  }

  /**
   * StockSpoilage findFirstOrThrow
   */
  export type StockSpoilageFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which StockSpoilage to fetch.
     */
    where?: StockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of StockSpoilages to fetch.
     */
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for StockSpoilages.
     */
    cursor?: StockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` StockSpoilages 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` StockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of StockSpoilages.
     */
    distinct?: StockSpoilageScalarFieldEnum | StockSpoilageScalarFieldEnum[]
  }

  /**
   * StockSpoilage findMany
   */
  export type StockSpoilageFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which StockSpoilages to fetch.
     */
    where?: StockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of StockSpoilages to fetch.
     */
    orderBy?: StockSpoilageOrderByWithRelationInput | StockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing StockSpoilages.
     */
    cursor?: StockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` StockSpoilages 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` StockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of StockSpoilages.
     */
    distinct?: StockSpoilageScalarFieldEnum | StockSpoilageScalarFieldEnum[]
  }

  /**
   * StockSpoilage create
   */
  export type StockSpoilageCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * The data needed to create a StockSpoilage.
     */
    data: XOR<StockSpoilageCreateInput, StockSpoilageUncheckedCreateInput>
  }

  /**
   * StockSpoilage createMany
   */
  export type StockSpoilageCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many StockSpoilages.
     */
    data: StockSpoilageCreateManyInput | StockSpoilageCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * StockSpoilage update
   */
  export type StockSpoilageUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * The data needed to update a StockSpoilage.
     */
    data: XOR<StockSpoilageUpdateInput, StockSpoilageUncheckedUpdateInput>
    /**
     * Choose, which StockSpoilage to update.
     */
    where: StockSpoilageWhereUniqueInput
  }

  /**
   * StockSpoilage updateMany
   */
  export type StockSpoilageUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update StockSpoilages.
     */
    data: XOR<StockSpoilageUpdateManyMutationInput, StockSpoilageUncheckedUpdateManyInput>
    /**
     * Filter which StockSpoilages to update
     */
    where?: StockSpoilageWhereInput
    /**
     * Limit how many StockSpoilages to update.
     */
    limit?: number
  }

  /**
   * StockSpoilage upsert
   */
  export type StockSpoilageUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * The filter to search for the StockSpoilage to update in case it exists.
     */
    where: StockSpoilageWhereUniqueInput
    /**
     * In case the StockSpoilage found by the `where` argument doesn't exist, create a new StockSpoilage with this data.
     */
    create: XOR<StockSpoilageCreateInput, StockSpoilageUncheckedCreateInput>
    /**
     * In case the StockSpoilage was found with the provided `where` argument, update it with this data.
     */
    update: XOR<StockSpoilageUpdateInput, StockSpoilageUncheckedUpdateInput>
  }

  /**
   * StockSpoilage delete
   */
  export type StockSpoilageDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
    /**
     * Filter which StockSpoilage to delete.
     */
    where: StockSpoilageWhereUniqueInput
  }

  /**
   * StockSpoilage deleteMany
   */
  export type StockSpoilageDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which StockSpoilages to delete
     */
    where?: StockSpoilageWhereInput
    /**
     * Limit how many StockSpoilages to delete.
     */
    limit?: number
  }

  /**
   * StockSpoilage.createdByUser
   */
  export type StockSpoilage$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * StockSpoilage without action
   */
  export type StockSpoilageDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the StockSpoilage
     */
    select?: StockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the StockSpoilage
     */
    omit?: StockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: StockSpoilageInclude<ExtArgs> | null
  }


  /**
   * Model SaleReturn
   */

  export type AggregateSaleReturn = {
    _count: SaleReturnCountAggregateOutputType | null
    _avg: SaleReturnAvgAggregateOutputType | null
    _sum: SaleReturnSumAggregateOutputType | null
    _min: SaleReturnMinAggregateOutputType | null
    _max: SaleReturnMaxAggregateOutputType | null
  }

  export type SaleReturnAvgAggregateOutputType = {
    id: number | null
    saleItemId: number | null
    purchaseId: number | null
    quantity: Decimal | null
    returnAmount: Decimal | null
    createdBy: number | null
  }

  export type SaleReturnSumAggregateOutputType = {
    id: bigint | null
    saleItemId: bigint | null
    purchaseId: bigint | null
    quantity: Decimal | null
    returnAmount: Decimal | null
    createdBy: bigint | null
  }

  export type SaleReturnMinAggregateOutputType = {
    id: bigint | null
    saleItemId: bigint | null
    purchaseId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    returnAmount: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleReturnMaxAggregateOutputType = {
    id: bigint | null
    saleItemId: bigint | null
    purchaseId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    returnAmount: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type SaleReturnCountAggregateOutputType = {
    id: number
    saleItemId: number
    purchaseId: number
    returnDate: number
    quantity: number
    returnAmount: number
    reason: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type SaleReturnAvgAggregateInputType = {
    id?: true
    saleItemId?: true
    purchaseId?: true
    quantity?: true
    returnAmount?: true
    createdBy?: true
  }

  export type SaleReturnSumAggregateInputType = {
    id?: true
    saleItemId?: true
    purchaseId?: true
    quantity?: true
    returnAmount?: true
    createdBy?: true
  }

  export type SaleReturnMinAggregateInputType = {
    id?: true
    saleItemId?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type SaleReturnMaxAggregateInputType = {
    id?: true
    saleItemId?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type SaleReturnCountAggregateInputType = {
    id?: true
    saleItemId?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type SaleReturnAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SaleReturn to aggregate.
     */
    where?: SaleReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleReturns to fetch.
     */
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: SaleReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleReturns 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` SaleReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned SaleReturns
    **/
    _count?: true | SaleReturnCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: SaleReturnAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: SaleReturnSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: SaleReturnMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: SaleReturnMaxAggregateInputType
  }

  export type GetSaleReturnAggregateType<T extends SaleReturnAggregateArgs> = {
        [P in keyof T & keyof AggregateSaleReturn]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateSaleReturn[P]>
      : GetScalarType<T[P], AggregateSaleReturn[P]>
  }




  export type SaleReturnGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: SaleReturnWhereInput
    orderBy?: SaleReturnOrderByWithAggregationInput | SaleReturnOrderByWithAggregationInput[]
    by: SaleReturnScalarFieldEnum[] | SaleReturnScalarFieldEnum
    having?: SaleReturnScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: SaleReturnCountAggregateInputType | true
    _avg?: SaleReturnAvgAggregateInputType
    _sum?: SaleReturnSumAggregateInputType
    _min?: SaleReturnMinAggregateInputType
    _max?: SaleReturnMaxAggregateInputType
  }

  export type SaleReturnGroupByOutputType = {
    id: bigint
    saleItemId: bigint
    purchaseId: bigint
    returnDate: Date
    quantity: Decimal
    returnAmount: Decimal
    reason: string | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: SaleReturnCountAggregateOutputType | null
    _avg: SaleReturnAvgAggregateOutputType | null
    _sum: SaleReturnSumAggregateOutputType | null
    _min: SaleReturnMinAggregateOutputType | null
    _max: SaleReturnMaxAggregateOutputType | null
  }

  type GetSaleReturnGroupByPayload<T extends SaleReturnGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<SaleReturnGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof SaleReturnGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], SaleReturnGroupByOutputType[P]>
            : GetScalarType<T[P], SaleReturnGroupByOutputType[P]>
        }
      >
    >


  export type SaleReturnSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    saleItemId?: boolean
    purchaseId?: boolean
    returnDate?: boolean
    quantity?: boolean
    returnAmount?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    saleItem?: boolean | SaleItemDefaultArgs<ExtArgs>
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | SaleReturn$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["saleReturn"]>



  export type SaleReturnSelectScalar = {
    id?: boolean
    saleItemId?: boolean
    purchaseId?: boolean
    returnDate?: boolean
    quantity?: boolean
    returnAmount?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type SaleReturnOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "saleItemId" | "purchaseId" | "returnDate" | "quantity" | "returnAmount" | "reason" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["saleReturn"]>
  export type SaleReturnInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    saleItem?: boolean | SaleItemDefaultArgs<ExtArgs>
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | SaleReturn$createdByUserArgs<ExtArgs>
  }

  export type $SaleReturnPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "SaleReturn"
    objects: {
      saleItem: Prisma.$SaleItemPayload<ExtArgs>
      purchase: Prisma.$PurchasePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      saleItemId: bigint
      purchaseId: bigint
      returnDate: Date
      quantity: Prisma.Decimal
      returnAmount: Prisma.Decimal
      reason: string | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["saleReturn"]>
    composites: {}
  }

  type SaleReturnGetPayload<S extends boolean | null | undefined | SaleReturnDefaultArgs> = $Result.GetResult<Prisma.$SaleReturnPayload, S>

  type SaleReturnCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<SaleReturnFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: SaleReturnCountAggregateInputType | true
    }

  export interface SaleReturnDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['SaleReturn'], meta: { name: 'SaleReturn' } }
    /**
     * Find zero or one SaleReturn that matches the filter.
     * @param {SaleReturnFindUniqueArgs} args - Arguments to find a SaleReturn
     * @example
     * // Get one SaleReturn
     * const saleReturn = await prisma.saleReturn.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends SaleReturnFindUniqueArgs>(args: SelectSubset<T, SaleReturnFindUniqueArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one SaleReturn that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {SaleReturnFindUniqueOrThrowArgs} args - Arguments to find a SaleReturn
     * @example
     * // Get one SaleReturn
     * const saleReturn = await prisma.saleReturn.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends SaleReturnFindUniqueOrThrowArgs>(args: SelectSubset<T, SaleReturnFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SaleReturn 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 {SaleReturnFindFirstArgs} args - Arguments to find a SaleReturn
     * @example
     * // Get one SaleReturn
     * const saleReturn = await prisma.saleReturn.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends SaleReturnFindFirstArgs>(args?: SelectSubset<T, SaleReturnFindFirstArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first SaleReturn 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 {SaleReturnFindFirstOrThrowArgs} args - Arguments to find a SaleReturn
     * @example
     * // Get one SaleReturn
     * const saleReturn = await prisma.saleReturn.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends SaleReturnFindFirstOrThrowArgs>(args?: SelectSubset<T, SaleReturnFindFirstOrThrowArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more SaleReturns 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 {SaleReturnFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all SaleReturns
     * const saleReturns = await prisma.saleReturn.findMany()
     * 
     * // Get first 10 SaleReturns
     * const saleReturns = await prisma.saleReturn.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const saleReturnWithIdOnly = await prisma.saleReturn.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends SaleReturnFindManyArgs>(args?: SelectSubset<T, SaleReturnFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a SaleReturn.
     * @param {SaleReturnCreateArgs} args - Arguments to create a SaleReturn.
     * @example
     * // Create one SaleReturn
     * const SaleReturn = await prisma.saleReturn.create({
     *   data: {
     *     // ... data to create a SaleReturn
     *   }
     * })
     * 
     */
    create<T extends SaleReturnCreateArgs>(args: SelectSubset<T, SaleReturnCreateArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many SaleReturns.
     * @param {SaleReturnCreateManyArgs} args - Arguments to create many SaleReturns.
     * @example
     * // Create many SaleReturns
     * const saleReturn = await prisma.saleReturn.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends SaleReturnCreateManyArgs>(args?: SelectSubset<T, SaleReturnCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a SaleReturn.
     * @param {SaleReturnDeleteArgs} args - Arguments to delete one SaleReturn.
     * @example
     * // Delete one SaleReturn
     * const SaleReturn = await prisma.saleReturn.delete({
     *   where: {
     *     // ... filter to delete one SaleReturn
     *   }
     * })
     * 
     */
    delete<T extends SaleReturnDeleteArgs>(args: SelectSubset<T, SaleReturnDeleteArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one SaleReturn.
     * @param {SaleReturnUpdateArgs} args - Arguments to update one SaleReturn.
     * @example
     * // Update one SaleReturn
     * const saleReturn = await prisma.saleReturn.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends SaleReturnUpdateArgs>(args: SelectSubset<T, SaleReturnUpdateArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more SaleReturns.
     * @param {SaleReturnDeleteManyArgs} args - Arguments to filter SaleReturns to delete.
     * @example
     * // Delete a few SaleReturns
     * const { count } = await prisma.saleReturn.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends SaleReturnDeleteManyArgs>(args?: SelectSubset<T, SaleReturnDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more SaleReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleReturnUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many SaleReturns
     * const saleReturn = await prisma.saleReturn.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends SaleReturnUpdateManyArgs>(args: SelectSubset<T, SaleReturnUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one SaleReturn.
     * @param {SaleReturnUpsertArgs} args - Arguments to update or create a SaleReturn.
     * @example
     * // Update or create a SaleReturn
     * const saleReturn = await prisma.saleReturn.upsert({
     *   create: {
     *     // ... data to create a SaleReturn
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the SaleReturn we want to update
     *   }
     * })
     */
    upsert<T extends SaleReturnUpsertArgs>(args: SelectSubset<T, SaleReturnUpsertArgs<ExtArgs>>): Prisma__SaleReturnClient<$Result.GetResult<Prisma.$SaleReturnPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of SaleReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleReturnCountArgs} args - Arguments to filter SaleReturns to count.
     * @example
     * // Count the number of SaleReturns
     * const count = await prisma.saleReturn.count({
     *   where: {
     *     // ... the filter for the SaleReturns we want to count
     *   }
     * })
    **/
    count<T extends SaleReturnCountArgs>(
      args?: Subset<T, SaleReturnCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], SaleReturnCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a SaleReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleReturnAggregateArgs} 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 SaleReturnAggregateArgs>(args: Subset<T, SaleReturnAggregateArgs>): Prisma.PrismaPromise<GetSaleReturnAggregateType<T>>

    /**
     * Group by SaleReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {SaleReturnGroupByArgs} 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 SaleReturnGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: SaleReturnGroupByArgs['orderBy'] }
        : { orderBy?: SaleReturnGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, SaleReturnGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSaleReturnGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the SaleReturn model
   */
  readonly fields: SaleReturnFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for SaleReturn.
   * 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__SaleReturnClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    saleItem<T extends SaleItemDefaultArgs<ExtArgs> = {}>(args?: Subset<T, SaleItemDefaultArgs<ExtArgs>>): Prisma__SaleItemClient<$Result.GetResult<Prisma.$SaleItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends SaleReturn$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, SaleReturn$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the SaleReturn model
   */
  interface SaleReturnFieldRefs {
    readonly id: FieldRef<"SaleReturn", 'BigInt'>
    readonly saleItemId: FieldRef<"SaleReturn", 'BigInt'>
    readonly purchaseId: FieldRef<"SaleReturn", 'BigInt'>
    readonly returnDate: FieldRef<"SaleReturn", 'DateTime'>
    readonly quantity: FieldRef<"SaleReturn", 'Decimal'>
    readonly returnAmount: FieldRef<"SaleReturn", 'Decimal'>
    readonly reason: FieldRef<"SaleReturn", 'String'>
    readonly remarks: FieldRef<"SaleReturn", 'String'>
    readonly createdAt: FieldRef<"SaleReturn", 'DateTime'>
    readonly updatedAt: FieldRef<"SaleReturn", 'DateTime'>
    readonly createdBy: FieldRef<"SaleReturn", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * SaleReturn findUnique
   */
  export type SaleReturnFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter, which SaleReturn to fetch.
     */
    where: SaleReturnWhereUniqueInput
  }

  /**
   * SaleReturn findUniqueOrThrow
   */
  export type SaleReturnFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter, which SaleReturn to fetch.
     */
    where: SaleReturnWhereUniqueInput
  }

  /**
   * SaleReturn findFirst
   */
  export type SaleReturnFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter, which SaleReturn to fetch.
     */
    where?: SaleReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleReturns to fetch.
     */
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SaleReturns.
     */
    cursor?: SaleReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleReturns 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` SaleReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleReturns.
     */
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * SaleReturn findFirstOrThrow
   */
  export type SaleReturnFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter, which SaleReturn to fetch.
     */
    where?: SaleReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleReturns to fetch.
     */
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for SaleReturns.
     */
    cursor?: SaleReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleReturns 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` SaleReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleReturns.
     */
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * SaleReturn findMany
   */
  export type SaleReturnFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter, which SaleReturns to fetch.
     */
    where?: SaleReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of SaleReturns to fetch.
     */
    orderBy?: SaleReturnOrderByWithRelationInput | SaleReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing SaleReturns.
     */
    cursor?: SaleReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` SaleReturns 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` SaleReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of SaleReturns.
     */
    distinct?: SaleReturnScalarFieldEnum | SaleReturnScalarFieldEnum[]
  }

  /**
   * SaleReturn create
   */
  export type SaleReturnCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * The data needed to create a SaleReturn.
     */
    data: XOR<SaleReturnCreateInput, SaleReturnUncheckedCreateInput>
  }

  /**
   * SaleReturn createMany
   */
  export type SaleReturnCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many SaleReturns.
     */
    data: SaleReturnCreateManyInput | SaleReturnCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * SaleReturn update
   */
  export type SaleReturnUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * The data needed to update a SaleReturn.
     */
    data: XOR<SaleReturnUpdateInput, SaleReturnUncheckedUpdateInput>
    /**
     * Choose, which SaleReturn to update.
     */
    where: SaleReturnWhereUniqueInput
  }

  /**
   * SaleReturn updateMany
   */
  export type SaleReturnUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update SaleReturns.
     */
    data: XOR<SaleReturnUpdateManyMutationInput, SaleReturnUncheckedUpdateManyInput>
    /**
     * Filter which SaleReturns to update
     */
    where?: SaleReturnWhereInput
    /**
     * Limit how many SaleReturns to update.
     */
    limit?: number
  }

  /**
   * SaleReturn upsert
   */
  export type SaleReturnUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * The filter to search for the SaleReturn to update in case it exists.
     */
    where: SaleReturnWhereUniqueInput
    /**
     * In case the SaleReturn found by the `where` argument doesn't exist, create a new SaleReturn with this data.
     */
    create: XOR<SaleReturnCreateInput, SaleReturnUncheckedCreateInput>
    /**
     * In case the SaleReturn was found with the provided `where` argument, update it with this data.
     */
    update: XOR<SaleReturnUpdateInput, SaleReturnUncheckedUpdateInput>
  }

  /**
   * SaleReturn delete
   */
  export type SaleReturnDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
    /**
     * Filter which SaleReturn to delete.
     */
    where: SaleReturnWhereUniqueInput
  }

  /**
   * SaleReturn deleteMany
   */
  export type SaleReturnDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which SaleReturns to delete
     */
    where?: SaleReturnWhereInput
    /**
     * Limit how many SaleReturns to delete.
     */
    limit?: number
  }

  /**
   * SaleReturn.createdByUser
   */
  export type SaleReturn$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * SaleReturn without action
   */
  export type SaleReturnDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the SaleReturn
     */
    select?: SaleReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the SaleReturn
     */
    omit?: SaleReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: SaleReturnInclude<ExtArgs> | null
  }


  /**
   * Model ArrivalSettlement
   */

  export type AggregateArrivalSettlement = {
    _count: ArrivalSettlementCountAggregateOutputType | null
    _avg: ArrivalSettlementAvgAggregateOutputType | null
    _sum: ArrivalSettlementSumAggregateOutputType | null
    _min: ArrivalSettlementMinAggregateOutputType | null
    _max: ArrivalSettlementMaxAggregateOutputType | null
  }

  export type ArrivalSettlementAvgAggregateOutputType = {
    id: number | null
    purchaseId: number | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    paidAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: number | null
  }

  export type ArrivalSettlementSumAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    paidAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: bigint | null
  }

  export type ArrivalSettlementMinAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    settlementNo: string | null
    settlementDate: Date | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    paidAmount: Decimal | null
    balanceAmount: Decimal | null
    status: $Enums.SettlementStatus | null
    paymentMode: $Enums.PaymentMode | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ArrivalSettlementMaxAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    settlementNo: string | null
    settlementDate: Date | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    paidAmount: Decimal | null
    balanceAmount: Decimal | null
    status: $Enums.SettlementStatus | null
    paymentMode: $Enums.PaymentMode | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ArrivalSettlementCountAggregateOutputType = {
    id: number
    purchaseId: number
    settlementNo: number
    settlementDate: number
    totalWeightSold: number
    grossSalesTotal: number
    commissionPercent: number
    commissionAmount: number
    freightDeducted: number
    extraFreightDeducted: number
    associationDeducted: number
    unloadingDeducted: number
    miscDeducted: number
    totalDeductions: number
    advanceAdjusted: number
    netPayable: number
    paidAmount: number
    balanceAmount: number
    status: number
    paymentMode: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type ArrivalSettlementAvgAggregateInputType = {
    id?: true
    purchaseId?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    paidAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type ArrivalSettlementSumAggregateInputType = {
    id?: true
    purchaseId?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    paidAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type ArrivalSettlementMinAggregateInputType = {
    id?: true
    purchaseId?: true
    settlementNo?: true
    settlementDate?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    paidAmount?: true
    balanceAmount?: true
    status?: true
    paymentMode?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ArrivalSettlementMaxAggregateInputType = {
    id?: true
    purchaseId?: true
    settlementNo?: true
    settlementDate?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    paidAmount?: true
    balanceAmount?: true
    status?: true
    paymentMode?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ArrivalSettlementCountAggregateInputType = {
    id?: true
    purchaseId?: true
    settlementNo?: true
    settlementDate?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    paidAmount?: true
    balanceAmount?: true
    status?: true
    paymentMode?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type ArrivalSettlementAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ArrivalSettlement to aggregate.
     */
    where?: ArrivalSettlementWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalSettlements to fetch.
     */
    orderBy?: ArrivalSettlementOrderByWithRelationInput | ArrivalSettlementOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ArrivalSettlementWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalSettlements 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` ArrivalSettlements.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned ArrivalSettlements
    **/
    _count?: true | ArrivalSettlementCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ArrivalSettlementAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ArrivalSettlementSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ArrivalSettlementMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ArrivalSettlementMaxAggregateInputType
  }

  export type GetArrivalSettlementAggregateType<T extends ArrivalSettlementAggregateArgs> = {
        [P in keyof T & keyof AggregateArrivalSettlement]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateArrivalSettlement[P]>
      : GetScalarType<T[P], AggregateArrivalSettlement[P]>
  }




  export type ArrivalSettlementGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ArrivalSettlementWhereInput
    orderBy?: ArrivalSettlementOrderByWithAggregationInput | ArrivalSettlementOrderByWithAggregationInput[]
    by: ArrivalSettlementScalarFieldEnum[] | ArrivalSettlementScalarFieldEnum
    having?: ArrivalSettlementScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ArrivalSettlementCountAggregateInputType | true
    _avg?: ArrivalSettlementAvgAggregateInputType
    _sum?: ArrivalSettlementSumAggregateInputType
    _min?: ArrivalSettlementMinAggregateInputType
    _max?: ArrivalSettlementMaxAggregateInputType
  }

  export type ArrivalSettlementGroupByOutputType = {
    id: bigint
    purchaseId: bigint
    settlementNo: string
    settlementDate: Date
    totalWeightSold: Decimal
    grossSalesTotal: Decimal
    commissionPercent: Decimal
    commissionAmount: Decimal
    freightDeducted: Decimal
    extraFreightDeducted: Decimal
    associationDeducted: Decimal
    unloadingDeducted: Decimal
    miscDeducted: Decimal
    totalDeductions: Decimal
    advanceAdjusted: Decimal
    netPayable: Decimal
    paidAmount: Decimal
    balanceAmount: Decimal
    status: $Enums.SettlementStatus
    paymentMode: $Enums.PaymentMode | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: ArrivalSettlementCountAggregateOutputType | null
    _avg: ArrivalSettlementAvgAggregateOutputType | null
    _sum: ArrivalSettlementSumAggregateOutputType | null
    _min: ArrivalSettlementMinAggregateOutputType | null
    _max: ArrivalSettlementMaxAggregateOutputType | null
  }

  type GetArrivalSettlementGroupByPayload<T extends ArrivalSettlementGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ArrivalSettlementGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ArrivalSettlementGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ArrivalSettlementGroupByOutputType[P]>
            : GetScalarType<T[P], ArrivalSettlementGroupByOutputType[P]>
        }
      >
    >


  export type ArrivalSettlementSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseId?: boolean
    settlementNo?: boolean
    settlementDate?: boolean
    totalWeightSold?: boolean
    grossSalesTotal?: boolean
    commissionPercent?: boolean
    commissionAmount?: boolean
    freightDeducted?: boolean
    extraFreightDeducted?: boolean
    associationDeducted?: boolean
    unloadingDeducted?: boolean
    miscDeducted?: boolean
    totalDeductions?: boolean
    advanceAdjusted?: boolean
    netPayable?: boolean
    paidAmount?: boolean
    balanceAmount?: boolean
    status?: boolean
    paymentMode?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | ArrivalSettlement$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["arrivalSettlement"]>



  export type ArrivalSettlementSelectScalar = {
    id?: boolean
    purchaseId?: boolean
    settlementNo?: boolean
    settlementDate?: boolean
    totalWeightSold?: boolean
    grossSalesTotal?: boolean
    commissionPercent?: boolean
    commissionAmount?: boolean
    freightDeducted?: boolean
    extraFreightDeducted?: boolean
    associationDeducted?: boolean
    unloadingDeducted?: boolean
    miscDeducted?: boolean
    totalDeductions?: boolean
    advanceAdjusted?: boolean
    netPayable?: boolean
    paidAmount?: boolean
    balanceAmount?: boolean
    status?: boolean
    paymentMode?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type ArrivalSettlementOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseId" | "settlementNo" | "settlementDate" | "totalWeightSold" | "grossSalesTotal" | "commissionPercent" | "commissionAmount" | "freightDeducted" | "extraFreightDeducted" | "associationDeducted" | "unloadingDeducted" | "miscDeducted" | "totalDeductions" | "advanceAdjusted" | "netPayable" | "paidAmount" | "balanceAmount" | "status" | "paymentMode" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["arrivalSettlement"]>
  export type ArrivalSettlementInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | ArrivalSettlement$createdByUserArgs<ExtArgs>
  }

  export type $ArrivalSettlementPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "ArrivalSettlement"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseId: bigint
      settlementNo: string
      settlementDate: Date
      totalWeightSold: Prisma.Decimal
      grossSalesTotal: Prisma.Decimal
      commissionPercent: Prisma.Decimal
      commissionAmount: Prisma.Decimal
      freightDeducted: Prisma.Decimal
      extraFreightDeducted: Prisma.Decimal
      associationDeducted: Prisma.Decimal
      unloadingDeducted: Prisma.Decimal
      miscDeducted: Prisma.Decimal
      totalDeductions: Prisma.Decimal
      advanceAdjusted: Prisma.Decimal
      netPayable: Prisma.Decimal
      paidAmount: Prisma.Decimal
      balanceAmount: Prisma.Decimal
      status: $Enums.SettlementStatus
      paymentMode: $Enums.PaymentMode | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["arrivalSettlement"]>
    composites: {}
  }

  type ArrivalSettlementGetPayload<S extends boolean | null | undefined | ArrivalSettlementDefaultArgs> = $Result.GetResult<Prisma.$ArrivalSettlementPayload, S>

  type ArrivalSettlementCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ArrivalSettlementFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ArrivalSettlementCountAggregateInputType | true
    }

  export interface ArrivalSettlementDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ArrivalSettlement'], meta: { name: 'ArrivalSettlement' } }
    /**
     * Find zero or one ArrivalSettlement that matches the filter.
     * @param {ArrivalSettlementFindUniqueArgs} args - Arguments to find a ArrivalSettlement
     * @example
     * // Get one ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ArrivalSettlementFindUniqueArgs>(args: SelectSubset<T, ArrivalSettlementFindUniqueArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one ArrivalSettlement that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ArrivalSettlementFindUniqueOrThrowArgs} args - Arguments to find a ArrivalSettlement
     * @example
     * // Get one ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ArrivalSettlementFindUniqueOrThrowArgs>(args: SelectSubset<T, ArrivalSettlementFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ArrivalSettlement 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 {ArrivalSettlementFindFirstArgs} args - Arguments to find a ArrivalSettlement
     * @example
     * // Get one ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ArrivalSettlementFindFirstArgs>(args?: SelectSubset<T, ArrivalSettlementFindFirstArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ArrivalSettlement 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 {ArrivalSettlementFindFirstOrThrowArgs} args - Arguments to find a ArrivalSettlement
     * @example
     * // Get one ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ArrivalSettlementFindFirstOrThrowArgs>(args?: SelectSubset<T, ArrivalSettlementFindFirstOrThrowArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more ArrivalSettlements 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 {ArrivalSettlementFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all ArrivalSettlements
     * const arrivalSettlements = await prisma.arrivalSettlement.findMany()
     * 
     * // Get first 10 ArrivalSettlements
     * const arrivalSettlements = await prisma.arrivalSettlement.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const arrivalSettlementWithIdOnly = await prisma.arrivalSettlement.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ArrivalSettlementFindManyArgs>(args?: SelectSubset<T, ArrivalSettlementFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a ArrivalSettlement.
     * @param {ArrivalSettlementCreateArgs} args - Arguments to create a ArrivalSettlement.
     * @example
     * // Create one ArrivalSettlement
     * const ArrivalSettlement = await prisma.arrivalSettlement.create({
     *   data: {
     *     // ... data to create a ArrivalSettlement
     *   }
     * })
     * 
     */
    create<T extends ArrivalSettlementCreateArgs>(args: SelectSubset<T, ArrivalSettlementCreateArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many ArrivalSettlements.
     * @param {ArrivalSettlementCreateManyArgs} args - Arguments to create many ArrivalSettlements.
     * @example
     * // Create many ArrivalSettlements
     * const arrivalSettlement = await prisma.arrivalSettlement.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ArrivalSettlementCreateManyArgs>(args?: SelectSubset<T, ArrivalSettlementCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a ArrivalSettlement.
     * @param {ArrivalSettlementDeleteArgs} args - Arguments to delete one ArrivalSettlement.
     * @example
     * // Delete one ArrivalSettlement
     * const ArrivalSettlement = await prisma.arrivalSettlement.delete({
     *   where: {
     *     // ... filter to delete one ArrivalSettlement
     *   }
     * })
     * 
     */
    delete<T extends ArrivalSettlementDeleteArgs>(args: SelectSubset<T, ArrivalSettlementDeleteArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one ArrivalSettlement.
     * @param {ArrivalSettlementUpdateArgs} args - Arguments to update one ArrivalSettlement.
     * @example
     * // Update one ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ArrivalSettlementUpdateArgs>(args: SelectSubset<T, ArrivalSettlementUpdateArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more ArrivalSettlements.
     * @param {ArrivalSettlementDeleteManyArgs} args - Arguments to filter ArrivalSettlements to delete.
     * @example
     * // Delete a few ArrivalSettlements
     * const { count } = await prisma.arrivalSettlement.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ArrivalSettlementDeleteManyArgs>(args?: SelectSubset<T, ArrivalSettlementDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more ArrivalSettlements.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalSettlementUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many ArrivalSettlements
     * const arrivalSettlement = await prisma.arrivalSettlement.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ArrivalSettlementUpdateManyArgs>(args: SelectSubset<T, ArrivalSettlementUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one ArrivalSettlement.
     * @param {ArrivalSettlementUpsertArgs} args - Arguments to update or create a ArrivalSettlement.
     * @example
     * // Update or create a ArrivalSettlement
     * const arrivalSettlement = await prisma.arrivalSettlement.upsert({
     *   create: {
     *     // ... data to create a ArrivalSettlement
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the ArrivalSettlement we want to update
     *   }
     * })
     */
    upsert<T extends ArrivalSettlementUpsertArgs>(args: SelectSubset<T, ArrivalSettlementUpsertArgs<ExtArgs>>): Prisma__ArrivalSettlementClient<$Result.GetResult<Prisma.$ArrivalSettlementPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of ArrivalSettlements.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalSettlementCountArgs} args - Arguments to filter ArrivalSettlements to count.
     * @example
     * // Count the number of ArrivalSettlements
     * const count = await prisma.arrivalSettlement.count({
     *   where: {
     *     // ... the filter for the ArrivalSettlements we want to count
     *   }
     * })
    **/
    count<T extends ArrivalSettlementCountArgs>(
      args?: Subset<T, ArrivalSettlementCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ArrivalSettlementCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a ArrivalSettlement.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalSettlementAggregateArgs} 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 ArrivalSettlementAggregateArgs>(args: Subset<T, ArrivalSettlementAggregateArgs>): Prisma.PrismaPromise<GetArrivalSettlementAggregateType<T>>

    /**
     * Group by ArrivalSettlement.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalSettlementGroupByArgs} 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 ArrivalSettlementGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ArrivalSettlementGroupByArgs['orderBy'] }
        : { orderBy?: ArrivalSettlementGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ArrivalSettlementGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetArrivalSettlementGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the ArrivalSettlement model
   */
  readonly fields: ArrivalSettlementFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for ArrivalSettlement.
   * 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__ArrivalSettlementClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends ArrivalSettlement$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, ArrivalSettlement$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the ArrivalSettlement model
   */
  interface ArrivalSettlementFieldRefs {
    readonly id: FieldRef<"ArrivalSettlement", 'BigInt'>
    readonly purchaseId: FieldRef<"ArrivalSettlement", 'BigInt'>
    readonly settlementNo: FieldRef<"ArrivalSettlement", 'String'>
    readonly settlementDate: FieldRef<"ArrivalSettlement", 'DateTime'>
    readonly totalWeightSold: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly grossSalesTotal: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly commissionPercent: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly commissionAmount: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly freightDeducted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly extraFreightDeducted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly associationDeducted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly unloadingDeducted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly miscDeducted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly totalDeductions: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly advanceAdjusted: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly netPayable: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly paidAmount: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly balanceAmount: FieldRef<"ArrivalSettlement", 'Decimal'>
    readonly status: FieldRef<"ArrivalSettlement", 'SettlementStatus'>
    readonly paymentMode: FieldRef<"ArrivalSettlement", 'PaymentMode'>
    readonly remarks: FieldRef<"ArrivalSettlement", 'String'>
    readonly createdAt: FieldRef<"ArrivalSettlement", 'DateTime'>
    readonly updatedAt: FieldRef<"ArrivalSettlement", 'DateTime'>
    readonly createdBy: FieldRef<"ArrivalSettlement", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * ArrivalSettlement findUnique
   */
  export type ArrivalSettlementFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalSettlement to fetch.
     */
    where: ArrivalSettlementWhereUniqueInput
  }

  /**
   * ArrivalSettlement findUniqueOrThrow
   */
  export type ArrivalSettlementFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalSettlement to fetch.
     */
    where: ArrivalSettlementWhereUniqueInput
  }

  /**
   * ArrivalSettlement findFirst
   */
  export type ArrivalSettlementFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalSettlement to fetch.
     */
    where?: ArrivalSettlementWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalSettlements to fetch.
     */
    orderBy?: ArrivalSettlementOrderByWithRelationInput | ArrivalSettlementOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ArrivalSettlements.
     */
    cursor?: ArrivalSettlementWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalSettlements 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` ArrivalSettlements.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalSettlements.
     */
    distinct?: ArrivalSettlementScalarFieldEnum | ArrivalSettlementScalarFieldEnum[]
  }

  /**
   * ArrivalSettlement findFirstOrThrow
   */
  export type ArrivalSettlementFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalSettlement to fetch.
     */
    where?: ArrivalSettlementWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalSettlements to fetch.
     */
    orderBy?: ArrivalSettlementOrderByWithRelationInput | ArrivalSettlementOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ArrivalSettlements.
     */
    cursor?: ArrivalSettlementWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalSettlements 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` ArrivalSettlements.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalSettlements.
     */
    distinct?: ArrivalSettlementScalarFieldEnum | ArrivalSettlementScalarFieldEnum[]
  }

  /**
   * ArrivalSettlement findMany
   */
  export type ArrivalSettlementFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalSettlements to fetch.
     */
    where?: ArrivalSettlementWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalSettlements to fetch.
     */
    orderBy?: ArrivalSettlementOrderByWithRelationInput | ArrivalSettlementOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing ArrivalSettlements.
     */
    cursor?: ArrivalSettlementWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalSettlements 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` ArrivalSettlements.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalSettlements.
     */
    distinct?: ArrivalSettlementScalarFieldEnum | ArrivalSettlementScalarFieldEnum[]
  }

  /**
   * ArrivalSettlement create
   */
  export type ArrivalSettlementCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * The data needed to create a ArrivalSettlement.
     */
    data: XOR<ArrivalSettlementCreateInput, ArrivalSettlementUncheckedCreateInput>
  }

  /**
   * ArrivalSettlement createMany
   */
  export type ArrivalSettlementCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many ArrivalSettlements.
     */
    data: ArrivalSettlementCreateManyInput | ArrivalSettlementCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * ArrivalSettlement update
   */
  export type ArrivalSettlementUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * The data needed to update a ArrivalSettlement.
     */
    data: XOR<ArrivalSettlementUpdateInput, ArrivalSettlementUncheckedUpdateInput>
    /**
     * Choose, which ArrivalSettlement to update.
     */
    where: ArrivalSettlementWhereUniqueInput
  }

  /**
   * ArrivalSettlement updateMany
   */
  export type ArrivalSettlementUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update ArrivalSettlements.
     */
    data: XOR<ArrivalSettlementUpdateManyMutationInput, ArrivalSettlementUncheckedUpdateManyInput>
    /**
     * Filter which ArrivalSettlements to update
     */
    where?: ArrivalSettlementWhereInput
    /**
     * Limit how many ArrivalSettlements to update.
     */
    limit?: number
  }

  /**
   * ArrivalSettlement upsert
   */
  export type ArrivalSettlementUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * The filter to search for the ArrivalSettlement to update in case it exists.
     */
    where: ArrivalSettlementWhereUniqueInput
    /**
     * In case the ArrivalSettlement found by the `where` argument doesn't exist, create a new ArrivalSettlement with this data.
     */
    create: XOR<ArrivalSettlementCreateInput, ArrivalSettlementUncheckedCreateInput>
    /**
     * In case the ArrivalSettlement was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ArrivalSettlementUpdateInput, ArrivalSettlementUncheckedUpdateInput>
  }

  /**
   * ArrivalSettlement delete
   */
  export type ArrivalSettlementDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
    /**
     * Filter which ArrivalSettlement to delete.
     */
    where: ArrivalSettlementWhereUniqueInput
  }

  /**
   * ArrivalSettlement deleteMany
   */
  export type ArrivalSettlementDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ArrivalSettlements to delete
     */
    where?: ArrivalSettlementWhereInput
    /**
     * Limit how many ArrivalSettlements to delete.
     */
    limit?: number
  }

  /**
   * ArrivalSettlement.createdByUser
   */
  export type ArrivalSettlement$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * ArrivalSettlement without action
   */
  export type ArrivalSettlementDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalSettlement
     */
    select?: ArrivalSettlementSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalSettlement
     */
    omit?: ArrivalSettlementOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalSettlementInclude<ExtArgs> | null
  }


  /**
   * Model ArrivalCustomPatti
   */

  export type AggregateArrivalCustomPatti = {
    _count: ArrivalCustomPattiCountAggregateOutputType | null
    _avg: ArrivalCustomPattiAvgAggregateOutputType | null
    _sum: ArrivalCustomPattiSumAggregateOutputType | null
    _min: ArrivalCustomPattiMinAggregateOutputType | null
    _max: ArrivalCustomPattiMaxAggregateOutputType | null
  }

  export type ArrivalCustomPattiAvgAggregateOutputType = {
    id: number | null
    purchaseId: number | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    createdBy: number | null
  }

  export type ArrivalCustomPattiSumAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    createdBy: bigint | null
  }

  export type ArrivalCustomPattiMinAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    pattiNo: string | null
    settlementDate: Date | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ArrivalCustomPattiMaxAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    pattiNo: string | null
    settlementDate: Date | null
    totalWeightSold: Decimal | null
    grossSalesTotal: Decimal | null
    commissionPercent: Decimal | null
    commissionAmount: Decimal | null
    freightDeducted: Decimal | null
    extraFreightDeducted: Decimal | null
    associationDeducted: Decimal | null
    unloadingDeducted: Decimal | null
    miscDeducted: Decimal | null
    totalDeductions: Decimal | null
    advanceAdjusted: Decimal | null
    netPayable: Decimal | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type ArrivalCustomPattiCountAggregateOutputType = {
    id: number
    purchaseId: number
    pattiNo: number
    settlementDate: number
    items: number
    totalWeightSold: number
    grossSalesTotal: number
    commissionPercent: number
    commissionAmount: number
    freightDeducted: number
    extraFreightDeducted: number
    associationDeducted: number
    unloadingDeducted: number
    miscDeducted: number
    totalDeductions: number
    advanceAdjusted: number
    netPayable: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type ArrivalCustomPattiAvgAggregateInputType = {
    id?: true
    purchaseId?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    createdBy?: true
  }

  export type ArrivalCustomPattiSumAggregateInputType = {
    id?: true
    purchaseId?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    createdBy?: true
  }

  export type ArrivalCustomPattiMinAggregateInputType = {
    id?: true
    purchaseId?: true
    pattiNo?: true
    settlementDate?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ArrivalCustomPattiMaxAggregateInputType = {
    id?: true
    purchaseId?: true
    pattiNo?: true
    settlementDate?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type ArrivalCustomPattiCountAggregateInputType = {
    id?: true
    purchaseId?: true
    pattiNo?: true
    settlementDate?: true
    items?: true
    totalWeightSold?: true
    grossSalesTotal?: true
    commissionPercent?: true
    commissionAmount?: true
    freightDeducted?: true
    extraFreightDeducted?: true
    associationDeducted?: true
    unloadingDeducted?: true
    miscDeducted?: true
    totalDeductions?: true
    advanceAdjusted?: true
    netPayable?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type ArrivalCustomPattiAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ArrivalCustomPatti to aggregate.
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalCustomPattis to fetch.
     */
    orderBy?: ArrivalCustomPattiOrderByWithRelationInput | ArrivalCustomPattiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ArrivalCustomPattiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalCustomPattis 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` ArrivalCustomPattis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned ArrivalCustomPattis
    **/
    _count?: true | ArrivalCustomPattiCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ArrivalCustomPattiAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ArrivalCustomPattiSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ArrivalCustomPattiMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ArrivalCustomPattiMaxAggregateInputType
  }

  export type GetArrivalCustomPattiAggregateType<T extends ArrivalCustomPattiAggregateArgs> = {
        [P in keyof T & keyof AggregateArrivalCustomPatti]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateArrivalCustomPatti[P]>
      : GetScalarType<T[P], AggregateArrivalCustomPatti[P]>
  }




  export type ArrivalCustomPattiGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ArrivalCustomPattiWhereInput
    orderBy?: ArrivalCustomPattiOrderByWithAggregationInput | ArrivalCustomPattiOrderByWithAggregationInput[]
    by: ArrivalCustomPattiScalarFieldEnum[] | ArrivalCustomPattiScalarFieldEnum
    having?: ArrivalCustomPattiScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ArrivalCustomPattiCountAggregateInputType | true
    _avg?: ArrivalCustomPattiAvgAggregateInputType
    _sum?: ArrivalCustomPattiSumAggregateInputType
    _min?: ArrivalCustomPattiMinAggregateInputType
    _max?: ArrivalCustomPattiMaxAggregateInputType
  }

  export type ArrivalCustomPattiGroupByOutputType = {
    id: bigint
    purchaseId: bigint
    pattiNo: string | null
    settlementDate: Date | null
    items: JsonValue
    totalWeightSold: Decimal
    grossSalesTotal: Decimal
    commissionPercent: Decimal
    commissionAmount: Decimal
    freightDeducted: Decimal
    extraFreightDeducted: Decimal
    associationDeducted: Decimal
    unloadingDeducted: Decimal
    miscDeducted: Decimal
    totalDeductions: Decimal
    advanceAdjusted: Decimal
    netPayable: Decimal
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: ArrivalCustomPattiCountAggregateOutputType | null
    _avg: ArrivalCustomPattiAvgAggregateOutputType | null
    _sum: ArrivalCustomPattiSumAggregateOutputType | null
    _min: ArrivalCustomPattiMinAggregateOutputType | null
    _max: ArrivalCustomPattiMaxAggregateOutputType | null
  }

  type GetArrivalCustomPattiGroupByPayload<T extends ArrivalCustomPattiGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ArrivalCustomPattiGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ArrivalCustomPattiGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ArrivalCustomPattiGroupByOutputType[P]>
            : GetScalarType<T[P], ArrivalCustomPattiGroupByOutputType[P]>
        }
      >
    >


  export type ArrivalCustomPattiSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseId?: boolean
    pattiNo?: boolean
    settlementDate?: boolean
    items?: boolean
    totalWeightSold?: boolean
    grossSalesTotal?: boolean
    commissionPercent?: boolean
    commissionAmount?: boolean
    freightDeducted?: boolean
    extraFreightDeducted?: boolean
    associationDeducted?: boolean
    unloadingDeducted?: boolean
    miscDeducted?: boolean
    totalDeductions?: boolean
    advanceAdjusted?: boolean
    netPayable?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | ArrivalCustomPatti$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["arrivalCustomPatti"]>



  export type ArrivalCustomPattiSelectScalar = {
    id?: boolean
    purchaseId?: boolean
    pattiNo?: boolean
    settlementDate?: boolean
    items?: boolean
    totalWeightSold?: boolean
    grossSalesTotal?: boolean
    commissionPercent?: boolean
    commissionAmount?: boolean
    freightDeducted?: boolean
    extraFreightDeducted?: boolean
    associationDeducted?: boolean
    unloadingDeducted?: boolean
    miscDeducted?: boolean
    totalDeductions?: boolean
    advanceAdjusted?: boolean
    netPayable?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type ArrivalCustomPattiOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseId" | "pattiNo" | "settlementDate" | "items" | "totalWeightSold" | "grossSalesTotal" | "commissionPercent" | "commissionAmount" | "freightDeducted" | "extraFreightDeducted" | "associationDeducted" | "unloadingDeducted" | "miscDeducted" | "totalDeductions" | "advanceAdjusted" | "netPayable" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["arrivalCustomPatti"]>
  export type ArrivalCustomPattiInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | ArrivalCustomPatti$createdByUserArgs<ExtArgs>
  }

  export type $ArrivalCustomPattiPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "ArrivalCustomPatti"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseId: bigint
      pattiNo: string | null
      settlementDate: Date | null
      items: Prisma.JsonValue
      totalWeightSold: Prisma.Decimal
      grossSalesTotal: Prisma.Decimal
      commissionPercent: Prisma.Decimal
      commissionAmount: Prisma.Decimal
      freightDeducted: Prisma.Decimal
      extraFreightDeducted: Prisma.Decimal
      associationDeducted: Prisma.Decimal
      unloadingDeducted: Prisma.Decimal
      miscDeducted: Prisma.Decimal
      totalDeductions: Prisma.Decimal
      advanceAdjusted: Prisma.Decimal
      netPayable: Prisma.Decimal
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["arrivalCustomPatti"]>
    composites: {}
  }

  type ArrivalCustomPattiGetPayload<S extends boolean | null | undefined | ArrivalCustomPattiDefaultArgs> = $Result.GetResult<Prisma.$ArrivalCustomPattiPayload, S>

  type ArrivalCustomPattiCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ArrivalCustomPattiFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ArrivalCustomPattiCountAggregateInputType | true
    }

  export interface ArrivalCustomPattiDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ArrivalCustomPatti'], meta: { name: 'ArrivalCustomPatti' } }
    /**
     * Find zero or one ArrivalCustomPatti that matches the filter.
     * @param {ArrivalCustomPattiFindUniqueArgs} args - Arguments to find a ArrivalCustomPatti
     * @example
     * // Get one ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ArrivalCustomPattiFindUniqueArgs>(args: SelectSubset<T, ArrivalCustomPattiFindUniqueArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one ArrivalCustomPatti that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ArrivalCustomPattiFindUniqueOrThrowArgs} args - Arguments to find a ArrivalCustomPatti
     * @example
     * // Get one ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ArrivalCustomPattiFindUniqueOrThrowArgs>(args: SelectSubset<T, ArrivalCustomPattiFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ArrivalCustomPatti 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 {ArrivalCustomPattiFindFirstArgs} args - Arguments to find a ArrivalCustomPatti
     * @example
     * // Get one ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ArrivalCustomPattiFindFirstArgs>(args?: SelectSubset<T, ArrivalCustomPattiFindFirstArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first ArrivalCustomPatti 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 {ArrivalCustomPattiFindFirstOrThrowArgs} args - Arguments to find a ArrivalCustomPatti
     * @example
     * // Get one ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ArrivalCustomPattiFindFirstOrThrowArgs>(args?: SelectSubset<T, ArrivalCustomPattiFindFirstOrThrowArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more ArrivalCustomPattis 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 {ArrivalCustomPattiFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all ArrivalCustomPattis
     * const arrivalCustomPattis = await prisma.arrivalCustomPatti.findMany()
     * 
     * // Get first 10 ArrivalCustomPattis
     * const arrivalCustomPattis = await prisma.arrivalCustomPatti.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const arrivalCustomPattiWithIdOnly = await prisma.arrivalCustomPatti.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ArrivalCustomPattiFindManyArgs>(args?: SelectSubset<T, ArrivalCustomPattiFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a ArrivalCustomPatti.
     * @param {ArrivalCustomPattiCreateArgs} args - Arguments to create a ArrivalCustomPatti.
     * @example
     * // Create one ArrivalCustomPatti
     * const ArrivalCustomPatti = await prisma.arrivalCustomPatti.create({
     *   data: {
     *     // ... data to create a ArrivalCustomPatti
     *   }
     * })
     * 
     */
    create<T extends ArrivalCustomPattiCreateArgs>(args: SelectSubset<T, ArrivalCustomPattiCreateArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many ArrivalCustomPattis.
     * @param {ArrivalCustomPattiCreateManyArgs} args - Arguments to create many ArrivalCustomPattis.
     * @example
     * // Create many ArrivalCustomPattis
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ArrivalCustomPattiCreateManyArgs>(args?: SelectSubset<T, ArrivalCustomPattiCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a ArrivalCustomPatti.
     * @param {ArrivalCustomPattiDeleteArgs} args - Arguments to delete one ArrivalCustomPatti.
     * @example
     * // Delete one ArrivalCustomPatti
     * const ArrivalCustomPatti = await prisma.arrivalCustomPatti.delete({
     *   where: {
     *     // ... filter to delete one ArrivalCustomPatti
     *   }
     * })
     * 
     */
    delete<T extends ArrivalCustomPattiDeleteArgs>(args: SelectSubset<T, ArrivalCustomPattiDeleteArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one ArrivalCustomPatti.
     * @param {ArrivalCustomPattiUpdateArgs} args - Arguments to update one ArrivalCustomPatti.
     * @example
     * // Update one ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ArrivalCustomPattiUpdateArgs>(args: SelectSubset<T, ArrivalCustomPattiUpdateArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more ArrivalCustomPattis.
     * @param {ArrivalCustomPattiDeleteManyArgs} args - Arguments to filter ArrivalCustomPattis to delete.
     * @example
     * // Delete a few ArrivalCustomPattis
     * const { count } = await prisma.arrivalCustomPatti.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ArrivalCustomPattiDeleteManyArgs>(args?: SelectSubset<T, ArrivalCustomPattiDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more ArrivalCustomPattis.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalCustomPattiUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many ArrivalCustomPattis
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ArrivalCustomPattiUpdateManyArgs>(args: SelectSubset<T, ArrivalCustomPattiUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one ArrivalCustomPatti.
     * @param {ArrivalCustomPattiUpsertArgs} args - Arguments to update or create a ArrivalCustomPatti.
     * @example
     * // Update or create a ArrivalCustomPatti
     * const arrivalCustomPatti = await prisma.arrivalCustomPatti.upsert({
     *   create: {
     *     // ... data to create a ArrivalCustomPatti
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the ArrivalCustomPatti we want to update
     *   }
     * })
     */
    upsert<T extends ArrivalCustomPattiUpsertArgs>(args: SelectSubset<T, ArrivalCustomPattiUpsertArgs<ExtArgs>>): Prisma__ArrivalCustomPattiClient<$Result.GetResult<Prisma.$ArrivalCustomPattiPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of ArrivalCustomPattis.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalCustomPattiCountArgs} args - Arguments to filter ArrivalCustomPattis to count.
     * @example
     * // Count the number of ArrivalCustomPattis
     * const count = await prisma.arrivalCustomPatti.count({
     *   where: {
     *     // ... the filter for the ArrivalCustomPattis we want to count
     *   }
     * })
    **/
    count<T extends ArrivalCustomPattiCountArgs>(
      args?: Subset<T, ArrivalCustomPattiCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ArrivalCustomPattiCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a ArrivalCustomPatti.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalCustomPattiAggregateArgs} 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 ArrivalCustomPattiAggregateArgs>(args: Subset<T, ArrivalCustomPattiAggregateArgs>): Prisma.PrismaPromise<GetArrivalCustomPattiAggregateType<T>>

    /**
     * Group by ArrivalCustomPatti.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ArrivalCustomPattiGroupByArgs} 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 ArrivalCustomPattiGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ArrivalCustomPattiGroupByArgs['orderBy'] }
        : { orderBy?: ArrivalCustomPattiGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ArrivalCustomPattiGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetArrivalCustomPattiGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the ArrivalCustomPatti model
   */
  readonly fields: ArrivalCustomPattiFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for ArrivalCustomPatti.
   * 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__ArrivalCustomPattiClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends ArrivalCustomPatti$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, ArrivalCustomPatti$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the ArrivalCustomPatti model
   */
  interface ArrivalCustomPattiFieldRefs {
    readonly id: FieldRef<"ArrivalCustomPatti", 'BigInt'>
    readonly purchaseId: FieldRef<"ArrivalCustomPatti", 'BigInt'>
    readonly pattiNo: FieldRef<"ArrivalCustomPatti", 'String'>
    readonly settlementDate: FieldRef<"ArrivalCustomPatti", 'DateTime'>
    readonly items: FieldRef<"ArrivalCustomPatti", 'Json'>
    readonly totalWeightSold: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly grossSalesTotal: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly commissionPercent: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly commissionAmount: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly freightDeducted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly extraFreightDeducted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly associationDeducted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly unloadingDeducted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly miscDeducted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly totalDeductions: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly advanceAdjusted: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly netPayable: FieldRef<"ArrivalCustomPatti", 'Decimal'>
    readonly remarks: FieldRef<"ArrivalCustomPatti", 'String'>
    readonly createdAt: FieldRef<"ArrivalCustomPatti", 'DateTime'>
    readonly updatedAt: FieldRef<"ArrivalCustomPatti", 'DateTime'>
    readonly createdBy: FieldRef<"ArrivalCustomPatti", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * ArrivalCustomPatti findUnique
   */
  export type ArrivalCustomPattiFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalCustomPatti to fetch.
     */
    where: ArrivalCustomPattiWhereUniqueInput
  }

  /**
   * ArrivalCustomPatti findUniqueOrThrow
   */
  export type ArrivalCustomPattiFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalCustomPatti to fetch.
     */
    where: ArrivalCustomPattiWhereUniqueInput
  }

  /**
   * ArrivalCustomPatti findFirst
   */
  export type ArrivalCustomPattiFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalCustomPatti to fetch.
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalCustomPattis to fetch.
     */
    orderBy?: ArrivalCustomPattiOrderByWithRelationInput | ArrivalCustomPattiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ArrivalCustomPattis.
     */
    cursor?: ArrivalCustomPattiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalCustomPattis 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` ArrivalCustomPattis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalCustomPattis.
     */
    distinct?: ArrivalCustomPattiScalarFieldEnum | ArrivalCustomPattiScalarFieldEnum[]
  }

  /**
   * ArrivalCustomPatti findFirstOrThrow
   */
  export type ArrivalCustomPattiFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalCustomPatti to fetch.
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalCustomPattis to fetch.
     */
    orderBy?: ArrivalCustomPattiOrderByWithRelationInput | ArrivalCustomPattiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for ArrivalCustomPattis.
     */
    cursor?: ArrivalCustomPattiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalCustomPattis 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` ArrivalCustomPattis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalCustomPattis.
     */
    distinct?: ArrivalCustomPattiScalarFieldEnum | ArrivalCustomPattiScalarFieldEnum[]
  }

  /**
   * ArrivalCustomPatti findMany
   */
  export type ArrivalCustomPattiFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter, which ArrivalCustomPattis to fetch.
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of ArrivalCustomPattis to fetch.
     */
    orderBy?: ArrivalCustomPattiOrderByWithRelationInput | ArrivalCustomPattiOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing ArrivalCustomPattis.
     */
    cursor?: ArrivalCustomPattiWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` ArrivalCustomPattis 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` ArrivalCustomPattis.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of ArrivalCustomPattis.
     */
    distinct?: ArrivalCustomPattiScalarFieldEnum | ArrivalCustomPattiScalarFieldEnum[]
  }

  /**
   * ArrivalCustomPatti create
   */
  export type ArrivalCustomPattiCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * The data needed to create a ArrivalCustomPatti.
     */
    data: XOR<ArrivalCustomPattiCreateInput, ArrivalCustomPattiUncheckedCreateInput>
  }

  /**
   * ArrivalCustomPatti createMany
   */
  export type ArrivalCustomPattiCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many ArrivalCustomPattis.
     */
    data: ArrivalCustomPattiCreateManyInput | ArrivalCustomPattiCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * ArrivalCustomPatti update
   */
  export type ArrivalCustomPattiUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * The data needed to update a ArrivalCustomPatti.
     */
    data: XOR<ArrivalCustomPattiUpdateInput, ArrivalCustomPattiUncheckedUpdateInput>
    /**
     * Choose, which ArrivalCustomPatti to update.
     */
    where: ArrivalCustomPattiWhereUniqueInput
  }

  /**
   * ArrivalCustomPatti updateMany
   */
  export type ArrivalCustomPattiUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update ArrivalCustomPattis.
     */
    data: XOR<ArrivalCustomPattiUpdateManyMutationInput, ArrivalCustomPattiUncheckedUpdateManyInput>
    /**
     * Filter which ArrivalCustomPattis to update
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * Limit how many ArrivalCustomPattis to update.
     */
    limit?: number
  }

  /**
   * ArrivalCustomPatti upsert
   */
  export type ArrivalCustomPattiUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * The filter to search for the ArrivalCustomPatti to update in case it exists.
     */
    where: ArrivalCustomPattiWhereUniqueInput
    /**
     * In case the ArrivalCustomPatti found by the `where` argument doesn't exist, create a new ArrivalCustomPatti with this data.
     */
    create: XOR<ArrivalCustomPattiCreateInput, ArrivalCustomPattiUncheckedCreateInput>
    /**
     * In case the ArrivalCustomPatti was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ArrivalCustomPattiUpdateInput, ArrivalCustomPattiUncheckedUpdateInput>
  }

  /**
   * ArrivalCustomPatti delete
   */
  export type ArrivalCustomPattiDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
    /**
     * Filter which ArrivalCustomPatti to delete.
     */
    where: ArrivalCustomPattiWhereUniqueInput
  }

  /**
   * ArrivalCustomPatti deleteMany
   */
  export type ArrivalCustomPattiDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which ArrivalCustomPattis to delete
     */
    where?: ArrivalCustomPattiWhereInput
    /**
     * Limit how many ArrivalCustomPattis to delete.
     */
    limit?: number
  }

  /**
   * ArrivalCustomPatti.createdByUser
   */
  export type ArrivalCustomPatti$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * ArrivalCustomPatti without action
   */
  export type ArrivalCustomPattiDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ArrivalCustomPatti
     */
    select?: ArrivalCustomPattiSelect<ExtArgs> | null
    /**
     * Omit specific fields from the ArrivalCustomPatti
     */
    omit?: ArrivalCustomPattiOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ArrivalCustomPattiInclude<ExtArgs> | null
  }


  /**
   * Model Quotation
   */

  export type AggregateQuotation = {
    _count: QuotationCountAggregateOutputType | null
    _avg: QuotationAvgAggregateOutputType | null
    _sum: QuotationSumAggregateOutputType | null
    _min: QuotationMinAggregateOutputType | null
    _max: QuotationMaxAggregateOutputType | null
  }

  export type QuotationAvgAggregateOutputType = {
    id: number | null
    customerId: number | null
    amount: Decimal | null
    extraCharge: Decimal | null
    discount: Decimal | null
    totalAmount: Decimal | null
    createdBy: number | null
  }

  export type QuotationSumAggregateOutputType = {
    id: bigint | null
    customerId: bigint | null
    amount: Decimal | null
    extraCharge: Decimal | null
    discount: Decimal | null
    totalAmount: Decimal | null
    createdBy: bigint | null
  }

  export type QuotationMinAggregateOutputType = {
    id: bigint | null
    quotationNo: string | null
    customerId: bigint | null
    customerName: string | null
    quotationDate: Date | null
    amount: Decimal | null
    extraCharge: Decimal | null
    discount: Decimal | null
    totalAmount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type QuotationMaxAggregateOutputType = {
    id: bigint | null
    quotationNo: string | null
    customerId: bigint | null
    customerName: string | null
    quotationDate: Date | null
    amount: Decimal | null
    extraCharge: Decimal | null
    discount: Decimal | null
    totalAmount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type QuotationCountAggregateOutputType = {
    id: number
    quotationNo: number
    customerId: number
    customerName: number
    quotationDate: number
    amount: number
    extraCharge: number
    discount: number
    totalAmount: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type QuotationAvgAggregateInputType = {
    id?: true
    customerId?: true
    amount?: true
    extraCharge?: true
    discount?: true
    totalAmount?: true
    createdBy?: true
  }

  export type QuotationSumAggregateInputType = {
    id?: true
    customerId?: true
    amount?: true
    extraCharge?: true
    discount?: true
    totalAmount?: true
    createdBy?: true
  }

  export type QuotationMinAggregateInputType = {
    id?: true
    quotationNo?: true
    customerId?: true
    customerName?: true
    quotationDate?: true
    amount?: true
    extraCharge?: true
    discount?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type QuotationMaxAggregateInputType = {
    id?: true
    quotationNo?: true
    customerId?: true
    customerName?: true
    quotationDate?: true
    amount?: true
    extraCharge?: true
    discount?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type QuotationCountAggregateInputType = {
    id?: true
    quotationNo?: true
    customerId?: true
    customerName?: true
    quotationDate?: true
    amount?: true
    extraCharge?: true
    discount?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type QuotationAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Quotation to aggregate.
     */
    where?: QuotationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Quotations to fetch.
     */
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: QuotationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Quotations 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` Quotations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Quotations
    **/
    _count?: true | QuotationCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: QuotationAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: QuotationSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: QuotationMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: QuotationMaxAggregateInputType
  }

  export type GetQuotationAggregateType<T extends QuotationAggregateArgs> = {
        [P in keyof T & keyof AggregateQuotation]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateQuotation[P]>
      : GetScalarType<T[P], AggregateQuotation[P]>
  }




  export type QuotationGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationWhereInput
    orderBy?: QuotationOrderByWithAggregationInput | QuotationOrderByWithAggregationInput[]
    by: QuotationScalarFieldEnum[] | QuotationScalarFieldEnum
    having?: QuotationScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: QuotationCountAggregateInputType | true
    _avg?: QuotationAvgAggregateInputType
    _sum?: QuotationSumAggregateInputType
    _min?: QuotationMinAggregateInputType
    _max?: QuotationMaxAggregateInputType
  }

  export type QuotationGroupByOutputType = {
    id: bigint
    quotationNo: string
    customerId: bigint | null
    customerName: string
    quotationDate: Date
    amount: Decimal
    extraCharge: Decimal
    discount: Decimal
    totalAmount: Decimal
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: QuotationCountAggregateOutputType | null
    _avg: QuotationAvgAggregateOutputType | null
    _sum: QuotationSumAggregateOutputType | null
    _min: QuotationMinAggregateOutputType | null
    _max: QuotationMaxAggregateOutputType | null
  }

  type GetQuotationGroupByPayload<T extends QuotationGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<QuotationGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof QuotationGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], QuotationGroupByOutputType[P]>
            : GetScalarType<T[P], QuotationGroupByOutputType[P]>
        }
      >
    >


  export type QuotationSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    quotationNo?: boolean
    customerId?: boolean
    customerName?: boolean
    quotationDate?: boolean
    amount?: boolean
    extraCharge?: boolean
    discount?: boolean
    totalAmount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    customer?: boolean | Quotation$customerArgs<ExtArgs>
    items?: boolean | Quotation$itemsArgs<ExtArgs>
    createdByUser?: boolean | Quotation$createdByUserArgs<ExtArgs>
    _count?: boolean | QuotationCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["quotation"]>



  export type QuotationSelectScalar = {
    id?: boolean
    quotationNo?: boolean
    customerId?: boolean
    customerName?: boolean
    quotationDate?: boolean
    amount?: boolean
    extraCharge?: boolean
    discount?: boolean
    totalAmount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type QuotationOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "quotationNo" | "customerId" | "customerName" | "quotationDate" | "amount" | "extraCharge" | "discount" | "totalAmount" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["quotation"]>
  export type QuotationInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    customer?: boolean | Quotation$customerArgs<ExtArgs>
    items?: boolean | Quotation$itemsArgs<ExtArgs>
    createdByUser?: boolean | Quotation$createdByUserArgs<ExtArgs>
    _count?: boolean | QuotationCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $QuotationPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Quotation"
    objects: {
      customer: Prisma.$CustomerPayload<ExtArgs> | null
      items: Prisma.$QuotationItemPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      quotationNo: string
      customerId: bigint | null
      customerName: string
      quotationDate: Date
      amount: Prisma.Decimal
      extraCharge: Prisma.Decimal
      discount: Prisma.Decimal
      totalAmount: Prisma.Decimal
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["quotation"]>
    composites: {}
  }

  type QuotationGetPayload<S extends boolean | null | undefined | QuotationDefaultArgs> = $Result.GetResult<Prisma.$QuotationPayload, S>

  type QuotationCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<QuotationFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: QuotationCountAggregateInputType | true
    }

  export interface QuotationDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Quotation'], meta: { name: 'Quotation' } }
    /**
     * Find zero or one Quotation that matches the filter.
     * @param {QuotationFindUniqueArgs} args - Arguments to find a Quotation
     * @example
     * // Get one Quotation
     * const quotation = await prisma.quotation.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends QuotationFindUniqueArgs>(args: SelectSubset<T, QuotationFindUniqueArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Quotation that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {QuotationFindUniqueOrThrowArgs} args - Arguments to find a Quotation
     * @example
     * // Get one Quotation
     * const quotation = await prisma.quotation.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends QuotationFindUniqueOrThrowArgs>(args: SelectSubset<T, QuotationFindUniqueOrThrowArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Quotation 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 {QuotationFindFirstArgs} args - Arguments to find a Quotation
     * @example
     * // Get one Quotation
     * const quotation = await prisma.quotation.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends QuotationFindFirstArgs>(args?: SelectSubset<T, QuotationFindFirstArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Quotation 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 {QuotationFindFirstOrThrowArgs} args - Arguments to find a Quotation
     * @example
     * // Get one Quotation
     * const quotation = await prisma.quotation.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends QuotationFindFirstOrThrowArgs>(args?: SelectSubset<T, QuotationFindFirstOrThrowArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Quotations 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 {QuotationFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Quotations
     * const quotations = await prisma.quotation.findMany()
     * 
     * // Get first 10 Quotations
     * const quotations = await prisma.quotation.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const quotationWithIdOnly = await prisma.quotation.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends QuotationFindManyArgs>(args?: SelectSubset<T, QuotationFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Quotation.
     * @param {QuotationCreateArgs} args - Arguments to create a Quotation.
     * @example
     * // Create one Quotation
     * const Quotation = await prisma.quotation.create({
     *   data: {
     *     // ... data to create a Quotation
     *   }
     * })
     * 
     */
    create<T extends QuotationCreateArgs>(args: SelectSubset<T, QuotationCreateArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Quotations.
     * @param {QuotationCreateManyArgs} args - Arguments to create many Quotations.
     * @example
     * // Create many Quotations
     * const quotation = await prisma.quotation.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends QuotationCreateManyArgs>(args?: SelectSubset<T, QuotationCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Quotation.
     * @param {QuotationDeleteArgs} args - Arguments to delete one Quotation.
     * @example
     * // Delete one Quotation
     * const Quotation = await prisma.quotation.delete({
     *   where: {
     *     // ... filter to delete one Quotation
     *   }
     * })
     * 
     */
    delete<T extends QuotationDeleteArgs>(args: SelectSubset<T, QuotationDeleteArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Quotation.
     * @param {QuotationUpdateArgs} args - Arguments to update one Quotation.
     * @example
     * // Update one Quotation
     * const quotation = await prisma.quotation.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends QuotationUpdateArgs>(args: SelectSubset<T, QuotationUpdateArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Quotations.
     * @param {QuotationDeleteManyArgs} args - Arguments to filter Quotations to delete.
     * @example
     * // Delete a few Quotations
     * const { count } = await prisma.quotation.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends QuotationDeleteManyArgs>(args?: SelectSubset<T, QuotationDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Quotations.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Quotations
     * const quotation = await prisma.quotation.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends QuotationUpdateManyArgs>(args: SelectSubset<T, QuotationUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Quotation.
     * @param {QuotationUpsertArgs} args - Arguments to update or create a Quotation.
     * @example
     * // Update or create a Quotation
     * const quotation = await prisma.quotation.upsert({
     *   create: {
     *     // ... data to create a Quotation
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Quotation we want to update
     *   }
     * })
     */
    upsert<T extends QuotationUpsertArgs>(args: SelectSubset<T, QuotationUpsertArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Quotations.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationCountArgs} args - Arguments to filter Quotations to count.
     * @example
     * // Count the number of Quotations
     * const count = await prisma.quotation.count({
     *   where: {
     *     // ... the filter for the Quotations we want to count
     *   }
     * })
    **/
    count<T extends QuotationCountArgs>(
      args?: Subset<T, QuotationCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], QuotationCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Quotation.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationAggregateArgs} 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 QuotationAggregateArgs>(args: Subset<T, QuotationAggregateArgs>): Prisma.PrismaPromise<GetQuotationAggregateType<T>>

    /**
     * Group by Quotation.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationGroupByArgs} 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 QuotationGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: QuotationGroupByArgs['orderBy'] }
        : { orderBy?: QuotationGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, QuotationGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetQuotationGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Quotation model
   */
  readonly fields: QuotationFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Quotation.
   * 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__QuotationClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    customer<T extends Quotation$customerArgs<ExtArgs> = {}>(args?: Subset<T, Quotation$customerArgs<ExtArgs>>): Prisma__CustomerClient<$Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    items<T extends Quotation$itemsArgs<ExtArgs> = {}>(args?: Subset<T, Quotation$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Quotation$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Quotation$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Quotation model
   */
  interface QuotationFieldRefs {
    readonly id: FieldRef<"Quotation", 'BigInt'>
    readonly quotationNo: FieldRef<"Quotation", 'String'>
    readonly customerId: FieldRef<"Quotation", 'BigInt'>
    readonly customerName: FieldRef<"Quotation", 'String'>
    readonly quotationDate: FieldRef<"Quotation", 'DateTime'>
    readonly amount: FieldRef<"Quotation", 'Decimal'>
    readonly extraCharge: FieldRef<"Quotation", 'Decimal'>
    readonly discount: FieldRef<"Quotation", 'Decimal'>
    readonly totalAmount: FieldRef<"Quotation", 'Decimal'>
    readonly createdAt: FieldRef<"Quotation", 'DateTime'>
    readonly updatedAt: FieldRef<"Quotation", 'DateTime'>
    readonly createdBy: FieldRef<"Quotation", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Quotation findUnique
   */
  export type QuotationFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter, which Quotation to fetch.
     */
    where: QuotationWhereUniqueInput
  }

  /**
   * Quotation findUniqueOrThrow
   */
  export type QuotationFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter, which Quotation to fetch.
     */
    where: QuotationWhereUniqueInput
  }

  /**
   * Quotation findFirst
   */
  export type QuotationFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter, which Quotation to fetch.
     */
    where?: QuotationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Quotations to fetch.
     */
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Quotations.
     */
    cursor?: QuotationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Quotations 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` Quotations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Quotations.
     */
    distinct?: QuotationScalarFieldEnum | QuotationScalarFieldEnum[]
  }

  /**
   * Quotation findFirstOrThrow
   */
  export type QuotationFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter, which Quotation to fetch.
     */
    where?: QuotationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Quotations to fetch.
     */
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Quotations.
     */
    cursor?: QuotationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Quotations 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` Quotations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Quotations.
     */
    distinct?: QuotationScalarFieldEnum | QuotationScalarFieldEnum[]
  }

  /**
   * Quotation findMany
   */
  export type QuotationFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter, which Quotations to fetch.
     */
    where?: QuotationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Quotations to fetch.
     */
    orderBy?: QuotationOrderByWithRelationInput | QuotationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Quotations.
     */
    cursor?: QuotationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Quotations 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` Quotations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Quotations.
     */
    distinct?: QuotationScalarFieldEnum | QuotationScalarFieldEnum[]
  }

  /**
   * Quotation create
   */
  export type QuotationCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * The data needed to create a Quotation.
     */
    data: XOR<QuotationCreateInput, QuotationUncheckedCreateInput>
  }

  /**
   * Quotation createMany
   */
  export type QuotationCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Quotations.
     */
    data: QuotationCreateManyInput | QuotationCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Quotation update
   */
  export type QuotationUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * The data needed to update a Quotation.
     */
    data: XOR<QuotationUpdateInput, QuotationUncheckedUpdateInput>
    /**
     * Choose, which Quotation to update.
     */
    where: QuotationWhereUniqueInput
  }

  /**
   * Quotation updateMany
   */
  export type QuotationUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Quotations.
     */
    data: XOR<QuotationUpdateManyMutationInput, QuotationUncheckedUpdateManyInput>
    /**
     * Filter which Quotations to update
     */
    where?: QuotationWhereInput
    /**
     * Limit how many Quotations to update.
     */
    limit?: number
  }

  /**
   * Quotation upsert
   */
  export type QuotationUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * The filter to search for the Quotation to update in case it exists.
     */
    where: QuotationWhereUniqueInput
    /**
     * In case the Quotation found by the `where` argument doesn't exist, create a new Quotation with this data.
     */
    create: XOR<QuotationCreateInput, QuotationUncheckedCreateInput>
    /**
     * In case the Quotation was found with the provided `where` argument, update it with this data.
     */
    update: XOR<QuotationUpdateInput, QuotationUncheckedUpdateInput>
  }

  /**
   * Quotation delete
   */
  export type QuotationDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
    /**
     * Filter which Quotation to delete.
     */
    where: QuotationWhereUniqueInput
  }

  /**
   * Quotation deleteMany
   */
  export type QuotationDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Quotations to delete
     */
    where?: QuotationWhereInput
    /**
     * Limit how many Quotations to delete.
     */
    limit?: number
  }

  /**
   * Quotation.customer
   */
  export type Quotation$customerArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Customer
     */
    select?: CustomerSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Customer
     */
    omit?: CustomerOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CustomerInclude<ExtArgs> | null
    where?: CustomerWhereInput
  }

  /**
   * Quotation.items
   */
  export type Quotation$itemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    where?: QuotationItemWhereInput
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    cursor?: QuotationItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * Quotation.createdByUser
   */
  export type Quotation$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Quotation without action
   */
  export type QuotationDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Quotation
     */
    select?: QuotationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Quotation
     */
    omit?: QuotationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationInclude<ExtArgs> | null
  }


  /**
   * Model QuotationItem
   */

  export type AggregateQuotationItem = {
    _count: QuotationItemCountAggregateOutputType | null
    _avg: QuotationItemAvgAggregateOutputType | null
    _sum: QuotationItemSumAggregateOutputType | null
    _min: QuotationItemMinAggregateOutputType | null
    _max: QuotationItemMaxAggregateOutputType | null
  }

  export type QuotationItemAvgAggregateOutputType = {
    id: number | null
    quotationId: number | null
    vegetableId: number | null
    quantity: Decimal | null
    price: Decimal | null
    amount: Decimal | null
    createdBy: number | null
  }

  export type QuotationItemSumAggregateOutputType = {
    id: bigint | null
    quotationId: bigint | null
    vegetableId: bigint | null
    quantity: Decimal | null
    price: Decimal | null
    amount: Decimal | null
    createdBy: bigint | null
  }

  export type QuotationItemMinAggregateOutputType = {
    id: bigint | null
    quotationId: bigint | null
    vegetableId: bigint | null
    vegName: string | null
    hsnCode: string | null
    quantity: Decimal | null
    unit: string | null
    price: Decimal | null
    amount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type QuotationItemMaxAggregateOutputType = {
    id: bigint | null
    quotationId: bigint | null
    vegetableId: bigint | null
    vegName: string | null
    hsnCode: string | null
    quantity: Decimal | null
    unit: string | null
    price: Decimal | null
    amount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type QuotationItemCountAggregateOutputType = {
    id: number
    quotationId: number
    vegetableId: number
    vegName: number
    hsnCode: number
    quantity: number
    unit: number
    price: number
    amount: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type QuotationItemAvgAggregateInputType = {
    id?: true
    quotationId?: true
    vegetableId?: true
    quantity?: true
    price?: true
    amount?: true
    createdBy?: true
  }

  export type QuotationItemSumAggregateInputType = {
    id?: true
    quotationId?: true
    vegetableId?: true
    quantity?: true
    price?: true
    amount?: true
    createdBy?: true
  }

  export type QuotationItemMinAggregateInputType = {
    id?: true
    quotationId?: true
    vegetableId?: true
    vegName?: true
    hsnCode?: true
    quantity?: true
    unit?: true
    price?: true
    amount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type QuotationItemMaxAggregateInputType = {
    id?: true
    quotationId?: true
    vegetableId?: true
    vegName?: true
    hsnCode?: true
    quantity?: true
    unit?: true
    price?: true
    amount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type QuotationItemCountAggregateInputType = {
    id?: true
    quotationId?: true
    vegetableId?: true
    vegName?: true
    hsnCode?: true
    quantity?: true
    unit?: true
    price?: true
    amount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type QuotationItemAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which QuotationItem to aggregate.
     */
    where?: QuotationItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of QuotationItems to fetch.
     */
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: QuotationItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` QuotationItems 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` QuotationItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned QuotationItems
    **/
    _count?: true | QuotationItemCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: QuotationItemAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: QuotationItemSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: QuotationItemMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: QuotationItemMaxAggregateInputType
  }

  export type GetQuotationItemAggregateType<T extends QuotationItemAggregateArgs> = {
        [P in keyof T & keyof AggregateQuotationItem]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateQuotationItem[P]>
      : GetScalarType<T[P], AggregateQuotationItem[P]>
  }




  export type QuotationItemGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: QuotationItemWhereInput
    orderBy?: QuotationItemOrderByWithAggregationInput | QuotationItemOrderByWithAggregationInput[]
    by: QuotationItemScalarFieldEnum[] | QuotationItemScalarFieldEnum
    having?: QuotationItemScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: QuotationItemCountAggregateInputType | true
    _avg?: QuotationItemAvgAggregateInputType
    _sum?: QuotationItemSumAggregateInputType
    _min?: QuotationItemMinAggregateInputType
    _max?: QuotationItemMaxAggregateInputType
  }

  export type QuotationItemGroupByOutputType = {
    id: bigint
    quotationId: bigint
    vegetableId: bigint | null
    vegName: string
    hsnCode: string | null
    quantity: Decimal
    unit: string
    price: Decimal
    amount: Decimal
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: QuotationItemCountAggregateOutputType | null
    _avg: QuotationItemAvgAggregateOutputType | null
    _sum: QuotationItemSumAggregateOutputType | null
    _min: QuotationItemMinAggregateOutputType | null
    _max: QuotationItemMaxAggregateOutputType | null
  }

  type GetQuotationItemGroupByPayload<T extends QuotationItemGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<QuotationItemGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof QuotationItemGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], QuotationItemGroupByOutputType[P]>
            : GetScalarType<T[P], QuotationItemGroupByOutputType[P]>
        }
      >
    >


  export type QuotationItemSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    quotationId?: boolean
    vegetableId?: boolean
    vegName?: boolean
    hsnCode?: boolean
    quantity?: boolean
    unit?: boolean
    price?: boolean
    amount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    quotation?: boolean | QuotationDefaultArgs<ExtArgs>
    vegetable?: boolean | QuotationItem$vegetableArgs<ExtArgs>
    createdByUser?: boolean | QuotationItem$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["quotationItem"]>



  export type QuotationItemSelectScalar = {
    id?: boolean
    quotationId?: boolean
    vegetableId?: boolean
    vegName?: boolean
    hsnCode?: boolean
    quantity?: boolean
    unit?: boolean
    price?: boolean
    amount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type QuotationItemOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "quotationId" | "vegetableId" | "vegName" | "hsnCode" | "quantity" | "unit" | "price" | "amount" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["quotationItem"]>
  export type QuotationItemInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    quotation?: boolean | QuotationDefaultArgs<ExtArgs>
    vegetable?: boolean | QuotationItem$vegetableArgs<ExtArgs>
    createdByUser?: boolean | QuotationItem$createdByUserArgs<ExtArgs>
  }

  export type $QuotationItemPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "QuotationItem"
    objects: {
      quotation: Prisma.$QuotationPayload<ExtArgs>
      vegetable: Prisma.$VegetablePayload<ExtArgs> | null
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      quotationId: bigint
      vegetableId: bigint | null
      vegName: string
      hsnCode: string | null
      quantity: Prisma.Decimal
      unit: string
      price: Prisma.Decimal
      amount: Prisma.Decimal
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["quotationItem"]>
    composites: {}
  }

  type QuotationItemGetPayload<S extends boolean | null | undefined | QuotationItemDefaultArgs> = $Result.GetResult<Prisma.$QuotationItemPayload, S>

  type QuotationItemCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<QuotationItemFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: QuotationItemCountAggregateInputType | true
    }

  export interface QuotationItemDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['QuotationItem'], meta: { name: 'QuotationItem' } }
    /**
     * Find zero or one QuotationItem that matches the filter.
     * @param {QuotationItemFindUniqueArgs} args - Arguments to find a QuotationItem
     * @example
     * // Get one QuotationItem
     * const quotationItem = await prisma.quotationItem.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends QuotationItemFindUniqueArgs>(args: SelectSubset<T, QuotationItemFindUniqueArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one QuotationItem that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {QuotationItemFindUniqueOrThrowArgs} args - Arguments to find a QuotationItem
     * @example
     * // Get one QuotationItem
     * const quotationItem = await prisma.quotationItem.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends QuotationItemFindUniqueOrThrowArgs>(args: SelectSubset<T, QuotationItemFindUniqueOrThrowArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first QuotationItem 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 {QuotationItemFindFirstArgs} args - Arguments to find a QuotationItem
     * @example
     * // Get one QuotationItem
     * const quotationItem = await prisma.quotationItem.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends QuotationItemFindFirstArgs>(args?: SelectSubset<T, QuotationItemFindFirstArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first QuotationItem 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 {QuotationItemFindFirstOrThrowArgs} args - Arguments to find a QuotationItem
     * @example
     * // Get one QuotationItem
     * const quotationItem = await prisma.quotationItem.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends QuotationItemFindFirstOrThrowArgs>(args?: SelectSubset<T, QuotationItemFindFirstOrThrowArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more QuotationItems 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 {QuotationItemFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all QuotationItems
     * const quotationItems = await prisma.quotationItem.findMany()
     * 
     * // Get first 10 QuotationItems
     * const quotationItems = await prisma.quotationItem.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const quotationItemWithIdOnly = await prisma.quotationItem.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends QuotationItemFindManyArgs>(args?: SelectSubset<T, QuotationItemFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a QuotationItem.
     * @param {QuotationItemCreateArgs} args - Arguments to create a QuotationItem.
     * @example
     * // Create one QuotationItem
     * const QuotationItem = await prisma.quotationItem.create({
     *   data: {
     *     // ... data to create a QuotationItem
     *   }
     * })
     * 
     */
    create<T extends QuotationItemCreateArgs>(args: SelectSubset<T, QuotationItemCreateArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many QuotationItems.
     * @param {QuotationItemCreateManyArgs} args - Arguments to create many QuotationItems.
     * @example
     * // Create many QuotationItems
     * const quotationItem = await prisma.quotationItem.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends QuotationItemCreateManyArgs>(args?: SelectSubset<T, QuotationItemCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a QuotationItem.
     * @param {QuotationItemDeleteArgs} args - Arguments to delete one QuotationItem.
     * @example
     * // Delete one QuotationItem
     * const QuotationItem = await prisma.quotationItem.delete({
     *   where: {
     *     // ... filter to delete one QuotationItem
     *   }
     * })
     * 
     */
    delete<T extends QuotationItemDeleteArgs>(args: SelectSubset<T, QuotationItemDeleteArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one QuotationItem.
     * @param {QuotationItemUpdateArgs} args - Arguments to update one QuotationItem.
     * @example
     * // Update one QuotationItem
     * const quotationItem = await prisma.quotationItem.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends QuotationItemUpdateArgs>(args: SelectSubset<T, QuotationItemUpdateArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more QuotationItems.
     * @param {QuotationItemDeleteManyArgs} args - Arguments to filter QuotationItems to delete.
     * @example
     * // Delete a few QuotationItems
     * const { count } = await prisma.quotationItem.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends QuotationItemDeleteManyArgs>(args?: SelectSubset<T, QuotationItemDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more QuotationItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationItemUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many QuotationItems
     * const quotationItem = await prisma.quotationItem.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends QuotationItemUpdateManyArgs>(args: SelectSubset<T, QuotationItemUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one QuotationItem.
     * @param {QuotationItemUpsertArgs} args - Arguments to update or create a QuotationItem.
     * @example
     * // Update or create a QuotationItem
     * const quotationItem = await prisma.quotationItem.upsert({
     *   create: {
     *     // ... data to create a QuotationItem
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the QuotationItem we want to update
     *   }
     * })
     */
    upsert<T extends QuotationItemUpsertArgs>(args: SelectSubset<T, QuotationItemUpsertArgs<ExtArgs>>): Prisma__QuotationItemClient<$Result.GetResult<Prisma.$QuotationItemPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of QuotationItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationItemCountArgs} args - Arguments to filter QuotationItems to count.
     * @example
     * // Count the number of QuotationItems
     * const count = await prisma.quotationItem.count({
     *   where: {
     *     // ... the filter for the QuotationItems we want to count
     *   }
     * })
    **/
    count<T extends QuotationItemCountArgs>(
      args?: Subset<T, QuotationItemCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], QuotationItemCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a QuotationItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationItemAggregateArgs} 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 QuotationItemAggregateArgs>(args: Subset<T, QuotationItemAggregateArgs>): Prisma.PrismaPromise<GetQuotationItemAggregateType<T>>

    /**
     * Group by QuotationItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {QuotationItemGroupByArgs} 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 QuotationItemGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: QuotationItemGroupByArgs['orderBy'] }
        : { orderBy?: QuotationItemGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, QuotationItemGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetQuotationItemGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the QuotationItem model
   */
  readonly fields: QuotationItemFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for QuotationItem.
   * 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__QuotationItemClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    quotation<T extends QuotationDefaultArgs<ExtArgs> = {}>(args?: Subset<T, QuotationDefaultArgs<ExtArgs>>): Prisma__QuotationClient<$Result.GetResult<Prisma.$QuotationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    vegetable<T extends QuotationItem$vegetableArgs<ExtArgs> = {}>(args?: Subset<T, QuotationItem$vegetableArgs<ExtArgs>>): Prisma__VegetableClient<$Result.GetResult<Prisma.$VegetablePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends QuotationItem$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, QuotationItem$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the QuotationItem model
   */
  interface QuotationItemFieldRefs {
    readonly id: FieldRef<"QuotationItem", 'BigInt'>
    readonly quotationId: FieldRef<"QuotationItem", 'BigInt'>
    readonly vegetableId: FieldRef<"QuotationItem", 'BigInt'>
    readonly vegName: FieldRef<"QuotationItem", 'String'>
    readonly hsnCode: FieldRef<"QuotationItem", 'String'>
    readonly quantity: FieldRef<"QuotationItem", 'Decimal'>
    readonly unit: FieldRef<"QuotationItem", 'String'>
    readonly price: FieldRef<"QuotationItem", 'Decimal'>
    readonly amount: FieldRef<"QuotationItem", 'Decimal'>
    readonly createdAt: FieldRef<"QuotationItem", 'DateTime'>
    readonly updatedAt: FieldRef<"QuotationItem", 'DateTime'>
    readonly createdBy: FieldRef<"QuotationItem", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * QuotationItem findUnique
   */
  export type QuotationItemFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter, which QuotationItem to fetch.
     */
    where: QuotationItemWhereUniqueInput
  }

  /**
   * QuotationItem findUniqueOrThrow
   */
  export type QuotationItemFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter, which QuotationItem to fetch.
     */
    where: QuotationItemWhereUniqueInput
  }

  /**
   * QuotationItem findFirst
   */
  export type QuotationItemFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter, which QuotationItem to fetch.
     */
    where?: QuotationItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of QuotationItems to fetch.
     */
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for QuotationItems.
     */
    cursor?: QuotationItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` QuotationItems 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` QuotationItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of QuotationItems.
     */
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * QuotationItem findFirstOrThrow
   */
  export type QuotationItemFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter, which QuotationItem to fetch.
     */
    where?: QuotationItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of QuotationItems to fetch.
     */
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for QuotationItems.
     */
    cursor?: QuotationItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` QuotationItems 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` QuotationItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of QuotationItems.
     */
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * QuotationItem findMany
   */
  export type QuotationItemFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter, which QuotationItems to fetch.
     */
    where?: QuotationItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of QuotationItems to fetch.
     */
    orderBy?: QuotationItemOrderByWithRelationInput | QuotationItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing QuotationItems.
     */
    cursor?: QuotationItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` QuotationItems 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` QuotationItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of QuotationItems.
     */
    distinct?: QuotationItemScalarFieldEnum | QuotationItemScalarFieldEnum[]
  }

  /**
   * QuotationItem create
   */
  export type QuotationItemCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * The data needed to create a QuotationItem.
     */
    data: XOR<QuotationItemCreateInput, QuotationItemUncheckedCreateInput>
  }

  /**
   * QuotationItem createMany
   */
  export type QuotationItemCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many QuotationItems.
     */
    data: QuotationItemCreateManyInput | QuotationItemCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * QuotationItem update
   */
  export type QuotationItemUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * The data needed to update a QuotationItem.
     */
    data: XOR<QuotationItemUpdateInput, QuotationItemUncheckedUpdateInput>
    /**
     * Choose, which QuotationItem to update.
     */
    where: QuotationItemWhereUniqueInput
  }

  /**
   * QuotationItem updateMany
   */
  export type QuotationItemUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update QuotationItems.
     */
    data: XOR<QuotationItemUpdateManyMutationInput, QuotationItemUncheckedUpdateManyInput>
    /**
     * Filter which QuotationItems to update
     */
    where?: QuotationItemWhereInput
    /**
     * Limit how many QuotationItems to update.
     */
    limit?: number
  }

  /**
   * QuotationItem upsert
   */
  export type QuotationItemUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * The filter to search for the QuotationItem to update in case it exists.
     */
    where: QuotationItemWhereUniqueInput
    /**
     * In case the QuotationItem found by the `where` argument doesn't exist, create a new QuotationItem with this data.
     */
    create: XOR<QuotationItemCreateInput, QuotationItemUncheckedCreateInput>
    /**
     * In case the QuotationItem was found with the provided `where` argument, update it with this data.
     */
    update: XOR<QuotationItemUpdateInput, QuotationItemUncheckedUpdateInput>
  }

  /**
   * QuotationItem delete
   */
  export type QuotationItemDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
    /**
     * Filter which QuotationItem to delete.
     */
    where: QuotationItemWhereUniqueInput
  }

  /**
   * QuotationItem deleteMany
   */
  export type QuotationItemDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which QuotationItems to delete
     */
    where?: QuotationItemWhereInput
    /**
     * Limit how many QuotationItems to delete.
     */
    limit?: number
  }

  /**
   * QuotationItem.vegetable
   */
  export type QuotationItem$vegetableArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Vegetable
     */
    select?: VegetableSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Vegetable
     */
    omit?: VegetableOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: VegetableInclude<ExtArgs> | null
    where?: VegetableWhereInput
  }

  /**
   * QuotationItem.createdByUser
   */
  export type QuotationItem$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * QuotationItem without action
   */
  export type QuotationItemDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the QuotationItem
     */
    select?: QuotationItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the QuotationItem
     */
    omit?: QuotationItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: QuotationItemInclude<ExtArgs> | null
  }


  /**
   * Model PurchaseReturn
   */

  export type AggregatePurchaseReturn = {
    _count: PurchaseReturnCountAggregateOutputType | null
    _avg: PurchaseReturnAvgAggregateOutputType | null
    _sum: PurchaseReturnSumAggregateOutputType | null
    _min: PurchaseReturnMinAggregateOutputType | null
    _max: PurchaseReturnMaxAggregateOutputType | null
  }

  export type PurchaseReturnAvgAggregateOutputType = {
    id: number | null
    purchaseId: number | null
    quantity: Decimal | null
    bags: Decimal | null
    returnAmount: Decimal | null
    createdBy: number | null
  }

  export type PurchaseReturnSumAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    quantity: Decimal | null
    bags: Decimal | null
    returnAmount: Decimal | null
    createdBy: bigint | null
  }

  export type PurchaseReturnMinAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    bags: Decimal | null
    returnAmount: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type PurchaseReturnMaxAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    bags: Decimal | null
    returnAmount: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type PurchaseReturnCountAggregateOutputType = {
    id: number
    purchaseId: number
    returnDate: number
    quantity: number
    bags: number
    returnAmount: number
    reason: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type PurchaseReturnAvgAggregateInputType = {
    id?: true
    purchaseId?: true
    quantity?: true
    bags?: true
    returnAmount?: true
    createdBy?: true
  }

  export type PurchaseReturnSumAggregateInputType = {
    id?: true
    purchaseId?: true
    quantity?: true
    bags?: true
    returnAmount?: true
    createdBy?: true
  }

  export type PurchaseReturnMinAggregateInputType = {
    id?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type PurchaseReturnMaxAggregateInputType = {
    id?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type PurchaseReturnCountAggregateInputType = {
    id?: true
    purchaseId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    returnAmount?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type PurchaseReturnAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which PurchaseReturn to aggregate.
     */
    where?: PurchaseReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PurchaseReturns to fetch.
     */
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: PurchaseReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PurchaseReturns 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` PurchaseReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned PurchaseReturns
    **/
    _count?: true | PurchaseReturnCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: PurchaseReturnAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: PurchaseReturnSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: PurchaseReturnMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: PurchaseReturnMaxAggregateInputType
  }

  export type GetPurchaseReturnAggregateType<T extends PurchaseReturnAggregateArgs> = {
        [P in keyof T & keyof AggregatePurchaseReturn]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregatePurchaseReturn[P]>
      : GetScalarType<T[P], AggregatePurchaseReturn[P]>
  }




  export type PurchaseReturnGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PurchaseReturnWhereInput
    orderBy?: PurchaseReturnOrderByWithAggregationInput | PurchaseReturnOrderByWithAggregationInput[]
    by: PurchaseReturnScalarFieldEnum[] | PurchaseReturnScalarFieldEnum
    having?: PurchaseReturnScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: PurchaseReturnCountAggregateInputType | true
    _avg?: PurchaseReturnAvgAggregateInputType
    _sum?: PurchaseReturnSumAggregateInputType
    _min?: PurchaseReturnMinAggregateInputType
    _max?: PurchaseReturnMaxAggregateInputType
  }

  export type PurchaseReturnGroupByOutputType = {
    id: bigint
    purchaseId: bigint
    returnDate: Date
    quantity: Decimal
    bags: Decimal | null
    returnAmount: Decimal
    reason: string | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: PurchaseReturnCountAggregateOutputType | null
    _avg: PurchaseReturnAvgAggregateOutputType | null
    _sum: PurchaseReturnSumAggregateOutputType | null
    _min: PurchaseReturnMinAggregateOutputType | null
    _max: PurchaseReturnMaxAggregateOutputType | null
  }

  type GetPurchaseReturnGroupByPayload<T extends PurchaseReturnGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<PurchaseReturnGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof PurchaseReturnGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], PurchaseReturnGroupByOutputType[P]>
            : GetScalarType<T[P], PurchaseReturnGroupByOutputType[P]>
        }
      >
    >


  export type PurchaseReturnSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseId?: boolean
    returnDate?: boolean
    quantity?: boolean
    bags?: boolean
    returnAmount?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | PurchaseReturn$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["purchaseReturn"]>



  export type PurchaseReturnSelectScalar = {
    id?: boolean
    purchaseId?: boolean
    returnDate?: boolean
    quantity?: boolean
    bags?: boolean
    returnAmount?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type PurchaseReturnOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseId" | "returnDate" | "quantity" | "bags" | "returnAmount" | "reason" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["purchaseReturn"]>
  export type PurchaseReturnInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    createdByUser?: boolean | PurchaseReturn$createdByUserArgs<ExtArgs>
  }

  export type $PurchaseReturnPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "PurchaseReturn"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseId: bigint
      returnDate: Date
      quantity: Prisma.Decimal
      bags: Prisma.Decimal | null
      returnAmount: Prisma.Decimal
      reason: string | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["purchaseReturn"]>
    composites: {}
  }

  type PurchaseReturnGetPayload<S extends boolean | null | undefined | PurchaseReturnDefaultArgs> = $Result.GetResult<Prisma.$PurchaseReturnPayload, S>

  type PurchaseReturnCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<PurchaseReturnFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: PurchaseReturnCountAggregateInputType | true
    }

  export interface PurchaseReturnDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['PurchaseReturn'], meta: { name: 'PurchaseReturn' } }
    /**
     * Find zero or one PurchaseReturn that matches the filter.
     * @param {PurchaseReturnFindUniqueArgs} args - Arguments to find a PurchaseReturn
     * @example
     * // Get one PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends PurchaseReturnFindUniqueArgs>(args: SelectSubset<T, PurchaseReturnFindUniqueArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one PurchaseReturn that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {PurchaseReturnFindUniqueOrThrowArgs} args - Arguments to find a PurchaseReturn
     * @example
     * // Get one PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends PurchaseReturnFindUniqueOrThrowArgs>(args: SelectSubset<T, PurchaseReturnFindUniqueOrThrowArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first PurchaseReturn 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 {PurchaseReturnFindFirstArgs} args - Arguments to find a PurchaseReturn
     * @example
     * // Get one PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends PurchaseReturnFindFirstArgs>(args?: SelectSubset<T, PurchaseReturnFindFirstArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first PurchaseReturn 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 {PurchaseReturnFindFirstOrThrowArgs} args - Arguments to find a PurchaseReturn
     * @example
     * // Get one PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends PurchaseReturnFindFirstOrThrowArgs>(args?: SelectSubset<T, PurchaseReturnFindFirstOrThrowArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more PurchaseReturns 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 {PurchaseReturnFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all PurchaseReturns
     * const purchaseReturns = await prisma.purchaseReturn.findMany()
     * 
     * // Get first 10 PurchaseReturns
     * const purchaseReturns = await prisma.purchaseReturn.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const purchaseReturnWithIdOnly = await prisma.purchaseReturn.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends PurchaseReturnFindManyArgs>(args?: SelectSubset<T, PurchaseReturnFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a PurchaseReturn.
     * @param {PurchaseReturnCreateArgs} args - Arguments to create a PurchaseReturn.
     * @example
     * // Create one PurchaseReturn
     * const PurchaseReturn = await prisma.purchaseReturn.create({
     *   data: {
     *     // ... data to create a PurchaseReturn
     *   }
     * })
     * 
     */
    create<T extends PurchaseReturnCreateArgs>(args: SelectSubset<T, PurchaseReturnCreateArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many PurchaseReturns.
     * @param {PurchaseReturnCreateManyArgs} args - Arguments to create many PurchaseReturns.
     * @example
     * // Create many PurchaseReturns
     * const purchaseReturn = await prisma.purchaseReturn.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends PurchaseReturnCreateManyArgs>(args?: SelectSubset<T, PurchaseReturnCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a PurchaseReturn.
     * @param {PurchaseReturnDeleteArgs} args - Arguments to delete one PurchaseReturn.
     * @example
     * // Delete one PurchaseReturn
     * const PurchaseReturn = await prisma.purchaseReturn.delete({
     *   where: {
     *     // ... filter to delete one PurchaseReturn
     *   }
     * })
     * 
     */
    delete<T extends PurchaseReturnDeleteArgs>(args: SelectSubset<T, PurchaseReturnDeleteArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one PurchaseReturn.
     * @param {PurchaseReturnUpdateArgs} args - Arguments to update one PurchaseReturn.
     * @example
     * // Update one PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends PurchaseReturnUpdateArgs>(args: SelectSubset<T, PurchaseReturnUpdateArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more PurchaseReturns.
     * @param {PurchaseReturnDeleteManyArgs} args - Arguments to filter PurchaseReturns to delete.
     * @example
     * // Delete a few PurchaseReturns
     * const { count } = await prisma.purchaseReturn.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends PurchaseReturnDeleteManyArgs>(args?: SelectSubset<T, PurchaseReturnDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more PurchaseReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseReturnUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many PurchaseReturns
     * const purchaseReturn = await prisma.purchaseReturn.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends PurchaseReturnUpdateManyArgs>(args: SelectSubset<T, PurchaseReturnUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one PurchaseReturn.
     * @param {PurchaseReturnUpsertArgs} args - Arguments to update or create a PurchaseReturn.
     * @example
     * // Update or create a PurchaseReturn
     * const purchaseReturn = await prisma.purchaseReturn.upsert({
     *   create: {
     *     // ... data to create a PurchaseReturn
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the PurchaseReturn we want to update
     *   }
     * })
     */
    upsert<T extends PurchaseReturnUpsertArgs>(args: SelectSubset<T, PurchaseReturnUpsertArgs<ExtArgs>>): Prisma__PurchaseReturnClient<$Result.GetResult<Prisma.$PurchaseReturnPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of PurchaseReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseReturnCountArgs} args - Arguments to filter PurchaseReturns to count.
     * @example
     * // Count the number of PurchaseReturns
     * const count = await prisma.purchaseReturn.count({
     *   where: {
     *     // ... the filter for the PurchaseReturns we want to count
     *   }
     * })
    **/
    count<T extends PurchaseReturnCountArgs>(
      args?: Subset<T, PurchaseReturnCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], PurchaseReturnCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a PurchaseReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseReturnAggregateArgs} 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 PurchaseReturnAggregateArgs>(args: Subset<T, PurchaseReturnAggregateArgs>): Prisma.PrismaPromise<GetPurchaseReturnAggregateType<T>>

    /**
     * Group by PurchaseReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PurchaseReturnGroupByArgs} 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 PurchaseReturnGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: PurchaseReturnGroupByArgs['orderBy'] }
        : { orderBy?: PurchaseReturnGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, PurchaseReturnGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPurchaseReturnGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the PurchaseReturn model
   */
  readonly fields: PurchaseReturnFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for PurchaseReturn.
   * 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__PurchaseReturnClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends PurchaseReturn$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseReturn$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the PurchaseReturn model
   */
  interface PurchaseReturnFieldRefs {
    readonly id: FieldRef<"PurchaseReturn", 'BigInt'>
    readonly purchaseId: FieldRef<"PurchaseReturn", 'BigInt'>
    readonly returnDate: FieldRef<"PurchaseReturn", 'DateTime'>
    readonly quantity: FieldRef<"PurchaseReturn", 'Decimal'>
    readonly bags: FieldRef<"PurchaseReturn", 'Decimal'>
    readonly returnAmount: FieldRef<"PurchaseReturn", 'Decimal'>
    readonly reason: FieldRef<"PurchaseReturn", 'String'>
    readonly remarks: FieldRef<"PurchaseReturn", 'String'>
    readonly createdAt: FieldRef<"PurchaseReturn", 'DateTime'>
    readonly updatedAt: FieldRef<"PurchaseReturn", 'DateTime'>
    readonly createdBy: FieldRef<"PurchaseReturn", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * PurchaseReturn findUnique
   */
  export type PurchaseReturnFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter, which PurchaseReturn to fetch.
     */
    where: PurchaseReturnWhereUniqueInput
  }

  /**
   * PurchaseReturn findUniqueOrThrow
   */
  export type PurchaseReturnFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter, which PurchaseReturn to fetch.
     */
    where: PurchaseReturnWhereUniqueInput
  }

  /**
   * PurchaseReturn findFirst
   */
  export type PurchaseReturnFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter, which PurchaseReturn to fetch.
     */
    where?: PurchaseReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PurchaseReturns to fetch.
     */
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for PurchaseReturns.
     */
    cursor?: PurchaseReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PurchaseReturns 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` PurchaseReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of PurchaseReturns.
     */
    distinct?: PurchaseReturnScalarFieldEnum | PurchaseReturnScalarFieldEnum[]
  }

  /**
   * PurchaseReturn findFirstOrThrow
   */
  export type PurchaseReturnFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter, which PurchaseReturn to fetch.
     */
    where?: PurchaseReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PurchaseReturns to fetch.
     */
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for PurchaseReturns.
     */
    cursor?: PurchaseReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PurchaseReturns 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` PurchaseReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of PurchaseReturns.
     */
    distinct?: PurchaseReturnScalarFieldEnum | PurchaseReturnScalarFieldEnum[]
  }

  /**
   * PurchaseReturn findMany
   */
  export type PurchaseReturnFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter, which PurchaseReturns to fetch.
     */
    where?: PurchaseReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PurchaseReturns to fetch.
     */
    orderBy?: PurchaseReturnOrderByWithRelationInput | PurchaseReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing PurchaseReturns.
     */
    cursor?: PurchaseReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PurchaseReturns 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` PurchaseReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of PurchaseReturns.
     */
    distinct?: PurchaseReturnScalarFieldEnum | PurchaseReturnScalarFieldEnum[]
  }

  /**
   * PurchaseReturn create
   */
  export type PurchaseReturnCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * The data needed to create a PurchaseReturn.
     */
    data: XOR<PurchaseReturnCreateInput, PurchaseReturnUncheckedCreateInput>
  }

  /**
   * PurchaseReturn createMany
   */
  export type PurchaseReturnCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many PurchaseReturns.
     */
    data: PurchaseReturnCreateManyInput | PurchaseReturnCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * PurchaseReturn update
   */
  export type PurchaseReturnUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * The data needed to update a PurchaseReturn.
     */
    data: XOR<PurchaseReturnUpdateInput, PurchaseReturnUncheckedUpdateInput>
    /**
     * Choose, which PurchaseReturn to update.
     */
    where: PurchaseReturnWhereUniqueInput
  }

  /**
   * PurchaseReturn updateMany
   */
  export type PurchaseReturnUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update PurchaseReturns.
     */
    data: XOR<PurchaseReturnUpdateManyMutationInput, PurchaseReturnUncheckedUpdateManyInput>
    /**
     * Filter which PurchaseReturns to update
     */
    where?: PurchaseReturnWhereInput
    /**
     * Limit how many PurchaseReturns to update.
     */
    limit?: number
  }

  /**
   * PurchaseReturn upsert
   */
  export type PurchaseReturnUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * The filter to search for the PurchaseReturn to update in case it exists.
     */
    where: PurchaseReturnWhereUniqueInput
    /**
     * In case the PurchaseReturn found by the `where` argument doesn't exist, create a new PurchaseReturn with this data.
     */
    create: XOR<PurchaseReturnCreateInput, PurchaseReturnUncheckedCreateInput>
    /**
     * In case the PurchaseReturn was found with the provided `where` argument, update it with this data.
     */
    update: XOR<PurchaseReturnUpdateInput, PurchaseReturnUncheckedUpdateInput>
  }

  /**
   * PurchaseReturn delete
   */
  export type PurchaseReturnDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
    /**
     * Filter which PurchaseReturn to delete.
     */
    where: PurchaseReturnWhereUniqueInput
  }

  /**
   * PurchaseReturn deleteMany
   */
  export type PurchaseReturnDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which PurchaseReturns to delete
     */
    where?: PurchaseReturnWhereInput
    /**
     * Limit how many PurchaseReturns to delete.
     */
    limit?: number
  }

  /**
   * PurchaseReturn.createdByUser
   */
  export type PurchaseReturn$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * PurchaseReturn without action
   */
  export type PurchaseReturnDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PurchaseReturn
     */
    select?: PurchaseReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PurchaseReturn
     */
    omit?: PurchaseReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: PurchaseReturnInclude<ExtArgs> | null
  }


  /**
   * Model RetailStock
   */

  export type AggregateRetailStock = {
    _count: RetailStockCountAggregateOutputType | null
    _avg: RetailStockAvgAggregateOutputType | null
    _sum: RetailStockSumAggregateOutputType | null
    _min: RetailStockMinAggregateOutputType | null
    _max: RetailStockMaxAggregateOutputType | null
  }

  export type RetailStockAvgAggregateOutputType = {
    id: number | null
    purchaseId: number | null
    allocatedQty: Decimal | null
    quantity: Decimal | null
    bags: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    costPerUnit: Decimal | null
    createdBy: number | null
  }

  export type RetailStockSumAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    allocatedQty: Decimal | null
    quantity: Decimal | null
    bags: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    costPerUnit: Decimal | null
    createdBy: bigint | null
  }

  export type RetailStockMinAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    lotNo: string | null
    allocatedUnit: $Enums.PurchaseUnit | null
    allocatedQty: Decimal | null
    quantity: Decimal | null
    bags: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    costPerUnit: Decimal | null
    allocationDate: Date | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockMaxAggregateOutputType = {
    id: bigint | null
    purchaseId: bigint | null
    lotNo: string | null
    allocatedUnit: $Enums.PurchaseUnit | null
    allocatedQty: Decimal | null
    quantity: Decimal | null
    bags: Decimal | null
    remainingQuantity: Decimal | null
    remainingBags: Decimal | null
    costPerUnit: Decimal | null
    allocationDate: Date | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockCountAggregateOutputType = {
    id: number
    purchaseId: number
    lotNo: number
    allocatedUnit: number
    allocatedQty: number
    quantity: number
    bags: number
    remainingQuantity: number
    remainingBags: number
    costPerUnit: number
    allocationDate: number
    remarks: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type RetailStockAvgAggregateInputType = {
    id?: true
    purchaseId?: true
    allocatedQty?: true
    quantity?: true
    bags?: true
    remainingQuantity?: true
    remainingBags?: true
    costPerUnit?: true
    createdBy?: true
  }

  export type RetailStockSumAggregateInputType = {
    id?: true
    purchaseId?: true
    allocatedQty?: true
    quantity?: true
    bags?: true
    remainingQuantity?: true
    remainingBags?: true
    costPerUnit?: true
    createdBy?: true
  }

  export type RetailStockMinAggregateInputType = {
    id?: true
    purchaseId?: true
    lotNo?: true
    allocatedUnit?: true
    allocatedQty?: true
    quantity?: true
    bags?: true
    remainingQuantity?: true
    remainingBags?: true
    costPerUnit?: true
    allocationDate?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type RetailStockMaxAggregateInputType = {
    id?: true
    purchaseId?: true
    lotNo?: true
    allocatedUnit?: true
    allocatedQty?: true
    quantity?: true
    bags?: true
    remainingQuantity?: true
    remainingBags?: true
    costPerUnit?: true
    allocationDate?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type RetailStockCountAggregateInputType = {
    id?: true
    purchaseId?: true
    lotNo?: true
    allocatedUnit?: true
    allocatedQty?: true
    quantity?: true
    bags?: true
    remainingQuantity?: true
    remainingBags?: true
    costPerUnit?: true
    allocationDate?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type RetailStockAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStock to aggregate.
     */
    where?: RetailStockWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStocks to fetch.
     */
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RetailStockWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStocks 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` RetailStocks.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned RetailStocks
    **/
    _count?: true | RetailStockCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RetailStockAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RetailStockSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RetailStockMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RetailStockMaxAggregateInputType
  }

  export type GetRetailStockAggregateType<T extends RetailStockAggregateArgs> = {
        [P in keyof T & keyof AggregateRetailStock]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRetailStock[P]>
      : GetScalarType<T[P], AggregateRetailStock[P]>
  }




  export type RetailStockGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockWhereInput
    orderBy?: RetailStockOrderByWithAggregationInput | RetailStockOrderByWithAggregationInput[]
    by: RetailStockScalarFieldEnum[] | RetailStockScalarFieldEnum
    having?: RetailStockScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RetailStockCountAggregateInputType | true
    _avg?: RetailStockAvgAggregateInputType
    _sum?: RetailStockSumAggregateInputType
    _min?: RetailStockMinAggregateInputType
    _max?: RetailStockMaxAggregateInputType
  }

  export type RetailStockGroupByOutputType = {
    id: bigint
    purchaseId: bigint
    lotNo: string
    allocatedUnit: $Enums.PurchaseUnit
    allocatedQty: Decimal
    quantity: Decimal
    bags: Decimal | null
    remainingQuantity: Decimal
    remainingBags: Decimal | null
    costPerUnit: Decimal
    allocationDate: Date
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: RetailStockCountAggregateOutputType | null
    _avg: RetailStockAvgAggregateOutputType | null
    _sum: RetailStockSumAggregateOutputType | null
    _min: RetailStockMinAggregateOutputType | null
    _max: RetailStockMaxAggregateOutputType | null
  }

  type GetRetailStockGroupByPayload<T extends RetailStockGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RetailStockGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RetailStockGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RetailStockGroupByOutputType[P]>
            : GetScalarType<T[P], RetailStockGroupByOutputType[P]>
        }
      >
    >


  export type RetailStockSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    purchaseId?: boolean
    lotNo?: boolean
    allocatedUnit?: boolean
    allocatedQty?: boolean
    quantity?: boolean
    bags?: boolean
    remainingQuantity?: boolean
    remainingBags?: boolean
    costPerUnit?: boolean
    allocationDate?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    retailSaleItems?: boolean | RetailStock$retailSaleItemsArgs<ExtArgs>
    retailStockSpoilages?: boolean | RetailStock$retailStockSpoilagesArgs<ExtArgs>
    retailStockReturns?: boolean | RetailStock$retailStockReturnsArgs<ExtArgs>
    createdByUser?: boolean | RetailStock$createdByUserArgs<ExtArgs>
    _count?: boolean | RetailStockCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["retailStock"]>



  export type RetailStockSelectScalar = {
    id?: boolean
    purchaseId?: boolean
    lotNo?: boolean
    allocatedUnit?: boolean
    allocatedQty?: boolean
    quantity?: boolean
    bags?: boolean
    remainingQuantity?: boolean
    remainingBags?: boolean
    costPerUnit?: boolean
    allocationDate?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type RetailStockOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "purchaseId" | "lotNo" | "allocatedUnit" | "allocatedQty" | "quantity" | "bags" | "remainingQuantity" | "remainingBags" | "costPerUnit" | "allocationDate" | "remarks" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["retailStock"]>
  export type RetailStockInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    purchase?: boolean | PurchaseDefaultArgs<ExtArgs>
    retailSaleItems?: boolean | RetailStock$retailSaleItemsArgs<ExtArgs>
    retailStockSpoilages?: boolean | RetailStock$retailStockSpoilagesArgs<ExtArgs>
    retailStockReturns?: boolean | RetailStock$retailStockReturnsArgs<ExtArgs>
    createdByUser?: boolean | RetailStock$createdByUserArgs<ExtArgs>
    _count?: boolean | RetailStockCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $RetailStockPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "RetailStock"
    objects: {
      purchase: Prisma.$PurchasePayload<ExtArgs>
      retailSaleItems: Prisma.$RetailSaleItemPayload<ExtArgs>[]
      retailStockSpoilages: Prisma.$RetailStockSpoilagePayload<ExtArgs>[]
      retailStockReturns: Prisma.$RetailStockReturnPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      purchaseId: bigint
      lotNo: string
      allocatedUnit: $Enums.PurchaseUnit
      allocatedQty: Prisma.Decimal
      quantity: Prisma.Decimal
      bags: Prisma.Decimal | null
      remainingQuantity: Prisma.Decimal
      remainingBags: Prisma.Decimal | null
      costPerUnit: Prisma.Decimal
      allocationDate: Date
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["retailStock"]>
    composites: {}
  }

  type RetailStockGetPayload<S extends boolean | null | undefined | RetailStockDefaultArgs> = $Result.GetResult<Prisma.$RetailStockPayload, S>

  type RetailStockCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RetailStockFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RetailStockCountAggregateInputType | true
    }

  export interface RetailStockDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RetailStock'], meta: { name: 'RetailStock' } }
    /**
     * Find zero or one RetailStock that matches the filter.
     * @param {RetailStockFindUniqueArgs} args - Arguments to find a RetailStock
     * @example
     * // Get one RetailStock
     * const retailStock = await prisma.retailStock.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RetailStockFindUniqueArgs>(args: SelectSubset<T, RetailStockFindUniqueArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one RetailStock that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RetailStockFindUniqueOrThrowArgs} args - Arguments to find a RetailStock
     * @example
     * // Get one RetailStock
     * const retailStock = await prisma.retailStock.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RetailStockFindUniqueOrThrowArgs>(args: SelectSubset<T, RetailStockFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStock 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 {RetailStockFindFirstArgs} args - Arguments to find a RetailStock
     * @example
     * // Get one RetailStock
     * const retailStock = await prisma.retailStock.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RetailStockFindFirstArgs>(args?: SelectSubset<T, RetailStockFindFirstArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStock 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 {RetailStockFindFirstOrThrowArgs} args - Arguments to find a RetailStock
     * @example
     * // Get one RetailStock
     * const retailStock = await prisma.retailStock.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RetailStockFindFirstOrThrowArgs>(args?: SelectSubset<T, RetailStockFindFirstOrThrowArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more RetailStocks 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 {RetailStockFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all RetailStocks
     * const retailStocks = await prisma.retailStock.findMany()
     * 
     * // Get first 10 RetailStocks
     * const retailStocks = await prisma.retailStock.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const retailStockWithIdOnly = await prisma.retailStock.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RetailStockFindManyArgs>(args?: SelectSubset<T, RetailStockFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a RetailStock.
     * @param {RetailStockCreateArgs} args - Arguments to create a RetailStock.
     * @example
     * // Create one RetailStock
     * const RetailStock = await prisma.retailStock.create({
     *   data: {
     *     // ... data to create a RetailStock
     *   }
     * })
     * 
     */
    create<T extends RetailStockCreateArgs>(args: SelectSubset<T, RetailStockCreateArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many RetailStocks.
     * @param {RetailStockCreateManyArgs} args - Arguments to create many RetailStocks.
     * @example
     * // Create many RetailStocks
     * const retailStock = await prisma.retailStock.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RetailStockCreateManyArgs>(args?: SelectSubset<T, RetailStockCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a RetailStock.
     * @param {RetailStockDeleteArgs} args - Arguments to delete one RetailStock.
     * @example
     * // Delete one RetailStock
     * const RetailStock = await prisma.retailStock.delete({
     *   where: {
     *     // ... filter to delete one RetailStock
     *   }
     * })
     * 
     */
    delete<T extends RetailStockDeleteArgs>(args: SelectSubset<T, RetailStockDeleteArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one RetailStock.
     * @param {RetailStockUpdateArgs} args - Arguments to update one RetailStock.
     * @example
     * // Update one RetailStock
     * const retailStock = await prisma.retailStock.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RetailStockUpdateArgs>(args: SelectSubset<T, RetailStockUpdateArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more RetailStocks.
     * @param {RetailStockDeleteManyArgs} args - Arguments to filter RetailStocks to delete.
     * @example
     * // Delete a few RetailStocks
     * const { count } = await prisma.retailStock.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RetailStockDeleteManyArgs>(args?: SelectSubset<T, RetailStockDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more RetailStocks.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many RetailStocks
     * const retailStock = await prisma.retailStock.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RetailStockUpdateManyArgs>(args: SelectSubset<T, RetailStockUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one RetailStock.
     * @param {RetailStockUpsertArgs} args - Arguments to update or create a RetailStock.
     * @example
     * // Update or create a RetailStock
     * const retailStock = await prisma.retailStock.upsert({
     *   create: {
     *     // ... data to create a RetailStock
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the RetailStock we want to update
     *   }
     * })
     */
    upsert<T extends RetailStockUpsertArgs>(args: SelectSubset<T, RetailStockUpsertArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of RetailStocks.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockCountArgs} args - Arguments to filter RetailStocks to count.
     * @example
     * // Count the number of RetailStocks
     * const count = await prisma.retailStock.count({
     *   where: {
     *     // ... the filter for the RetailStocks we want to count
     *   }
     * })
    **/
    count<T extends RetailStockCountArgs>(
      args?: Subset<T, RetailStockCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RetailStockCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a RetailStock.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockAggregateArgs} 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 RetailStockAggregateArgs>(args: Subset<T, RetailStockAggregateArgs>): Prisma.PrismaPromise<GetRetailStockAggregateType<T>>

    /**
     * Group by RetailStock.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockGroupByArgs} 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 RetailStockGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RetailStockGroupByArgs['orderBy'] }
        : { orderBy?: RetailStockGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RetailStockGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRetailStockGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the RetailStock model
   */
  readonly fields: RetailStockFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for RetailStock.
   * 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__RetailStockClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    purchase<T extends PurchaseDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PurchaseDefaultArgs<ExtArgs>>): Prisma__PurchaseClient<$Result.GetResult<Prisma.$PurchasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    retailSaleItems<T extends RetailStock$retailSaleItemsArgs<ExtArgs> = {}>(args?: Subset<T, RetailStock$retailSaleItemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    retailStockSpoilages<T extends RetailStock$retailStockSpoilagesArgs<ExtArgs> = {}>(args?: Subset<T, RetailStock$retailStockSpoilagesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    retailStockReturns<T extends RetailStock$retailStockReturnsArgs<ExtArgs> = {}>(args?: Subset<T, RetailStock$retailStockReturnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends RetailStock$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, RetailStock$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the RetailStock model
   */
  interface RetailStockFieldRefs {
    readonly id: FieldRef<"RetailStock", 'BigInt'>
    readonly purchaseId: FieldRef<"RetailStock", 'BigInt'>
    readonly lotNo: FieldRef<"RetailStock", 'String'>
    readonly allocatedUnit: FieldRef<"RetailStock", 'PurchaseUnit'>
    readonly allocatedQty: FieldRef<"RetailStock", 'Decimal'>
    readonly quantity: FieldRef<"RetailStock", 'Decimal'>
    readonly bags: FieldRef<"RetailStock", 'Decimal'>
    readonly remainingQuantity: FieldRef<"RetailStock", 'Decimal'>
    readonly remainingBags: FieldRef<"RetailStock", 'Decimal'>
    readonly costPerUnit: FieldRef<"RetailStock", 'Decimal'>
    readonly allocationDate: FieldRef<"RetailStock", 'DateTime'>
    readonly remarks: FieldRef<"RetailStock", 'String'>
    readonly createdAt: FieldRef<"RetailStock", 'DateTime'>
    readonly updatedAt: FieldRef<"RetailStock", 'DateTime'>
    readonly deletedAt: FieldRef<"RetailStock", 'DateTime'>
    readonly createdBy: FieldRef<"RetailStock", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * RetailStock findUnique
   */
  export type RetailStockFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter, which RetailStock to fetch.
     */
    where: RetailStockWhereUniqueInput
  }

  /**
   * RetailStock findUniqueOrThrow
   */
  export type RetailStockFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter, which RetailStock to fetch.
     */
    where: RetailStockWhereUniqueInput
  }

  /**
   * RetailStock findFirst
   */
  export type RetailStockFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter, which RetailStock to fetch.
     */
    where?: RetailStockWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStocks to fetch.
     */
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStocks.
     */
    cursor?: RetailStockWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStocks 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` RetailStocks.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStocks.
     */
    distinct?: RetailStockScalarFieldEnum | RetailStockScalarFieldEnum[]
  }

  /**
   * RetailStock findFirstOrThrow
   */
  export type RetailStockFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter, which RetailStock to fetch.
     */
    where?: RetailStockWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStocks to fetch.
     */
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStocks.
     */
    cursor?: RetailStockWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStocks 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` RetailStocks.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStocks.
     */
    distinct?: RetailStockScalarFieldEnum | RetailStockScalarFieldEnum[]
  }

  /**
   * RetailStock findMany
   */
  export type RetailStockFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter, which RetailStocks to fetch.
     */
    where?: RetailStockWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStocks to fetch.
     */
    orderBy?: RetailStockOrderByWithRelationInput | RetailStockOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing RetailStocks.
     */
    cursor?: RetailStockWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStocks 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` RetailStocks.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStocks.
     */
    distinct?: RetailStockScalarFieldEnum | RetailStockScalarFieldEnum[]
  }

  /**
   * RetailStock create
   */
  export type RetailStockCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * The data needed to create a RetailStock.
     */
    data: XOR<RetailStockCreateInput, RetailStockUncheckedCreateInput>
  }

  /**
   * RetailStock createMany
   */
  export type RetailStockCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many RetailStocks.
     */
    data: RetailStockCreateManyInput | RetailStockCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * RetailStock update
   */
  export type RetailStockUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * The data needed to update a RetailStock.
     */
    data: XOR<RetailStockUpdateInput, RetailStockUncheckedUpdateInput>
    /**
     * Choose, which RetailStock to update.
     */
    where: RetailStockWhereUniqueInput
  }

  /**
   * RetailStock updateMany
   */
  export type RetailStockUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update RetailStocks.
     */
    data: XOR<RetailStockUpdateManyMutationInput, RetailStockUncheckedUpdateManyInput>
    /**
     * Filter which RetailStocks to update
     */
    where?: RetailStockWhereInput
    /**
     * Limit how many RetailStocks to update.
     */
    limit?: number
  }

  /**
   * RetailStock upsert
   */
  export type RetailStockUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * The filter to search for the RetailStock to update in case it exists.
     */
    where: RetailStockWhereUniqueInput
    /**
     * In case the RetailStock found by the `where` argument doesn't exist, create a new RetailStock with this data.
     */
    create: XOR<RetailStockCreateInput, RetailStockUncheckedCreateInput>
    /**
     * In case the RetailStock was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RetailStockUpdateInput, RetailStockUncheckedUpdateInput>
  }

  /**
   * RetailStock delete
   */
  export type RetailStockDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
    /**
     * Filter which RetailStock to delete.
     */
    where: RetailStockWhereUniqueInput
  }

  /**
   * RetailStock deleteMany
   */
  export type RetailStockDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStocks to delete
     */
    where?: RetailStockWhereInput
    /**
     * Limit how many RetailStocks to delete.
     */
    limit?: number
  }

  /**
   * RetailStock.retailSaleItems
   */
  export type RetailStock$retailSaleItemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    where?: RetailSaleItemWhereInput
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    cursor?: RetailSaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * RetailStock.retailStockSpoilages
   */
  export type RetailStock$retailStockSpoilagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    where?: RetailStockSpoilageWhereInput
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    cursor?: RetailStockSpoilageWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockSpoilageScalarFieldEnum | RetailStockSpoilageScalarFieldEnum[]
  }

  /**
   * RetailStock.retailStockReturns
   */
  export type RetailStock$retailStockReturnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    where?: RetailStockReturnWhereInput
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    cursor?: RetailStockReturnWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailStockReturnScalarFieldEnum | RetailStockReturnScalarFieldEnum[]
  }

  /**
   * RetailStock.createdByUser
   */
  export type RetailStock$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * RetailStock without action
   */
  export type RetailStockDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStock
     */
    select?: RetailStockSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStock
     */
    omit?: RetailStockOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockInclude<ExtArgs> | null
  }


  /**
   * Model RetailStockReturn
   */

  export type AggregateRetailStockReturn = {
    _count: RetailStockReturnCountAggregateOutputType | null
    _avg: RetailStockReturnAvgAggregateOutputType | null
    _sum: RetailStockReturnSumAggregateOutputType | null
    _min: RetailStockReturnMinAggregateOutputType | null
    _max: RetailStockReturnMaxAggregateOutputType | null
  }

  export type RetailStockReturnAvgAggregateOutputType = {
    id: number | null
    retailStockId: number | null
    quantity: Decimal | null
    bags: Decimal | null
    createdBy: number | null
  }

  export type RetailStockReturnSumAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    quantity: Decimal | null
    bags: Decimal | null
    createdBy: bigint | null
  }

  export type RetailStockReturnMinAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    bags: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockReturnMaxAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    returnDate: Date | null
    quantity: Decimal | null
    bags: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockReturnCountAggregateOutputType = {
    id: number
    retailStockId: number
    returnDate: number
    quantity: number
    bags: number
    reason: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type RetailStockReturnAvgAggregateInputType = {
    id?: true
    retailStockId?: true
    quantity?: true
    bags?: true
    createdBy?: true
  }

  export type RetailStockReturnSumAggregateInputType = {
    id?: true
    retailStockId?: true
    quantity?: true
    bags?: true
    createdBy?: true
  }

  export type RetailStockReturnMinAggregateInputType = {
    id?: true
    retailStockId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailStockReturnMaxAggregateInputType = {
    id?: true
    retailStockId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailStockReturnCountAggregateInputType = {
    id?: true
    retailStockId?: true
    returnDate?: true
    quantity?: true
    bags?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type RetailStockReturnAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStockReturn to aggregate.
     */
    where?: RetailStockReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockReturns to fetch.
     */
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RetailStockReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockReturns 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` RetailStockReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned RetailStockReturns
    **/
    _count?: true | RetailStockReturnCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RetailStockReturnAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RetailStockReturnSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RetailStockReturnMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RetailStockReturnMaxAggregateInputType
  }

  export type GetRetailStockReturnAggregateType<T extends RetailStockReturnAggregateArgs> = {
        [P in keyof T & keyof AggregateRetailStockReturn]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRetailStockReturn[P]>
      : GetScalarType<T[P], AggregateRetailStockReturn[P]>
  }




  export type RetailStockReturnGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockReturnWhereInput
    orderBy?: RetailStockReturnOrderByWithAggregationInput | RetailStockReturnOrderByWithAggregationInput[]
    by: RetailStockReturnScalarFieldEnum[] | RetailStockReturnScalarFieldEnum
    having?: RetailStockReturnScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RetailStockReturnCountAggregateInputType | true
    _avg?: RetailStockReturnAvgAggregateInputType
    _sum?: RetailStockReturnSumAggregateInputType
    _min?: RetailStockReturnMinAggregateInputType
    _max?: RetailStockReturnMaxAggregateInputType
  }

  export type RetailStockReturnGroupByOutputType = {
    id: bigint
    retailStockId: bigint
    returnDate: Date
    quantity: Decimal
    bags: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: RetailStockReturnCountAggregateOutputType | null
    _avg: RetailStockReturnAvgAggregateOutputType | null
    _sum: RetailStockReturnSumAggregateOutputType | null
    _min: RetailStockReturnMinAggregateOutputType | null
    _max: RetailStockReturnMaxAggregateOutputType | null
  }

  type GetRetailStockReturnGroupByPayload<T extends RetailStockReturnGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RetailStockReturnGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RetailStockReturnGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RetailStockReturnGroupByOutputType[P]>
            : GetScalarType<T[P], RetailStockReturnGroupByOutputType[P]>
        }
      >
    >


  export type RetailStockReturnSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    retailStockId?: boolean
    returnDate?: boolean
    quantity?: boolean
    bags?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailStockReturn$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["retailStockReturn"]>



  export type RetailStockReturnSelectScalar = {
    id?: boolean
    retailStockId?: boolean
    returnDate?: boolean
    quantity?: boolean
    bags?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type RetailStockReturnOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "retailStockId" | "returnDate" | "quantity" | "bags" | "reason" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["retailStockReturn"]>
  export type RetailStockReturnInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailStockReturn$createdByUserArgs<ExtArgs>
  }

  export type $RetailStockReturnPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "RetailStockReturn"
    objects: {
      retailStock: Prisma.$RetailStockPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      retailStockId: bigint
      returnDate: Date
      quantity: Prisma.Decimal
      bags: Prisma.Decimal | null
      reason: string | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["retailStockReturn"]>
    composites: {}
  }

  type RetailStockReturnGetPayload<S extends boolean | null | undefined | RetailStockReturnDefaultArgs> = $Result.GetResult<Prisma.$RetailStockReturnPayload, S>

  type RetailStockReturnCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RetailStockReturnFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RetailStockReturnCountAggregateInputType | true
    }

  export interface RetailStockReturnDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RetailStockReturn'], meta: { name: 'RetailStockReturn' } }
    /**
     * Find zero or one RetailStockReturn that matches the filter.
     * @param {RetailStockReturnFindUniqueArgs} args - Arguments to find a RetailStockReturn
     * @example
     * // Get one RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RetailStockReturnFindUniqueArgs>(args: SelectSubset<T, RetailStockReturnFindUniqueArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one RetailStockReturn that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RetailStockReturnFindUniqueOrThrowArgs} args - Arguments to find a RetailStockReturn
     * @example
     * // Get one RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RetailStockReturnFindUniqueOrThrowArgs>(args: SelectSubset<T, RetailStockReturnFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStockReturn 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 {RetailStockReturnFindFirstArgs} args - Arguments to find a RetailStockReturn
     * @example
     * // Get one RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RetailStockReturnFindFirstArgs>(args?: SelectSubset<T, RetailStockReturnFindFirstArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStockReturn 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 {RetailStockReturnFindFirstOrThrowArgs} args - Arguments to find a RetailStockReturn
     * @example
     * // Get one RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RetailStockReturnFindFirstOrThrowArgs>(args?: SelectSubset<T, RetailStockReturnFindFirstOrThrowArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more RetailStockReturns 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 {RetailStockReturnFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all RetailStockReturns
     * const retailStockReturns = await prisma.retailStockReturn.findMany()
     * 
     * // Get first 10 RetailStockReturns
     * const retailStockReturns = await prisma.retailStockReturn.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const retailStockReturnWithIdOnly = await prisma.retailStockReturn.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RetailStockReturnFindManyArgs>(args?: SelectSubset<T, RetailStockReturnFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a RetailStockReturn.
     * @param {RetailStockReturnCreateArgs} args - Arguments to create a RetailStockReturn.
     * @example
     * // Create one RetailStockReturn
     * const RetailStockReturn = await prisma.retailStockReturn.create({
     *   data: {
     *     // ... data to create a RetailStockReturn
     *   }
     * })
     * 
     */
    create<T extends RetailStockReturnCreateArgs>(args: SelectSubset<T, RetailStockReturnCreateArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many RetailStockReturns.
     * @param {RetailStockReturnCreateManyArgs} args - Arguments to create many RetailStockReturns.
     * @example
     * // Create many RetailStockReturns
     * const retailStockReturn = await prisma.retailStockReturn.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RetailStockReturnCreateManyArgs>(args?: SelectSubset<T, RetailStockReturnCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a RetailStockReturn.
     * @param {RetailStockReturnDeleteArgs} args - Arguments to delete one RetailStockReturn.
     * @example
     * // Delete one RetailStockReturn
     * const RetailStockReturn = await prisma.retailStockReturn.delete({
     *   where: {
     *     // ... filter to delete one RetailStockReturn
     *   }
     * })
     * 
     */
    delete<T extends RetailStockReturnDeleteArgs>(args: SelectSubset<T, RetailStockReturnDeleteArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one RetailStockReturn.
     * @param {RetailStockReturnUpdateArgs} args - Arguments to update one RetailStockReturn.
     * @example
     * // Update one RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RetailStockReturnUpdateArgs>(args: SelectSubset<T, RetailStockReturnUpdateArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more RetailStockReturns.
     * @param {RetailStockReturnDeleteManyArgs} args - Arguments to filter RetailStockReturns to delete.
     * @example
     * // Delete a few RetailStockReturns
     * const { count } = await prisma.retailStockReturn.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RetailStockReturnDeleteManyArgs>(args?: SelectSubset<T, RetailStockReturnDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more RetailStockReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockReturnUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many RetailStockReturns
     * const retailStockReturn = await prisma.retailStockReturn.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RetailStockReturnUpdateManyArgs>(args: SelectSubset<T, RetailStockReturnUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one RetailStockReturn.
     * @param {RetailStockReturnUpsertArgs} args - Arguments to update or create a RetailStockReturn.
     * @example
     * // Update or create a RetailStockReturn
     * const retailStockReturn = await prisma.retailStockReturn.upsert({
     *   create: {
     *     // ... data to create a RetailStockReturn
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the RetailStockReturn we want to update
     *   }
     * })
     */
    upsert<T extends RetailStockReturnUpsertArgs>(args: SelectSubset<T, RetailStockReturnUpsertArgs<ExtArgs>>): Prisma__RetailStockReturnClient<$Result.GetResult<Prisma.$RetailStockReturnPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of RetailStockReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockReturnCountArgs} args - Arguments to filter RetailStockReturns to count.
     * @example
     * // Count the number of RetailStockReturns
     * const count = await prisma.retailStockReturn.count({
     *   where: {
     *     // ... the filter for the RetailStockReturns we want to count
     *   }
     * })
    **/
    count<T extends RetailStockReturnCountArgs>(
      args?: Subset<T, RetailStockReturnCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RetailStockReturnCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a RetailStockReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockReturnAggregateArgs} 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 RetailStockReturnAggregateArgs>(args: Subset<T, RetailStockReturnAggregateArgs>): Prisma.PrismaPromise<GetRetailStockReturnAggregateType<T>>

    /**
     * Group by RetailStockReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockReturnGroupByArgs} 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 RetailStockReturnGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RetailStockReturnGroupByArgs['orderBy'] }
        : { orderBy?: RetailStockReturnGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RetailStockReturnGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRetailStockReturnGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the RetailStockReturn model
   */
  readonly fields: RetailStockReturnFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for RetailStockReturn.
   * 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__RetailStockReturnClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    retailStock<T extends RetailStockDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RetailStockDefaultArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends RetailStockReturn$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, RetailStockReturn$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the RetailStockReturn model
   */
  interface RetailStockReturnFieldRefs {
    readonly id: FieldRef<"RetailStockReturn", 'BigInt'>
    readonly retailStockId: FieldRef<"RetailStockReturn", 'BigInt'>
    readonly returnDate: FieldRef<"RetailStockReturn", 'DateTime'>
    readonly quantity: FieldRef<"RetailStockReturn", 'Decimal'>
    readonly bags: FieldRef<"RetailStockReturn", 'Decimal'>
    readonly reason: FieldRef<"RetailStockReturn", 'String'>
    readonly remarks: FieldRef<"RetailStockReturn", 'String'>
    readonly createdAt: FieldRef<"RetailStockReturn", 'DateTime'>
    readonly updatedAt: FieldRef<"RetailStockReturn", 'DateTime'>
    readonly createdBy: FieldRef<"RetailStockReturn", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * RetailStockReturn findUnique
   */
  export type RetailStockReturnFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockReturn to fetch.
     */
    where: RetailStockReturnWhereUniqueInput
  }

  /**
   * RetailStockReturn findUniqueOrThrow
   */
  export type RetailStockReturnFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockReturn to fetch.
     */
    where: RetailStockReturnWhereUniqueInput
  }

  /**
   * RetailStockReturn findFirst
   */
  export type RetailStockReturnFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockReturn to fetch.
     */
    where?: RetailStockReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockReturns to fetch.
     */
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStockReturns.
     */
    cursor?: RetailStockReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockReturns 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` RetailStockReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockReturns.
     */
    distinct?: RetailStockReturnScalarFieldEnum | RetailStockReturnScalarFieldEnum[]
  }

  /**
   * RetailStockReturn findFirstOrThrow
   */
  export type RetailStockReturnFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockReturn to fetch.
     */
    where?: RetailStockReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockReturns to fetch.
     */
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStockReturns.
     */
    cursor?: RetailStockReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockReturns 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` RetailStockReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockReturns.
     */
    distinct?: RetailStockReturnScalarFieldEnum | RetailStockReturnScalarFieldEnum[]
  }

  /**
   * RetailStockReturn findMany
   */
  export type RetailStockReturnFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockReturns to fetch.
     */
    where?: RetailStockReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockReturns to fetch.
     */
    orderBy?: RetailStockReturnOrderByWithRelationInput | RetailStockReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing RetailStockReturns.
     */
    cursor?: RetailStockReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockReturns 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` RetailStockReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockReturns.
     */
    distinct?: RetailStockReturnScalarFieldEnum | RetailStockReturnScalarFieldEnum[]
  }

  /**
   * RetailStockReturn create
   */
  export type RetailStockReturnCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * The data needed to create a RetailStockReturn.
     */
    data: XOR<RetailStockReturnCreateInput, RetailStockReturnUncheckedCreateInput>
  }

  /**
   * RetailStockReturn createMany
   */
  export type RetailStockReturnCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many RetailStockReturns.
     */
    data: RetailStockReturnCreateManyInput | RetailStockReturnCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * RetailStockReturn update
   */
  export type RetailStockReturnUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * The data needed to update a RetailStockReturn.
     */
    data: XOR<RetailStockReturnUpdateInput, RetailStockReturnUncheckedUpdateInput>
    /**
     * Choose, which RetailStockReturn to update.
     */
    where: RetailStockReturnWhereUniqueInput
  }

  /**
   * RetailStockReturn updateMany
   */
  export type RetailStockReturnUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update RetailStockReturns.
     */
    data: XOR<RetailStockReturnUpdateManyMutationInput, RetailStockReturnUncheckedUpdateManyInput>
    /**
     * Filter which RetailStockReturns to update
     */
    where?: RetailStockReturnWhereInput
    /**
     * Limit how many RetailStockReturns to update.
     */
    limit?: number
  }

  /**
   * RetailStockReturn upsert
   */
  export type RetailStockReturnUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * The filter to search for the RetailStockReturn to update in case it exists.
     */
    where: RetailStockReturnWhereUniqueInput
    /**
     * In case the RetailStockReturn found by the `where` argument doesn't exist, create a new RetailStockReturn with this data.
     */
    create: XOR<RetailStockReturnCreateInput, RetailStockReturnUncheckedCreateInput>
    /**
     * In case the RetailStockReturn was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RetailStockReturnUpdateInput, RetailStockReturnUncheckedUpdateInput>
  }

  /**
   * RetailStockReturn delete
   */
  export type RetailStockReturnDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
    /**
     * Filter which RetailStockReturn to delete.
     */
    where: RetailStockReturnWhereUniqueInput
  }

  /**
   * RetailStockReturn deleteMany
   */
  export type RetailStockReturnDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStockReturns to delete
     */
    where?: RetailStockReturnWhereInput
    /**
     * Limit how many RetailStockReturns to delete.
     */
    limit?: number
  }

  /**
   * RetailStockReturn.createdByUser
   */
  export type RetailStockReturn$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * RetailStockReturn without action
   */
  export type RetailStockReturnDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockReturn
     */
    select?: RetailStockReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockReturn
     */
    omit?: RetailStockReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockReturnInclude<ExtArgs> | null
  }


  /**
   * Model RetailSale
   */

  export type AggregateRetailSale = {
    _count: RetailSaleCountAggregateOutputType | null
    _avg: RetailSaleAvgAggregateOutputType | null
    _sum: RetailSaleSumAggregateOutputType | null
    _min: RetailSaleMinAggregateOutputType | null
    _max: RetailSaleMaxAggregateOutputType | null
  }

  export type RetailSaleAvgAggregateOutputType = {
    id: number | null
    subTotal: Decimal | null
    discount: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: number | null
  }

  export type RetailSaleSumAggregateOutputType = {
    id: bigint | null
    subTotal: Decimal | null
    discount: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    balanceAmount: Decimal | null
    createdBy: bigint | null
  }

  export type RetailSaleMinAggregateOutputType = {
    id: bigint | null
    invoiceNo: string | null
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date | null
    subTotal: Decimal | null
    discount: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    balanceAmount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    paymentStatus: $Enums.SalePaymentStatus | null
    remarks: string | null
    movedToWholesale: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailSaleMaxAggregateOutputType = {
    id: bigint | null
    invoiceNo: string | null
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date | null
    subTotal: Decimal | null
    discount: Decimal | null
    grandTotal: Decimal | null
    receivedAmount: Decimal | null
    balanceAmount: Decimal | null
    paymentMode: $Enums.PaymentMode | null
    paymentStatus: $Enums.SalePaymentStatus | null
    remarks: string | null
    movedToWholesale: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailSaleCountAggregateOutputType = {
    id: number
    invoiceNo: number
    walkInName: number
    walkInMobile: number
    invoiceDate: number
    subTotal: number
    discount: number
    grandTotal: number
    receivedAmount: number
    balanceAmount: number
    paymentMode: number
    paymentStatus: number
    remarks: number
    movedToWholesale: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type RetailSaleAvgAggregateInputType = {
    id?: true
    subTotal?: true
    discount?: true
    grandTotal?: true
    receivedAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type RetailSaleSumAggregateInputType = {
    id?: true
    subTotal?: true
    discount?: true
    grandTotal?: true
    receivedAmount?: true
    balanceAmount?: true
    createdBy?: true
  }

  export type RetailSaleMinAggregateInputType = {
    id?: true
    invoiceNo?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    grandTotal?: true
    receivedAmount?: true
    balanceAmount?: true
    paymentMode?: true
    paymentStatus?: true
    remarks?: true
    movedToWholesale?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type RetailSaleMaxAggregateInputType = {
    id?: true
    invoiceNo?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    grandTotal?: true
    receivedAmount?: true
    balanceAmount?: true
    paymentMode?: true
    paymentStatus?: true
    remarks?: true
    movedToWholesale?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type RetailSaleCountAggregateInputType = {
    id?: true
    invoiceNo?: true
    walkInName?: true
    walkInMobile?: true
    invoiceDate?: true
    subTotal?: true
    discount?: true
    grandTotal?: true
    receivedAmount?: true
    balanceAmount?: true
    paymentMode?: true
    paymentStatus?: true
    remarks?: true
    movedToWholesale?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type RetailSaleAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailSale to aggregate.
     */
    where?: RetailSaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSales to fetch.
     */
    orderBy?: RetailSaleOrderByWithRelationInput | RetailSaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RetailSaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSales 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` RetailSales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned RetailSales
    **/
    _count?: true | RetailSaleCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RetailSaleAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RetailSaleSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RetailSaleMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RetailSaleMaxAggregateInputType
  }

  export type GetRetailSaleAggregateType<T extends RetailSaleAggregateArgs> = {
        [P in keyof T & keyof AggregateRetailSale]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRetailSale[P]>
      : GetScalarType<T[P], AggregateRetailSale[P]>
  }




  export type RetailSaleGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleWhereInput
    orderBy?: RetailSaleOrderByWithAggregationInput | RetailSaleOrderByWithAggregationInput[]
    by: RetailSaleScalarFieldEnum[] | RetailSaleScalarFieldEnum
    having?: RetailSaleScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RetailSaleCountAggregateInputType | true
    _avg?: RetailSaleAvgAggregateInputType
    _sum?: RetailSaleSumAggregateInputType
    _min?: RetailSaleMinAggregateInputType
    _max?: RetailSaleMaxAggregateInputType
  }

  export type RetailSaleGroupByOutputType = {
    id: bigint
    invoiceNo: string
    walkInName: string | null
    walkInMobile: string | null
    invoiceDate: Date
    subTotal: Decimal
    discount: Decimal
    grandTotal: Decimal
    receivedAmount: Decimal
    balanceAmount: Decimal
    paymentMode: $Enums.PaymentMode | null
    paymentStatus: $Enums.SalePaymentStatus
    remarks: string | null
    movedToWholesale: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: RetailSaleCountAggregateOutputType | null
    _avg: RetailSaleAvgAggregateOutputType | null
    _sum: RetailSaleSumAggregateOutputType | null
    _min: RetailSaleMinAggregateOutputType | null
    _max: RetailSaleMaxAggregateOutputType | null
  }

  type GetRetailSaleGroupByPayload<T extends RetailSaleGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RetailSaleGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RetailSaleGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RetailSaleGroupByOutputType[P]>
            : GetScalarType<T[P], RetailSaleGroupByOutputType[P]>
        }
      >
    >


  export type RetailSaleSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    invoiceNo?: boolean
    walkInName?: boolean
    walkInMobile?: boolean
    invoiceDate?: boolean
    subTotal?: boolean
    discount?: boolean
    grandTotal?: boolean
    receivedAmount?: boolean
    balanceAmount?: boolean
    paymentMode?: boolean
    paymentStatus?: boolean
    remarks?: boolean
    movedToWholesale?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    items?: boolean | RetailSale$itemsArgs<ExtArgs>
    createdByUser?: boolean | RetailSale$createdByUserArgs<ExtArgs>
    _count?: boolean | RetailSaleCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["retailSale"]>



  export type RetailSaleSelectScalar = {
    id?: boolean
    invoiceNo?: boolean
    walkInName?: boolean
    walkInMobile?: boolean
    invoiceDate?: boolean
    subTotal?: boolean
    discount?: boolean
    grandTotal?: boolean
    receivedAmount?: boolean
    balanceAmount?: boolean
    paymentMode?: boolean
    paymentStatus?: boolean
    remarks?: boolean
    movedToWholesale?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type RetailSaleOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "invoiceNo" | "walkInName" | "walkInMobile" | "invoiceDate" | "subTotal" | "discount" | "grandTotal" | "receivedAmount" | "balanceAmount" | "paymentMode" | "paymentStatus" | "remarks" | "movedToWholesale" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["retailSale"]>
  export type RetailSaleInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | RetailSale$itemsArgs<ExtArgs>
    createdByUser?: boolean | RetailSale$createdByUserArgs<ExtArgs>
    _count?: boolean | RetailSaleCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $RetailSalePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "RetailSale"
    objects: {
      items: Prisma.$RetailSaleItemPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      invoiceNo: string
      walkInName: string | null
      walkInMobile: string | null
      invoiceDate: Date
      subTotal: Prisma.Decimal
      discount: Prisma.Decimal
      grandTotal: Prisma.Decimal
      receivedAmount: Prisma.Decimal
      balanceAmount: Prisma.Decimal
      paymentMode: $Enums.PaymentMode | null
      paymentStatus: $Enums.SalePaymentStatus
      remarks: string | null
      movedToWholesale: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["retailSale"]>
    composites: {}
  }

  type RetailSaleGetPayload<S extends boolean | null | undefined | RetailSaleDefaultArgs> = $Result.GetResult<Prisma.$RetailSalePayload, S>

  type RetailSaleCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RetailSaleFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RetailSaleCountAggregateInputType | true
    }

  export interface RetailSaleDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RetailSale'], meta: { name: 'RetailSale' } }
    /**
     * Find zero or one RetailSale that matches the filter.
     * @param {RetailSaleFindUniqueArgs} args - Arguments to find a RetailSale
     * @example
     * // Get one RetailSale
     * const retailSale = await prisma.retailSale.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RetailSaleFindUniqueArgs>(args: SelectSubset<T, RetailSaleFindUniqueArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one RetailSale that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RetailSaleFindUniqueOrThrowArgs} args - Arguments to find a RetailSale
     * @example
     * // Get one RetailSale
     * const retailSale = await prisma.retailSale.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RetailSaleFindUniqueOrThrowArgs>(args: SelectSubset<T, RetailSaleFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailSale 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 {RetailSaleFindFirstArgs} args - Arguments to find a RetailSale
     * @example
     * // Get one RetailSale
     * const retailSale = await prisma.retailSale.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RetailSaleFindFirstArgs>(args?: SelectSubset<T, RetailSaleFindFirstArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailSale 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 {RetailSaleFindFirstOrThrowArgs} args - Arguments to find a RetailSale
     * @example
     * // Get one RetailSale
     * const retailSale = await prisma.retailSale.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RetailSaleFindFirstOrThrowArgs>(args?: SelectSubset<T, RetailSaleFindFirstOrThrowArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more RetailSales 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 {RetailSaleFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all RetailSales
     * const retailSales = await prisma.retailSale.findMany()
     * 
     * // Get first 10 RetailSales
     * const retailSales = await prisma.retailSale.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const retailSaleWithIdOnly = await prisma.retailSale.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RetailSaleFindManyArgs>(args?: SelectSubset<T, RetailSaleFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a RetailSale.
     * @param {RetailSaleCreateArgs} args - Arguments to create a RetailSale.
     * @example
     * // Create one RetailSale
     * const RetailSale = await prisma.retailSale.create({
     *   data: {
     *     // ... data to create a RetailSale
     *   }
     * })
     * 
     */
    create<T extends RetailSaleCreateArgs>(args: SelectSubset<T, RetailSaleCreateArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many RetailSales.
     * @param {RetailSaleCreateManyArgs} args - Arguments to create many RetailSales.
     * @example
     * // Create many RetailSales
     * const retailSale = await prisma.retailSale.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RetailSaleCreateManyArgs>(args?: SelectSubset<T, RetailSaleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a RetailSale.
     * @param {RetailSaleDeleteArgs} args - Arguments to delete one RetailSale.
     * @example
     * // Delete one RetailSale
     * const RetailSale = await prisma.retailSale.delete({
     *   where: {
     *     // ... filter to delete one RetailSale
     *   }
     * })
     * 
     */
    delete<T extends RetailSaleDeleteArgs>(args: SelectSubset<T, RetailSaleDeleteArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one RetailSale.
     * @param {RetailSaleUpdateArgs} args - Arguments to update one RetailSale.
     * @example
     * // Update one RetailSale
     * const retailSale = await prisma.retailSale.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RetailSaleUpdateArgs>(args: SelectSubset<T, RetailSaleUpdateArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more RetailSales.
     * @param {RetailSaleDeleteManyArgs} args - Arguments to filter RetailSales to delete.
     * @example
     * // Delete a few RetailSales
     * const { count } = await prisma.retailSale.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RetailSaleDeleteManyArgs>(args?: SelectSubset<T, RetailSaleDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more RetailSales.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many RetailSales
     * const retailSale = await prisma.retailSale.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RetailSaleUpdateManyArgs>(args: SelectSubset<T, RetailSaleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one RetailSale.
     * @param {RetailSaleUpsertArgs} args - Arguments to update or create a RetailSale.
     * @example
     * // Update or create a RetailSale
     * const retailSale = await prisma.retailSale.upsert({
     *   create: {
     *     // ... data to create a RetailSale
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the RetailSale we want to update
     *   }
     * })
     */
    upsert<T extends RetailSaleUpsertArgs>(args: SelectSubset<T, RetailSaleUpsertArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of RetailSales.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleCountArgs} args - Arguments to filter RetailSales to count.
     * @example
     * // Count the number of RetailSales
     * const count = await prisma.retailSale.count({
     *   where: {
     *     // ... the filter for the RetailSales we want to count
     *   }
     * })
    **/
    count<T extends RetailSaleCountArgs>(
      args?: Subset<T, RetailSaleCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RetailSaleCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a RetailSale.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleAggregateArgs} 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 RetailSaleAggregateArgs>(args: Subset<T, RetailSaleAggregateArgs>): Prisma.PrismaPromise<GetRetailSaleAggregateType<T>>

    /**
     * Group by RetailSale.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleGroupByArgs} 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 RetailSaleGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RetailSaleGroupByArgs['orderBy'] }
        : { orderBy?: RetailSaleGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RetailSaleGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRetailSaleGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the RetailSale model
   */
  readonly fields: RetailSaleFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for RetailSale.
   * 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__RetailSaleClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    items<T extends RetailSale$itemsArgs<ExtArgs> = {}>(args?: Subset<T, RetailSale$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends RetailSale$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, RetailSale$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the RetailSale model
   */
  interface RetailSaleFieldRefs {
    readonly id: FieldRef<"RetailSale", 'BigInt'>
    readonly invoiceNo: FieldRef<"RetailSale", 'String'>
    readonly walkInName: FieldRef<"RetailSale", 'String'>
    readonly walkInMobile: FieldRef<"RetailSale", 'String'>
    readonly invoiceDate: FieldRef<"RetailSale", 'DateTime'>
    readonly subTotal: FieldRef<"RetailSale", 'Decimal'>
    readonly discount: FieldRef<"RetailSale", 'Decimal'>
    readonly grandTotal: FieldRef<"RetailSale", 'Decimal'>
    readonly receivedAmount: FieldRef<"RetailSale", 'Decimal'>
    readonly balanceAmount: FieldRef<"RetailSale", 'Decimal'>
    readonly paymentMode: FieldRef<"RetailSale", 'PaymentMode'>
    readonly paymentStatus: FieldRef<"RetailSale", 'SalePaymentStatus'>
    readonly remarks: FieldRef<"RetailSale", 'String'>
    readonly movedToWholesale: FieldRef<"RetailSale", 'Boolean'>
    readonly createdAt: FieldRef<"RetailSale", 'DateTime'>
    readonly updatedAt: FieldRef<"RetailSale", 'DateTime'>
    readonly deletedAt: FieldRef<"RetailSale", 'DateTime'>
    readonly createdBy: FieldRef<"RetailSale", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * RetailSale findUnique
   */
  export type RetailSaleFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter, which RetailSale to fetch.
     */
    where: RetailSaleWhereUniqueInput
  }

  /**
   * RetailSale findUniqueOrThrow
   */
  export type RetailSaleFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter, which RetailSale to fetch.
     */
    where: RetailSaleWhereUniqueInput
  }

  /**
   * RetailSale findFirst
   */
  export type RetailSaleFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter, which RetailSale to fetch.
     */
    where?: RetailSaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSales to fetch.
     */
    orderBy?: RetailSaleOrderByWithRelationInput | RetailSaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailSales.
     */
    cursor?: RetailSaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSales 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` RetailSales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSales.
     */
    distinct?: RetailSaleScalarFieldEnum | RetailSaleScalarFieldEnum[]
  }

  /**
   * RetailSale findFirstOrThrow
   */
  export type RetailSaleFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter, which RetailSale to fetch.
     */
    where?: RetailSaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSales to fetch.
     */
    orderBy?: RetailSaleOrderByWithRelationInput | RetailSaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailSales.
     */
    cursor?: RetailSaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSales 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` RetailSales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSales.
     */
    distinct?: RetailSaleScalarFieldEnum | RetailSaleScalarFieldEnum[]
  }

  /**
   * RetailSale findMany
   */
  export type RetailSaleFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter, which RetailSales to fetch.
     */
    where?: RetailSaleWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSales to fetch.
     */
    orderBy?: RetailSaleOrderByWithRelationInput | RetailSaleOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing RetailSales.
     */
    cursor?: RetailSaleWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSales 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` RetailSales.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSales.
     */
    distinct?: RetailSaleScalarFieldEnum | RetailSaleScalarFieldEnum[]
  }

  /**
   * RetailSale create
   */
  export type RetailSaleCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * The data needed to create a RetailSale.
     */
    data: XOR<RetailSaleCreateInput, RetailSaleUncheckedCreateInput>
  }

  /**
   * RetailSale createMany
   */
  export type RetailSaleCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many RetailSales.
     */
    data: RetailSaleCreateManyInput | RetailSaleCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * RetailSale update
   */
  export type RetailSaleUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * The data needed to update a RetailSale.
     */
    data: XOR<RetailSaleUpdateInput, RetailSaleUncheckedUpdateInput>
    /**
     * Choose, which RetailSale to update.
     */
    where: RetailSaleWhereUniqueInput
  }

  /**
   * RetailSale updateMany
   */
  export type RetailSaleUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update RetailSales.
     */
    data: XOR<RetailSaleUpdateManyMutationInput, RetailSaleUncheckedUpdateManyInput>
    /**
     * Filter which RetailSales to update
     */
    where?: RetailSaleWhereInput
    /**
     * Limit how many RetailSales to update.
     */
    limit?: number
  }

  /**
   * RetailSale upsert
   */
  export type RetailSaleUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * The filter to search for the RetailSale to update in case it exists.
     */
    where: RetailSaleWhereUniqueInput
    /**
     * In case the RetailSale found by the `where` argument doesn't exist, create a new RetailSale with this data.
     */
    create: XOR<RetailSaleCreateInput, RetailSaleUncheckedCreateInput>
    /**
     * In case the RetailSale was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RetailSaleUpdateInput, RetailSaleUncheckedUpdateInput>
  }

  /**
   * RetailSale delete
   */
  export type RetailSaleDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
    /**
     * Filter which RetailSale to delete.
     */
    where: RetailSaleWhereUniqueInput
  }

  /**
   * RetailSale deleteMany
   */
  export type RetailSaleDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailSales to delete
     */
    where?: RetailSaleWhereInput
    /**
     * Limit how many RetailSales to delete.
     */
    limit?: number
  }

  /**
   * RetailSale.items
   */
  export type RetailSale$itemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    where?: RetailSaleItemWhereInput
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    cursor?: RetailSaleItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * RetailSale.createdByUser
   */
  export type RetailSale$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * RetailSale without action
   */
  export type RetailSaleDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSale
     */
    select?: RetailSaleSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSale
     */
    omit?: RetailSaleOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleInclude<ExtArgs> | null
  }


  /**
   * Model RetailSaleItem
   */

  export type AggregateRetailSaleItem = {
    _count: RetailSaleItemCountAggregateOutputType | null
    _avg: RetailSaleItemAvgAggregateOutputType | null
    _sum: RetailSaleItemSumAggregateOutputType | null
    _min: RetailSaleItemMinAggregateOutputType | null
    _max: RetailSaleItemMaxAggregateOutputType | null
  }

  export type RetailSaleItemAvgAggregateOutputType = {
    id: number | null
    retailSaleId: number | null
    retailStockId: number | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdBy: number | null
  }

  export type RetailSaleItemSumAggregateOutputType = {
    id: bigint | null
    retailSaleId: bigint | null
    retailStockId: bigint | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdBy: bigint | null
  }

  export type RetailSaleItemMinAggregateOutputType = {
    id: bigint | null
    retailSaleId: bigint | null
    retailStockId: bigint | null
    saleUnit: $Enums.PurchaseUnit | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailSaleItemMaxAggregateOutputType = {
    id: bigint | null
    retailSaleId: bigint | null
    retailStockId: bigint | null
    saleUnit: $Enums.PurchaseUnit | null
    quantity: Decimal | null
    bags: Decimal | null
    costPerUnit: Decimal | null
    sellingRate: Decimal | null
    total: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailSaleItemCountAggregateOutputType = {
    id: number
    retailSaleId: number
    retailStockId: number
    saleUnit: number
    quantity: number
    bags: number
    costPerUnit: number
    sellingRate: number
    total: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type RetailSaleItemAvgAggregateInputType = {
    id?: true
    retailSaleId?: true
    retailStockId?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdBy?: true
  }

  export type RetailSaleItemSumAggregateInputType = {
    id?: true
    retailSaleId?: true
    retailStockId?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdBy?: true
  }

  export type RetailSaleItemMinAggregateInputType = {
    id?: true
    retailSaleId?: true
    retailStockId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailSaleItemMaxAggregateInputType = {
    id?: true
    retailSaleId?: true
    retailStockId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailSaleItemCountAggregateInputType = {
    id?: true
    retailSaleId?: true
    retailStockId?: true
    saleUnit?: true
    quantity?: true
    bags?: true
    costPerUnit?: true
    sellingRate?: true
    total?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type RetailSaleItemAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailSaleItem to aggregate.
     */
    where?: RetailSaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSaleItems to fetch.
     */
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RetailSaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSaleItems 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` RetailSaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned RetailSaleItems
    **/
    _count?: true | RetailSaleItemCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RetailSaleItemAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RetailSaleItemSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RetailSaleItemMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RetailSaleItemMaxAggregateInputType
  }

  export type GetRetailSaleItemAggregateType<T extends RetailSaleItemAggregateArgs> = {
        [P in keyof T & keyof AggregateRetailSaleItem]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRetailSaleItem[P]>
      : GetScalarType<T[P], AggregateRetailSaleItem[P]>
  }




  export type RetailSaleItemGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailSaleItemWhereInput
    orderBy?: RetailSaleItemOrderByWithAggregationInput | RetailSaleItemOrderByWithAggregationInput[]
    by: RetailSaleItemScalarFieldEnum[] | RetailSaleItemScalarFieldEnum
    having?: RetailSaleItemScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RetailSaleItemCountAggregateInputType | true
    _avg?: RetailSaleItemAvgAggregateInputType
    _sum?: RetailSaleItemSumAggregateInputType
    _min?: RetailSaleItemMinAggregateInputType
    _max?: RetailSaleItemMaxAggregateInputType
  }

  export type RetailSaleItemGroupByOutputType = {
    id: bigint
    retailSaleId: bigint
    retailStockId: bigint
    saleUnit: $Enums.PurchaseUnit
    quantity: Decimal
    bags: Decimal | null
    costPerUnit: Decimal
    sellingRate: Decimal
    total: Decimal
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: RetailSaleItemCountAggregateOutputType | null
    _avg: RetailSaleItemAvgAggregateOutputType | null
    _sum: RetailSaleItemSumAggregateOutputType | null
    _min: RetailSaleItemMinAggregateOutputType | null
    _max: RetailSaleItemMaxAggregateOutputType | null
  }

  type GetRetailSaleItemGroupByPayload<T extends RetailSaleItemGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RetailSaleItemGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RetailSaleItemGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RetailSaleItemGroupByOutputType[P]>
            : GetScalarType<T[P], RetailSaleItemGroupByOutputType[P]>
        }
      >
    >


  export type RetailSaleItemSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    retailSaleId?: boolean
    retailStockId?: boolean
    saleUnit?: boolean
    quantity?: boolean
    bags?: boolean
    costPerUnit?: boolean
    sellingRate?: boolean
    total?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    retailSale?: boolean | RetailSaleDefaultArgs<ExtArgs>
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailSaleItem$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["retailSaleItem"]>



  export type RetailSaleItemSelectScalar = {
    id?: boolean
    retailSaleId?: boolean
    retailStockId?: boolean
    saleUnit?: boolean
    quantity?: boolean
    bags?: boolean
    costPerUnit?: boolean
    sellingRate?: boolean
    total?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type RetailSaleItemOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "retailSaleId" | "retailStockId" | "saleUnit" | "quantity" | "bags" | "costPerUnit" | "sellingRate" | "total" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["retailSaleItem"]>
  export type RetailSaleItemInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    retailSale?: boolean | RetailSaleDefaultArgs<ExtArgs>
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailSaleItem$createdByUserArgs<ExtArgs>
  }

  export type $RetailSaleItemPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "RetailSaleItem"
    objects: {
      retailSale: Prisma.$RetailSalePayload<ExtArgs>
      retailStock: Prisma.$RetailStockPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      retailSaleId: bigint
      retailStockId: bigint
      saleUnit: $Enums.PurchaseUnit
      quantity: Prisma.Decimal
      bags: Prisma.Decimal | null
      costPerUnit: Prisma.Decimal
      sellingRate: Prisma.Decimal
      total: Prisma.Decimal
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["retailSaleItem"]>
    composites: {}
  }

  type RetailSaleItemGetPayload<S extends boolean | null | undefined | RetailSaleItemDefaultArgs> = $Result.GetResult<Prisma.$RetailSaleItemPayload, S>

  type RetailSaleItemCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RetailSaleItemFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RetailSaleItemCountAggregateInputType | true
    }

  export interface RetailSaleItemDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RetailSaleItem'], meta: { name: 'RetailSaleItem' } }
    /**
     * Find zero or one RetailSaleItem that matches the filter.
     * @param {RetailSaleItemFindUniqueArgs} args - Arguments to find a RetailSaleItem
     * @example
     * // Get one RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RetailSaleItemFindUniqueArgs>(args: SelectSubset<T, RetailSaleItemFindUniqueArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one RetailSaleItem that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RetailSaleItemFindUniqueOrThrowArgs} args - Arguments to find a RetailSaleItem
     * @example
     * // Get one RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RetailSaleItemFindUniqueOrThrowArgs>(args: SelectSubset<T, RetailSaleItemFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailSaleItem 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 {RetailSaleItemFindFirstArgs} args - Arguments to find a RetailSaleItem
     * @example
     * // Get one RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RetailSaleItemFindFirstArgs>(args?: SelectSubset<T, RetailSaleItemFindFirstArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailSaleItem 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 {RetailSaleItemFindFirstOrThrowArgs} args - Arguments to find a RetailSaleItem
     * @example
     * // Get one RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RetailSaleItemFindFirstOrThrowArgs>(args?: SelectSubset<T, RetailSaleItemFindFirstOrThrowArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more RetailSaleItems 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 {RetailSaleItemFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all RetailSaleItems
     * const retailSaleItems = await prisma.retailSaleItem.findMany()
     * 
     * // Get first 10 RetailSaleItems
     * const retailSaleItems = await prisma.retailSaleItem.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const retailSaleItemWithIdOnly = await prisma.retailSaleItem.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RetailSaleItemFindManyArgs>(args?: SelectSubset<T, RetailSaleItemFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a RetailSaleItem.
     * @param {RetailSaleItemCreateArgs} args - Arguments to create a RetailSaleItem.
     * @example
     * // Create one RetailSaleItem
     * const RetailSaleItem = await prisma.retailSaleItem.create({
     *   data: {
     *     // ... data to create a RetailSaleItem
     *   }
     * })
     * 
     */
    create<T extends RetailSaleItemCreateArgs>(args: SelectSubset<T, RetailSaleItemCreateArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many RetailSaleItems.
     * @param {RetailSaleItemCreateManyArgs} args - Arguments to create many RetailSaleItems.
     * @example
     * // Create many RetailSaleItems
     * const retailSaleItem = await prisma.retailSaleItem.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RetailSaleItemCreateManyArgs>(args?: SelectSubset<T, RetailSaleItemCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a RetailSaleItem.
     * @param {RetailSaleItemDeleteArgs} args - Arguments to delete one RetailSaleItem.
     * @example
     * // Delete one RetailSaleItem
     * const RetailSaleItem = await prisma.retailSaleItem.delete({
     *   where: {
     *     // ... filter to delete one RetailSaleItem
     *   }
     * })
     * 
     */
    delete<T extends RetailSaleItemDeleteArgs>(args: SelectSubset<T, RetailSaleItemDeleteArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one RetailSaleItem.
     * @param {RetailSaleItemUpdateArgs} args - Arguments to update one RetailSaleItem.
     * @example
     * // Update one RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RetailSaleItemUpdateArgs>(args: SelectSubset<T, RetailSaleItemUpdateArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more RetailSaleItems.
     * @param {RetailSaleItemDeleteManyArgs} args - Arguments to filter RetailSaleItems to delete.
     * @example
     * // Delete a few RetailSaleItems
     * const { count } = await prisma.retailSaleItem.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RetailSaleItemDeleteManyArgs>(args?: SelectSubset<T, RetailSaleItemDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more RetailSaleItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleItemUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many RetailSaleItems
     * const retailSaleItem = await prisma.retailSaleItem.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RetailSaleItemUpdateManyArgs>(args: SelectSubset<T, RetailSaleItemUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one RetailSaleItem.
     * @param {RetailSaleItemUpsertArgs} args - Arguments to update or create a RetailSaleItem.
     * @example
     * // Update or create a RetailSaleItem
     * const retailSaleItem = await prisma.retailSaleItem.upsert({
     *   create: {
     *     // ... data to create a RetailSaleItem
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the RetailSaleItem we want to update
     *   }
     * })
     */
    upsert<T extends RetailSaleItemUpsertArgs>(args: SelectSubset<T, RetailSaleItemUpsertArgs<ExtArgs>>): Prisma__RetailSaleItemClient<$Result.GetResult<Prisma.$RetailSaleItemPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of RetailSaleItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleItemCountArgs} args - Arguments to filter RetailSaleItems to count.
     * @example
     * // Count the number of RetailSaleItems
     * const count = await prisma.retailSaleItem.count({
     *   where: {
     *     // ... the filter for the RetailSaleItems we want to count
     *   }
     * })
    **/
    count<T extends RetailSaleItemCountArgs>(
      args?: Subset<T, RetailSaleItemCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RetailSaleItemCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a RetailSaleItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleItemAggregateArgs} 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 RetailSaleItemAggregateArgs>(args: Subset<T, RetailSaleItemAggregateArgs>): Prisma.PrismaPromise<GetRetailSaleItemAggregateType<T>>

    /**
     * Group by RetailSaleItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailSaleItemGroupByArgs} 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 RetailSaleItemGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RetailSaleItemGroupByArgs['orderBy'] }
        : { orderBy?: RetailSaleItemGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RetailSaleItemGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRetailSaleItemGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the RetailSaleItem model
   */
  readonly fields: RetailSaleItemFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for RetailSaleItem.
   * 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__RetailSaleItemClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    retailSale<T extends RetailSaleDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RetailSaleDefaultArgs<ExtArgs>>): Prisma__RetailSaleClient<$Result.GetResult<Prisma.$RetailSalePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    retailStock<T extends RetailStockDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RetailStockDefaultArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends RetailSaleItem$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, RetailSaleItem$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the RetailSaleItem model
   */
  interface RetailSaleItemFieldRefs {
    readonly id: FieldRef<"RetailSaleItem", 'BigInt'>
    readonly retailSaleId: FieldRef<"RetailSaleItem", 'BigInt'>
    readonly retailStockId: FieldRef<"RetailSaleItem", 'BigInt'>
    readonly saleUnit: FieldRef<"RetailSaleItem", 'PurchaseUnit'>
    readonly quantity: FieldRef<"RetailSaleItem", 'Decimal'>
    readonly bags: FieldRef<"RetailSaleItem", 'Decimal'>
    readonly costPerUnit: FieldRef<"RetailSaleItem", 'Decimal'>
    readonly sellingRate: FieldRef<"RetailSaleItem", 'Decimal'>
    readonly total: FieldRef<"RetailSaleItem", 'Decimal'>
    readonly createdAt: FieldRef<"RetailSaleItem", 'DateTime'>
    readonly updatedAt: FieldRef<"RetailSaleItem", 'DateTime'>
    readonly createdBy: FieldRef<"RetailSaleItem", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * RetailSaleItem findUnique
   */
  export type RetailSaleItemFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter, which RetailSaleItem to fetch.
     */
    where: RetailSaleItemWhereUniqueInput
  }

  /**
   * RetailSaleItem findUniqueOrThrow
   */
  export type RetailSaleItemFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter, which RetailSaleItem to fetch.
     */
    where: RetailSaleItemWhereUniqueInput
  }

  /**
   * RetailSaleItem findFirst
   */
  export type RetailSaleItemFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter, which RetailSaleItem to fetch.
     */
    where?: RetailSaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSaleItems to fetch.
     */
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailSaleItems.
     */
    cursor?: RetailSaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSaleItems 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` RetailSaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSaleItems.
     */
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * RetailSaleItem findFirstOrThrow
   */
  export type RetailSaleItemFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter, which RetailSaleItem to fetch.
     */
    where?: RetailSaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSaleItems to fetch.
     */
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailSaleItems.
     */
    cursor?: RetailSaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSaleItems 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` RetailSaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSaleItems.
     */
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * RetailSaleItem findMany
   */
  export type RetailSaleItemFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter, which RetailSaleItems to fetch.
     */
    where?: RetailSaleItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailSaleItems to fetch.
     */
    orderBy?: RetailSaleItemOrderByWithRelationInput | RetailSaleItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing RetailSaleItems.
     */
    cursor?: RetailSaleItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailSaleItems 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` RetailSaleItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailSaleItems.
     */
    distinct?: RetailSaleItemScalarFieldEnum | RetailSaleItemScalarFieldEnum[]
  }

  /**
   * RetailSaleItem create
   */
  export type RetailSaleItemCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * The data needed to create a RetailSaleItem.
     */
    data: XOR<RetailSaleItemCreateInput, RetailSaleItemUncheckedCreateInput>
  }

  /**
   * RetailSaleItem createMany
   */
  export type RetailSaleItemCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many RetailSaleItems.
     */
    data: RetailSaleItemCreateManyInput | RetailSaleItemCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * RetailSaleItem update
   */
  export type RetailSaleItemUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * The data needed to update a RetailSaleItem.
     */
    data: XOR<RetailSaleItemUpdateInput, RetailSaleItemUncheckedUpdateInput>
    /**
     * Choose, which RetailSaleItem to update.
     */
    where: RetailSaleItemWhereUniqueInput
  }

  /**
   * RetailSaleItem updateMany
   */
  export type RetailSaleItemUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update RetailSaleItems.
     */
    data: XOR<RetailSaleItemUpdateManyMutationInput, RetailSaleItemUncheckedUpdateManyInput>
    /**
     * Filter which RetailSaleItems to update
     */
    where?: RetailSaleItemWhereInput
    /**
     * Limit how many RetailSaleItems to update.
     */
    limit?: number
  }

  /**
   * RetailSaleItem upsert
   */
  export type RetailSaleItemUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * The filter to search for the RetailSaleItem to update in case it exists.
     */
    where: RetailSaleItemWhereUniqueInput
    /**
     * In case the RetailSaleItem found by the `where` argument doesn't exist, create a new RetailSaleItem with this data.
     */
    create: XOR<RetailSaleItemCreateInput, RetailSaleItemUncheckedCreateInput>
    /**
     * In case the RetailSaleItem was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RetailSaleItemUpdateInput, RetailSaleItemUncheckedUpdateInput>
  }

  /**
   * RetailSaleItem delete
   */
  export type RetailSaleItemDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
    /**
     * Filter which RetailSaleItem to delete.
     */
    where: RetailSaleItemWhereUniqueInput
  }

  /**
   * RetailSaleItem deleteMany
   */
  export type RetailSaleItemDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailSaleItems to delete
     */
    where?: RetailSaleItemWhereInput
    /**
     * Limit how many RetailSaleItems to delete.
     */
    limit?: number
  }

  /**
   * RetailSaleItem.createdByUser
   */
  export type RetailSaleItem$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * RetailSaleItem without action
   */
  export type RetailSaleItemDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailSaleItem
     */
    select?: RetailSaleItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailSaleItem
     */
    omit?: RetailSaleItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailSaleItemInclude<ExtArgs> | null
  }


  /**
   * Model RetailStockSpoilage
   */

  export type AggregateRetailStockSpoilage = {
    _count: RetailStockSpoilageCountAggregateOutputType | null
    _avg: RetailStockSpoilageAvgAggregateOutputType | null
    _sum: RetailStockSpoilageSumAggregateOutputType | null
    _min: RetailStockSpoilageMinAggregateOutputType | null
    _max: RetailStockSpoilageMaxAggregateOutputType | null
  }

  export type RetailStockSpoilageAvgAggregateOutputType = {
    id: number | null
    retailStockId: number | null
    quantity: Decimal | null
    createdBy: number | null
  }

  export type RetailStockSpoilageSumAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    quantity: Decimal | null
    createdBy: bigint | null
  }

  export type RetailStockSpoilageMinAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    spoilageDate: Date | null
    quantity: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockSpoilageMaxAggregateOutputType = {
    id: bigint | null
    retailStockId: bigint | null
    spoilageDate: Date | null
    quantity: Decimal | null
    reason: string | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type RetailStockSpoilageCountAggregateOutputType = {
    id: number
    retailStockId: number
    spoilageDate: number
    quantity: number
    reason: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type RetailStockSpoilageAvgAggregateInputType = {
    id?: true
    retailStockId?: true
    quantity?: true
    createdBy?: true
  }

  export type RetailStockSpoilageSumAggregateInputType = {
    id?: true
    retailStockId?: true
    quantity?: true
    createdBy?: true
  }

  export type RetailStockSpoilageMinAggregateInputType = {
    id?: true
    retailStockId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailStockSpoilageMaxAggregateInputType = {
    id?: true
    retailStockId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type RetailStockSpoilageCountAggregateInputType = {
    id?: true
    retailStockId?: true
    spoilageDate?: true
    quantity?: true
    reason?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type RetailStockSpoilageAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStockSpoilage to aggregate.
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockSpoilages to fetch.
     */
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RetailStockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockSpoilages 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` RetailStockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned RetailStockSpoilages
    **/
    _count?: true | RetailStockSpoilageCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RetailStockSpoilageAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RetailStockSpoilageSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RetailStockSpoilageMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RetailStockSpoilageMaxAggregateInputType
  }

  export type GetRetailStockSpoilageAggregateType<T extends RetailStockSpoilageAggregateArgs> = {
        [P in keyof T & keyof AggregateRetailStockSpoilage]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRetailStockSpoilage[P]>
      : GetScalarType<T[P], AggregateRetailStockSpoilage[P]>
  }




  export type RetailStockSpoilageGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RetailStockSpoilageWhereInput
    orderBy?: RetailStockSpoilageOrderByWithAggregationInput | RetailStockSpoilageOrderByWithAggregationInput[]
    by: RetailStockSpoilageScalarFieldEnum[] | RetailStockSpoilageScalarFieldEnum
    having?: RetailStockSpoilageScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RetailStockSpoilageCountAggregateInputType | true
    _avg?: RetailStockSpoilageAvgAggregateInputType
    _sum?: RetailStockSpoilageSumAggregateInputType
    _min?: RetailStockSpoilageMinAggregateInputType
    _max?: RetailStockSpoilageMaxAggregateInputType
  }

  export type RetailStockSpoilageGroupByOutputType = {
    id: bigint
    retailStockId: bigint
    spoilageDate: Date
    quantity: Decimal
    reason: string | null
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: RetailStockSpoilageCountAggregateOutputType | null
    _avg: RetailStockSpoilageAvgAggregateOutputType | null
    _sum: RetailStockSpoilageSumAggregateOutputType | null
    _min: RetailStockSpoilageMinAggregateOutputType | null
    _max: RetailStockSpoilageMaxAggregateOutputType | null
  }

  type GetRetailStockSpoilageGroupByPayload<T extends RetailStockSpoilageGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<RetailStockSpoilageGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof RetailStockSpoilageGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], RetailStockSpoilageGroupByOutputType[P]>
            : GetScalarType<T[P], RetailStockSpoilageGroupByOutputType[P]>
        }
      >
    >


  export type RetailStockSpoilageSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    retailStockId?: boolean
    spoilageDate?: boolean
    quantity?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailStockSpoilage$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["retailStockSpoilage"]>



  export type RetailStockSpoilageSelectScalar = {
    id?: boolean
    retailStockId?: boolean
    spoilageDate?: boolean
    quantity?: boolean
    reason?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type RetailStockSpoilageOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "retailStockId" | "spoilageDate" | "quantity" | "reason" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["retailStockSpoilage"]>
  export type RetailStockSpoilageInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    retailStock?: boolean | RetailStockDefaultArgs<ExtArgs>
    createdByUser?: boolean | RetailStockSpoilage$createdByUserArgs<ExtArgs>
  }

  export type $RetailStockSpoilagePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "RetailStockSpoilage"
    objects: {
      retailStock: Prisma.$RetailStockPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      retailStockId: bigint
      spoilageDate: Date
      quantity: Prisma.Decimal
      reason: string | null
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["retailStockSpoilage"]>
    composites: {}
  }

  type RetailStockSpoilageGetPayload<S extends boolean | null | undefined | RetailStockSpoilageDefaultArgs> = $Result.GetResult<Prisma.$RetailStockSpoilagePayload, S>

  type RetailStockSpoilageCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RetailStockSpoilageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RetailStockSpoilageCountAggregateInputType | true
    }

  export interface RetailStockSpoilageDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RetailStockSpoilage'], meta: { name: 'RetailStockSpoilage' } }
    /**
     * Find zero or one RetailStockSpoilage that matches the filter.
     * @param {RetailStockSpoilageFindUniqueArgs} args - Arguments to find a RetailStockSpoilage
     * @example
     * // Get one RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends RetailStockSpoilageFindUniqueArgs>(args: SelectSubset<T, RetailStockSpoilageFindUniqueArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one RetailStockSpoilage that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {RetailStockSpoilageFindUniqueOrThrowArgs} args - Arguments to find a RetailStockSpoilage
     * @example
     * // Get one RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends RetailStockSpoilageFindUniqueOrThrowArgs>(args: SelectSubset<T, RetailStockSpoilageFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStockSpoilage 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 {RetailStockSpoilageFindFirstArgs} args - Arguments to find a RetailStockSpoilage
     * @example
     * // Get one RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends RetailStockSpoilageFindFirstArgs>(args?: SelectSubset<T, RetailStockSpoilageFindFirstArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first RetailStockSpoilage 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 {RetailStockSpoilageFindFirstOrThrowArgs} args - Arguments to find a RetailStockSpoilage
     * @example
     * // Get one RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends RetailStockSpoilageFindFirstOrThrowArgs>(args?: SelectSubset<T, RetailStockSpoilageFindFirstOrThrowArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more RetailStockSpoilages 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 {RetailStockSpoilageFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all RetailStockSpoilages
     * const retailStockSpoilages = await prisma.retailStockSpoilage.findMany()
     * 
     * // Get first 10 RetailStockSpoilages
     * const retailStockSpoilages = await prisma.retailStockSpoilage.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const retailStockSpoilageWithIdOnly = await prisma.retailStockSpoilage.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends RetailStockSpoilageFindManyArgs>(args?: SelectSubset<T, RetailStockSpoilageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a RetailStockSpoilage.
     * @param {RetailStockSpoilageCreateArgs} args - Arguments to create a RetailStockSpoilage.
     * @example
     * // Create one RetailStockSpoilage
     * const RetailStockSpoilage = await prisma.retailStockSpoilage.create({
     *   data: {
     *     // ... data to create a RetailStockSpoilage
     *   }
     * })
     * 
     */
    create<T extends RetailStockSpoilageCreateArgs>(args: SelectSubset<T, RetailStockSpoilageCreateArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many RetailStockSpoilages.
     * @param {RetailStockSpoilageCreateManyArgs} args - Arguments to create many RetailStockSpoilages.
     * @example
     * // Create many RetailStockSpoilages
     * const retailStockSpoilage = await prisma.retailStockSpoilage.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends RetailStockSpoilageCreateManyArgs>(args?: SelectSubset<T, RetailStockSpoilageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a RetailStockSpoilage.
     * @param {RetailStockSpoilageDeleteArgs} args - Arguments to delete one RetailStockSpoilage.
     * @example
     * // Delete one RetailStockSpoilage
     * const RetailStockSpoilage = await prisma.retailStockSpoilage.delete({
     *   where: {
     *     // ... filter to delete one RetailStockSpoilage
     *   }
     * })
     * 
     */
    delete<T extends RetailStockSpoilageDeleteArgs>(args: SelectSubset<T, RetailStockSpoilageDeleteArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one RetailStockSpoilage.
     * @param {RetailStockSpoilageUpdateArgs} args - Arguments to update one RetailStockSpoilage.
     * @example
     * // Update one RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RetailStockSpoilageUpdateArgs>(args: SelectSubset<T, RetailStockSpoilageUpdateArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more RetailStockSpoilages.
     * @param {RetailStockSpoilageDeleteManyArgs} args - Arguments to filter RetailStockSpoilages to delete.
     * @example
     * // Delete a few RetailStockSpoilages
     * const { count } = await prisma.retailStockSpoilage.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends RetailStockSpoilageDeleteManyArgs>(args?: SelectSubset<T, RetailStockSpoilageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more RetailStockSpoilages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockSpoilageUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many RetailStockSpoilages
     * const retailStockSpoilage = await prisma.retailStockSpoilage.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends RetailStockSpoilageUpdateManyArgs>(args: SelectSubset<T, RetailStockSpoilageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one RetailStockSpoilage.
     * @param {RetailStockSpoilageUpsertArgs} args - Arguments to update or create a RetailStockSpoilage.
     * @example
     * // Update or create a RetailStockSpoilage
     * const retailStockSpoilage = await prisma.retailStockSpoilage.upsert({
     *   create: {
     *     // ... data to create a RetailStockSpoilage
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the RetailStockSpoilage we want to update
     *   }
     * })
     */
    upsert<T extends RetailStockSpoilageUpsertArgs>(args: SelectSubset<T, RetailStockSpoilageUpsertArgs<ExtArgs>>): Prisma__RetailStockSpoilageClient<$Result.GetResult<Prisma.$RetailStockSpoilagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of RetailStockSpoilages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockSpoilageCountArgs} args - Arguments to filter RetailStockSpoilages to count.
     * @example
     * // Count the number of RetailStockSpoilages
     * const count = await prisma.retailStockSpoilage.count({
     *   where: {
     *     // ... the filter for the RetailStockSpoilages we want to count
     *   }
     * })
    **/
    count<T extends RetailStockSpoilageCountArgs>(
      args?: Subset<T, RetailStockSpoilageCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], RetailStockSpoilageCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a RetailStockSpoilage.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockSpoilageAggregateArgs} 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 RetailStockSpoilageAggregateArgs>(args: Subset<T, RetailStockSpoilageAggregateArgs>): Prisma.PrismaPromise<GetRetailStockSpoilageAggregateType<T>>

    /**
     * Group by RetailStockSpoilage.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RetailStockSpoilageGroupByArgs} 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 RetailStockSpoilageGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RetailStockSpoilageGroupByArgs['orderBy'] }
        : { orderBy?: RetailStockSpoilageGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RetailStockSpoilageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRetailStockSpoilageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the RetailStockSpoilage model
   */
  readonly fields: RetailStockSpoilageFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for RetailStockSpoilage.
   * 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__RetailStockSpoilageClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    retailStock<T extends RetailStockDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RetailStockDefaultArgs<ExtArgs>>): Prisma__RetailStockClient<$Result.GetResult<Prisma.$RetailStockPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends RetailStockSpoilage$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, RetailStockSpoilage$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the RetailStockSpoilage model
   */
  interface RetailStockSpoilageFieldRefs {
    readonly id: FieldRef<"RetailStockSpoilage", 'BigInt'>
    readonly retailStockId: FieldRef<"RetailStockSpoilage", 'BigInt'>
    readonly spoilageDate: FieldRef<"RetailStockSpoilage", 'DateTime'>
    readonly quantity: FieldRef<"RetailStockSpoilage", 'Decimal'>
    readonly reason: FieldRef<"RetailStockSpoilage", 'String'>
    readonly remarks: FieldRef<"RetailStockSpoilage", 'String'>
    readonly createdAt: FieldRef<"RetailStockSpoilage", 'DateTime'>
    readonly updatedAt: FieldRef<"RetailStockSpoilage", 'DateTime'>
    readonly createdBy: FieldRef<"RetailStockSpoilage", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * RetailStockSpoilage findUnique
   */
  export type RetailStockSpoilageFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockSpoilage to fetch.
     */
    where: RetailStockSpoilageWhereUniqueInput
  }

  /**
   * RetailStockSpoilage findUniqueOrThrow
   */
  export type RetailStockSpoilageFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockSpoilage to fetch.
     */
    where: RetailStockSpoilageWhereUniqueInput
  }

  /**
   * RetailStockSpoilage findFirst
   */
  export type RetailStockSpoilageFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockSpoilage to fetch.
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockSpoilages to fetch.
     */
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStockSpoilages.
     */
    cursor?: RetailStockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockSpoilages 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` RetailStockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockSpoilages.
     */
    distinct?: RetailStockSpoilageScalarFieldEnum | RetailStockSpoilageScalarFieldEnum[]
  }

  /**
   * RetailStockSpoilage findFirstOrThrow
   */
  export type RetailStockSpoilageFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockSpoilage to fetch.
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockSpoilages to fetch.
     */
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for RetailStockSpoilages.
     */
    cursor?: RetailStockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockSpoilages 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` RetailStockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockSpoilages.
     */
    distinct?: RetailStockSpoilageScalarFieldEnum | RetailStockSpoilageScalarFieldEnum[]
  }

  /**
   * RetailStockSpoilage findMany
   */
  export type RetailStockSpoilageFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter, which RetailStockSpoilages to fetch.
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of RetailStockSpoilages to fetch.
     */
    orderBy?: RetailStockSpoilageOrderByWithRelationInput | RetailStockSpoilageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing RetailStockSpoilages.
     */
    cursor?: RetailStockSpoilageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` RetailStockSpoilages 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` RetailStockSpoilages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of RetailStockSpoilages.
     */
    distinct?: RetailStockSpoilageScalarFieldEnum | RetailStockSpoilageScalarFieldEnum[]
  }

  /**
   * RetailStockSpoilage create
   */
  export type RetailStockSpoilageCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * The data needed to create a RetailStockSpoilage.
     */
    data: XOR<RetailStockSpoilageCreateInput, RetailStockSpoilageUncheckedCreateInput>
  }

  /**
   * RetailStockSpoilage createMany
   */
  export type RetailStockSpoilageCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many RetailStockSpoilages.
     */
    data: RetailStockSpoilageCreateManyInput | RetailStockSpoilageCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * RetailStockSpoilage update
   */
  export type RetailStockSpoilageUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * The data needed to update a RetailStockSpoilage.
     */
    data: XOR<RetailStockSpoilageUpdateInput, RetailStockSpoilageUncheckedUpdateInput>
    /**
     * Choose, which RetailStockSpoilage to update.
     */
    where: RetailStockSpoilageWhereUniqueInput
  }

  /**
   * RetailStockSpoilage updateMany
   */
  export type RetailStockSpoilageUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update RetailStockSpoilages.
     */
    data: XOR<RetailStockSpoilageUpdateManyMutationInput, RetailStockSpoilageUncheckedUpdateManyInput>
    /**
     * Filter which RetailStockSpoilages to update
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * Limit how many RetailStockSpoilages to update.
     */
    limit?: number
  }

  /**
   * RetailStockSpoilage upsert
   */
  export type RetailStockSpoilageUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * The filter to search for the RetailStockSpoilage to update in case it exists.
     */
    where: RetailStockSpoilageWhereUniqueInput
    /**
     * In case the RetailStockSpoilage found by the `where` argument doesn't exist, create a new RetailStockSpoilage with this data.
     */
    create: XOR<RetailStockSpoilageCreateInput, RetailStockSpoilageUncheckedCreateInput>
    /**
     * In case the RetailStockSpoilage was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RetailStockSpoilageUpdateInput, RetailStockSpoilageUncheckedUpdateInput>
  }

  /**
   * RetailStockSpoilage delete
   */
  export type RetailStockSpoilageDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
    /**
     * Filter which RetailStockSpoilage to delete.
     */
    where: RetailStockSpoilageWhereUniqueInput
  }

  /**
   * RetailStockSpoilage deleteMany
   */
  export type RetailStockSpoilageDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which RetailStockSpoilages to delete
     */
    where?: RetailStockSpoilageWhereInput
    /**
     * Limit how many RetailStockSpoilages to delete.
     */
    limit?: number
  }

  /**
   * RetailStockSpoilage.createdByUser
   */
  export type RetailStockSpoilage$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * RetailStockSpoilage without action
   */
  export type RetailStockSpoilageDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RetailStockSpoilage
     */
    select?: RetailStockSpoilageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the RetailStockSpoilage
     */
    omit?: RetailStockSpoilageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RetailStockSpoilageInclude<ExtArgs> | null
  }


  /**
   * Model BoxReturn
   */

  export type AggregateBoxReturn = {
    _count: BoxReturnCountAggregateOutputType | null
    _avg: BoxReturnAvgAggregateOutputType | null
    _sum: BoxReturnSumAggregateOutputType | null
    _min: BoxReturnMinAggregateOutputType | null
    _max: BoxReturnMaxAggregateOutputType | null
  }

  export type BoxReturnAvgAggregateOutputType = {
    id: number | null
    supplierId: number | null
    boxCount: Decimal | null
    createdBy: number | null
  }

  export type BoxReturnSumAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    boxCount: Decimal | null
    createdBy: bigint | null
  }

  export type BoxReturnMinAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    returnDate: Date | null
    boxCount: Decimal | null
    remarks: string | null
    signature: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type BoxReturnMaxAggregateOutputType = {
    id: bigint | null
    supplierId: bigint | null
    returnDate: Date | null
    boxCount: Decimal | null
    remarks: string | null
    signature: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type BoxReturnCountAggregateOutputType = {
    id: number
    supplierId: number
    returnDate: number
    boxCount: number
    remarks: number
    signature: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type BoxReturnAvgAggregateInputType = {
    id?: true
    supplierId?: true
    boxCount?: true
    createdBy?: true
  }

  export type BoxReturnSumAggregateInputType = {
    id?: true
    supplierId?: true
    boxCount?: true
    createdBy?: true
  }

  export type BoxReturnMinAggregateInputType = {
    id?: true
    supplierId?: true
    returnDate?: true
    boxCount?: true
    remarks?: true
    signature?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type BoxReturnMaxAggregateInputType = {
    id?: true
    supplierId?: true
    returnDate?: true
    boxCount?: true
    remarks?: true
    signature?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type BoxReturnCountAggregateInputType = {
    id?: true
    supplierId?: true
    returnDate?: true
    boxCount?: true
    remarks?: true
    signature?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type BoxReturnAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which BoxReturn to aggregate.
     */
    where?: BoxReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of BoxReturns to fetch.
     */
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: BoxReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` BoxReturns 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` BoxReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned BoxReturns
    **/
    _count?: true | BoxReturnCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: BoxReturnAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: BoxReturnSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: BoxReturnMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: BoxReturnMaxAggregateInputType
  }

  export type GetBoxReturnAggregateType<T extends BoxReturnAggregateArgs> = {
        [P in keyof T & keyof AggregateBoxReturn]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateBoxReturn[P]>
      : GetScalarType<T[P], AggregateBoxReturn[P]>
  }




  export type BoxReturnGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: BoxReturnWhereInput
    orderBy?: BoxReturnOrderByWithAggregationInput | BoxReturnOrderByWithAggregationInput[]
    by: BoxReturnScalarFieldEnum[] | BoxReturnScalarFieldEnum
    having?: BoxReturnScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: BoxReturnCountAggregateInputType | true
    _avg?: BoxReturnAvgAggregateInputType
    _sum?: BoxReturnSumAggregateInputType
    _min?: BoxReturnMinAggregateInputType
    _max?: BoxReturnMaxAggregateInputType
  }

  export type BoxReturnGroupByOutputType = {
    id: bigint
    supplierId: bigint
    returnDate: Date
    boxCount: Decimal
    remarks: string | null
    signature: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: BoxReturnCountAggregateOutputType | null
    _avg: BoxReturnAvgAggregateOutputType | null
    _sum: BoxReturnSumAggregateOutputType | null
    _min: BoxReturnMinAggregateOutputType | null
    _max: BoxReturnMaxAggregateOutputType | null
  }

  type GetBoxReturnGroupByPayload<T extends BoxReturnGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<BoxReturnGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof BoxReturnGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], BoxReturnGroupByOutputType[P]>
            : GetScalarType<T[P], BoxReturnGroupByOutputType[P]>
        }
      >
    >


  export type BoxReturnSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    supplierId?: boolean
    returnDate?: boolean
    boxCount?: boolean
    remarks?: boolean
    signature?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    supplier?: boolean | SupplierDefaultArgs<ExtArgs>
    createdByUser?: boolean | BoxReturn$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["boxReturn"]>



  export type BoxReturnSelectScalar = {
    id?: boolean
    supplierId?: boolean
    returnDate?: boolean
    boxCount?: boolean
    remarks?: boolean
    signature?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type BoxReturnOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "supplierId" | "returnDate" | "boxCount" | "remarks" | "signature" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["boxReturn"]>
  export type BoxReturnInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    supplier?: boolean | SupplierDefaultArgs<ExtArgs>
    createdByUser?: boolean | BoxReturn$createdByUserArgs<ExtArgs>
  }

  export type $BoxReturnPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "BoxReturn"
    objects: {
      supplier: Prisma.$SupplierPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      supplierId: bigint
      returnDate: Date
      boxCount: Prisma.Decimal
      remarks: string | null
      signature: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["boxReturn"]>
    composites: {}
  }

  type BoxReturnGetPayload<S extends boolean | null | undefined | BoxReturnDefaultArgs> = $Result.GetResult<Prisma.$BoxReturnPayload, S>

  type BoxReturnCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<BoxReturnFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: BoxReturnCountAggregateInputType | true
    }

  export interface BoxReturnDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['BoxReturn'], meta: { name: 'BoxReturn' } }
    /**
     * Find zero or one BoxReturn that matches the filter.
     * @param {BoxReturnFindUniqueArgs} args - Arguments to find a BoxReturn
     * @example
     * // Get one BoxReturn
     * const boxReturn = await prisma.boxReturn.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends BoxReturnFindUniqueArgs>(args: SelectSubset<T, BoxReturnFindUniqueArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one BoxReturn that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {BoxReturnFindUniqueOrThrowArgs} args - Arguments to find a BoxReturn
     * @example
     * // Get one BoxReturn
     * const boxReturn = await prisma.boxReturn.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends BoxReturnFindUniqueOrThrowArgs>(args: SelectSubset<T, BoxReturnFindUniqueOrThrowArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first BoxReturn 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 {BoxReturnFindFirstArgs} args - Arguments to find a BoxReturn
     * @example
     * // Get one BoxReturn
     * const boxReturn = await prisma.boxReturn.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends BoxReturnFindFirstArgs>(args?: SelectSubset<T, BoxReturnFindFirstArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first BoxReturn 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 {BoxReturnFindFirstOrThrowArgs} args - Arguments to find a BoxReturn
     * @example
     * // Get one BoxReturn
     * const boxReturn = await prisma.boxReturn.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends BoxReturnFindFirstOrThrowArgs>(args?: SelectSubset<T, BoxReturnFindFirstOrThrowArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more BoxReturns 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 {BoxReturnFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all BoxReturns
     * const boxReturns = await prisma.boxReturn.findMany()
     * 
     * // Get first 10 BoxReturns
     * const boxReturns = await prisma.boxReturn.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const boxReturnWithIdOnly = await prisma.boxReturn.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends BoxReturnFindManyArgs>(args?: SelectSubset<T, BoxReturnFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a BoxReturn.
     * @param {BoxReturnCreateArgs} args - Arguments to create a BoxReturn.
     * @example
     * // Create one BoxReturn
     * const BoxReturn = await prisma.boxReturn.create({
     *   data: {
     *     // ... data to create a BoxReturn
     *   }
     * })
     * 
     */
    create<T extends BoxReturnCreateArgs>(args: SelectSubset<T, BoxReturnCreateArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many BoxReturns.
     * @param {BoxReturnCreateManyArgs} args - Arguments to create many BoxReturns.
     * @example
     * // Create many BoxReturns
     * const boxReturn = await prisma.boxReturn.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends BoxReturnCreateManyArgs>(args?: SelectSubset<T, BoxReturnCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a BoxReturn.
     * @param {BoxReturnDeleteArgs} args - Arguments to delete one BoxReturn.
     * @example
     * // Delete one BoxReturn
     * const BoxReturn = await prisma.boxReturn.delete({
     *   where: {
     *     // ... filter to delete one BoxReturn
     *   }
     * })
     * 
     */
    delete<T extends BoxReturnDeleteArgs>(args: SelectSubset<T, BoxReturnDeleteArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one BoxReturn.
     * @param {BoxReturnUpdateArgs} args - Arguments to update one BoxReturn.
     * @example
     * // Update one BoxReturn
     * const boxReturn = await prisma.boxReturn.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends BoxReturnUpdateArgs>(args: SelectSubset<T, BoxReturnUpdateArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more BoxReturns.
     * @param {BoxReturnDeleteManyArgs} args - Arguments to filter BoxReturns to delete.
     * @example
     * // Delete a few BoxReturns
     * const { count } = await prisma.boxReturn.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends BoxReturnDeleteManyArgs>(args?: SelectSubset<T, BoxReturnDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more BoxReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {BoxReturnUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many BoxReturns
     * const boxReturn = await prisma.boxReturn.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends BoxReturnUpdateManyArgs>(args: SelectSubset<T, BoxReturnUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one BoxReturn.
     * @param {BoxReturnUpsertArgs} args - Arguments to update or create a BoxReturn.
     * @example
     * // Update or create a BoxReturn
     * const boxReturn = await prisma.boxReturn.upsert({
     *   create: {
     *     // ... data to create a BoxReturn
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the BoxReturn we want to update
     *   }
     * })
     */
    upsert<T extends BoxReturnUpsertArgs>(args: SelectSubset<T, BoxReturnUpsertArgs<ExtArgs>>): Prisma__BoxReturnClient<$Result.GetResult<Prisma.$BoxReturnPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of BoxReturns.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {BoxReturnCountArgs} args - Arguments to filter BoxReturns to count.
     * @example
     * // Count the number of BoxReturns
     * const count = await prisma.boxReturn.count({
     *   where: {
     *     // ... the filter for the BoxReturns we want to count
     *   }
     * })
    **/
    count<T extends BoxReturnCountArgs>(
      args?: Subset<T, BoxReturnCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], BoxReturnCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a BoxReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {BoxReturnAggregateArgs} 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 BoxReturnAggregateArgs>(args: Subset<T, BoxReturnAggregateArgs>): Prisma.PrismaPromise<GetBoxReturnAggregateType<T>>

    /**
     * Group by BoxReturn.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {BoxReturnGroupByArgs} 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 BoxReturnGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: BoxReturnGroupByArgs['orderBy'] }
        : { orderBy?: BoxReturnGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, BoxReturnGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetBoxReturnGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the BoxReturn model
   */
  readonly fields: BoxReturnFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for BoxReturn.
   * 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__BoxReturnClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    supplier<T extends SupplierDefaultArgs<ExtArgs> = {}>(args?: Subset<T, SupplierDefaultArgs<ExtArgs>>): Prisma__SupplierClient<$Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends BoxReturn$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, BoxReturn$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the BoxReturn model
   */
  interface BoxReturnFieldRefs {
    readonly id: FieldRef<"BoxReturn", 'BigInt'>
    readonly supplierId: FieldRef<"BoxReturn", 'BigInt'>
    readonly returnDate: FieldRef<"BoxReturn", 'DateTime'>
    readonly boxCount: FieldRef<"BoxReturn", 'Decimal'>
    readonly remarks: FieldRef<"BoxReturn", 'String'>
    readonly signature: FieldRef<"BoxReturn", 'String'>
    readonly createdAt: FieldRef<"BoxReturn", 'DateTime'>
    readonly updatedAt: FieldRef<"BoxReturn", 'DateTime'>
    readonly createdBy: FieldRef<"BoxReturn", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * BoxReturn findUnique
   */
  export type BoxReturnFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter, which BoxReturn to fetch.
     */
    where: BoxReturnWhereUniqueInput
  }

  /**
   * BoxReturn findUniqueOrThrow
   */
  export type BoxReturnFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter, which BoxReturn to fetch.
     */
    where: BoxReturnWhereUniqueInput
  }

  /**
   * BoxReturn findFirst
   */
  export type BoxReturnFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter, which BoxReturn to fetch.
     */
    where?: BoxReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of BoxReturns to fetch.
     */
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for BoxReturns.
     */
    cursor?: BoxReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` BoxReturns 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` BoxReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of BoxReturns.
     */
    distinct?: BoxReturnScalarFieldEnum | BoxReturnScalarFieldEnum[]
  }

  /**
   * BoxReturn findFirstOrThrow
   */
  export type BoxReturnFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter, which BoxReturn to fetch.
     */
    where?: BoxReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of BoxReturns to fetch.
     */
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for BoxReturns.
     */
    cursor?: BoxReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` BoxReturns 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` BoxReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of BoxReturns.
     */
    distinct?: BoxReturnScalarFieldEnum | BoxReturnScalarFieldEnum[]
  }

  /**
   * BoxReturn findMany
   */
  export type BoxReturnFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter, which BoxReturns to fetch.
     */
    where?: BoxReturnWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of BoxReturns to fetch.
     */
    orderBy?: BoxReturnOrderByWithRelationInput | BoxReturnOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing BoxReturns.
     */
    cursor?: BoxReturnWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` BoxReturns 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` BoxReturns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of BoxReturns.
     */
    distinct?: BoxReturnScalarFieldEnum | BoxReturnScalarFieldEnum[]
  }

  /**
   * BoxReturn create
   */
  export type BoxReturnCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * The data needed to create a BoxReturn.
     */
    data: XOR<BoxReturnCreateInput, BoxReturnUncheckedCreateInput>
  }

  /**
   * BoxReturn createMany
   */
  export type BoxReturnCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many BoxReturns.
     */
    data: BoxReturnCreateManyInput | BoxReturnCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * BoxReturn update
   */
  export type BoxReturnUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * The data needed to update a BoxReturn.
     */
    data: XOR<BoxReturnUpdateInput, BoxReturnUncheckedUpdateInput>
    /**
     * Choose, which BoxReturn to update.
     */
    where: BoxReturnWhereUniqueInput
  }

  /**
   * BoxReturn updateMany
   */
  export type BoxReturnUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update BoxReturns.
     */
    data: XOR<BoxReturnUpdateManyMutationInput, BoxReturnUncheckedUpdateManyInput>
    /**
     * Filter which BoxReturns to update
     */
    where?: BoxReturnWhereInput
    /**
     * Limit how many BoxReturns to update.
     */
    limit?: number
  }

  /**
   * BoxReturn upsert
   */
  export type BoxReturnUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * The filter to search for the BoxReturn to update in case it exists.
     */
    where: BoxReturnWhereUniqueInput
    /**
     * In case the BoxReturn found by the `where` argument doesn't exist, create a new BoxReturn with this data.
     */
    create: XOR<BoxReturnCreateInput, BoxReturnUncheckedCreateInput>
    /**
     * In case the BoxReturn was found with the provided `where` argument, update it with this data.
     */
    update: XOR<BoxReturnUpdateInput, BoxReturnUncheckedUpdateInput>
  }

  /**
   * BoxReturn delete
   */
  export type BoxReturnDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
    /**
     * Filter which BoxReturn to delete.
     */
    where: BoxReturnWhereUniqueInput
  }

  /**
   * BoxReturn deleteMany
   */
  export type BoxReturnDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which BoxReturns to delete
     */
    where?: BoxReturnWhereInput
    /**
     * Limit how many BoxReturns to delete.
     */
    limit?: number
  }

  /**
   * BoxReturn.createdByUser
   */
  export type BoxReturn$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * BoxReturn without action
   */
  export type BoxReturnDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the BoxReturn
     */
    select?: BoxReturnSelect<ExtArgs> | null
    /**
     * Omit specific fields from the BoxReturn
     */
    omit?: BoxReturnOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: BoxReturnInclude<ExtArgs> | null
  }


  /**
   * Model Employee
   */

  export type AggregateEmployee = {
    _count: EmployeeCountAggregateOutputType | null
    _avg: EmployeeAvgAggregateOutputType | null
    _sum: EmployeeSumAggregateOutputType | null
    _min: EmployeeMinAggregateOutputType | null
    _max: EmployeeMaxAggregateOutputType | null
  }

  export type EmployeeAvgAggregateOutputType = {
    id: number | null
    createdBy: number | null
  }

  export type EmployeeSumAggregateOutputType = {
    id: bigint | null
    createdBy: bigint | null
  }

  export type EmployeeMinAggregateOutputType = {
    id: bigint | null
    employeeCode: string | null
    name: string | null
    mobile: string | null
    designation: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type EmployeeMaxAggregateOutputType = {
    id: bigint | null
    employeeCode: string | null
    name: string | null
    mobile: string | null
    designation: string | null
    status: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
    deletedAt: Date | null
    createdBy: bigint | null
  }

  export type EmployeeCountAggregateOutputType = {
    id: number
    employeeCode: number
    name: number
    mobile: number
    designation: number
    status: number
    createdAt: number
    updatedAt: number
    deletedAt: number
    createdBy: number
    _all: number
  }


  export type EmployeeAvgAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type EmployeeSumAggregateInputType = {
    id?: true
    createdBy?: true
  }

  export type EmployeeMinAggregateInputType = {
    id?: true
    employeeCode?: true
    name?: true
    mobile?: true
    designation?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type EmployeeMaxAggregateInputType = {
    id?: true
    employeeCode?: true
    name?: true
    mobile?: true
    designation?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
  }

  export type EmployeeCountAggregateInputType = {
    id?: true
    employeeCode?: true
    name?: true
    mobile?: true
    designation?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    deletedAt?: true
    createdBy?: true
    _all?: true
  }

  export type EmployeeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Employee to aggregate.
     */
    where?: EmployeeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Employees to fetch.
     */
    orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: EmployeeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Employees 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` Employees.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Employees
    **/
    _count?: true | EmployeeCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: EmployeeAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: EmployeeSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: EmployeeMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: EmployeeMaxAggregateInputType
  }

  export type GetEmployeeAggregateType<T extends EmployeeAggregateArgs> = {
        [P in keyof T & keyof AggregateEmployee]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateEmployee[P]>
      : GetScalarType<T[P], AggregateEmployee[P]>
  }




  export type EmployeeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: EmployeeWhereInput
    orderBy?: EmployeeOrderByWithAggregationInput | EmployeeOrderByWithAggregationInput[]
    by: EmployeeScalarFieldEnum[] | EmployeeScalarFieldEnum
    having?: EmployeeScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: EmployeeCountAggregateInputType | true
    _avg?: EmployeeAvgAggregateInputType
    _sum?: EmployeeSumAggregateInputType
    _min?: EmployeeMinAggregateInputType
    _max?: EmployeeMaxAggregateInputType
  }

  export type EmployeeGroupByOutputType = {
    id: bigint
    employeeCode: string
    name: string
    mobile: string | null
    designation: string | null
    status: boolean
    createdAt: Date
    updatedAt: Date
    deletedAt: Date | null
    createdBy: bigint | null
    _count: EmployeeCountAggregateOutputType | null
    _avg: EmployeeAvgAggregateOutputType | null
    _sum: EmployeeSumAggregateOutputType | null
    _min: EmployeeMinAggregateOutputType | null
    _max: EmployeeMaxAggregateOutputType | null
  }

  type GetEmployeeGroupByPayload<T extends EmployeeGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<EmployeeGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof EmployeeGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], EmployeeGroupByOutputType[P]>
            : GetScalarType<T[P], EmployeeGroupByOutputType[P]>
        }
      >
    >


  export type EmployeeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    employeeCode?: boolean
    name?: boolean
    mobile?: boolean
    designation?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
    attendances?: boolean | Employee$attendancesArgs<ExtArgs>
    createdByUser?: boolean | Employee$createdByUserArgs<ExtArgs>
    _count?: boolean | EmployeeCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["employee"]>



  export type EmployeeSelectScalar = {
    id?: boolean
    employeeCode?: boolean
    name?: boolean
    mobile?: boolean
    designation?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    deletedAt?: boolean
    createdBy?: boolean
  }

  export type EmployeeOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "employeeCode" | "name" | "mobile" | "designation" | "status" | "createdAt" | "updatedAt" | "deletedAt" | "createdBy", ExtArgs["result"]["employee"]>
  export type EmployeeInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    attendances?: boolean | Employee$attendancesArgs<ExtArgs>
    createdByUser?: boolean | Employee$createdByUserArgs<ExtArgs>
    _count?: boolean | EmployeeCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $EmployeePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Employee"
    objects: {
      attendances: Prisma.$AttendancePayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      employeeCode: string
      name: string
      mobile: string | null
      designation: string | null
      status: boolean
      createdAt: Date
      updatedAt: Date
      deletedAt: Date | null
      createdBy: bigint | null
    }, ExtArgs["result"]["employee"]>
    composites: {}
  }

  type EmployeeGetPayload<S extends boolean | null | undefined | EmployeeDefaultArgs> = $Result.GetResult<Prisma.$EmployeePayload, S>

  type EmployeeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<EmployeeFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: EmployeeCountAggregateInputType | true
    }

  export interface EmployeeDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Employee'], meta: { name: 'Employee' } }
    /**
     * Find zero or one Employee that matches the filter.
     * @param {EmployeeFindUniqueArgs} args - Arguments to find a Employee
     * @example
     * // Get one Employee
     * const employee = await prisma.employee.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends EmployeeFindUniqueArgs>(args: SelectSubset<T, EmployeeFindUniqueArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Employee that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {EmployeeFindUniqueOrThrowArgs} args - Arguments to find a Employee
     * @example
     * // Get one Employee
     * const employee = await prisma.employee.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends EmployeeFindUniqueOrThrowArgs>(args: SelectSubset<T, EmployeeFindUniqueOrThrowArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Employee 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 {EmployeeFindFirstArgs} args - Arguments to find a Employee
     * @example
     * // Get one Employee
     * const employee = await prisma.employee.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends EmployeeFindFirstArgs>(args?: SelectSubset<T, EmployeeFindFirstArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Employee 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 {EmployeeFindFirstOrThrowArgs} args - Arguments to find a Employee
     * @example
     * // Get one Employee
     * const employee = await prisma.employee.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends EmployeeFindFirstOrThrowArgs>(args?: SelectSubset<T, EmployeeFindFirstOrThrowArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Employees 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 {EmployeeFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Employees
     * const employees = await prisma.employee.findMany()
     * 
     * // Get first 10 Employees
     * const employees = await prisma.employee.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const employeeWithIdOnly = await prisma.employee.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends EmployeeFindManyArgs>(args?: SelectSubset<T, EmployeeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Employee.
     * @param {EmployeeCreateArgs} args - Arguments to create a Employee.
     * @example
     * // Create one Employee
     * const Employee = await prisma.employee.create({
     *   data: {
     *     // ... data to create a Employee
     *   }
     * })
     * 
     */
    create<T extends EmployeeCreateArgs>(args: SelectSubset<T, EmployeeCreateArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Employees.
     * @param {EmployeeCreateManyArgs} args - Arguments to create many Employees.
     * @example
     * // Create many Employees
     * const employee = await prisma.employee.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends EmployeeCreateManyArgs>(args?: SelectSubset<T, EmployeeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Employee.
     * @param {EmployeeDeleteArgs} args - Arguments to delete one Employee.
     * @example
     * // Delete one Employee
     * const Employee = await prisma.employee.delete({
     *   where: {
     *     // ... filter to delete one Employee
     *   }
     * })
     * 
     */
    delete<T extends EmployeeDeleteArgs>(args: SelectSubset<T, EmployeeDeleteArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Employee.
     * @param {EmployeeUpdateArgs} args - Arguments to update one Employee.
     * @example
     * // Update one Employee
     * const employee = await prisma.employee.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends EmployeeUpdateArgs>(args: SelectSubset<T, EmployeeUpdateArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Employees.
     * @param {EmployeeDeleteManyArgs} args - Arguments to filter Employees to delete.
     * @example
     * // Delete a few Employees
     * const { count } = await prisma.employee.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends EmployeeDeleteManyArgs>(args?: SelectSubset<T, EmployeeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Employees.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {EmployeeUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Employees
     * const employee = await prisma.employee.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends EmployeeUpdateManyArgs>(args: SelectSubset<T, EmployeeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Employee.
     * @param {EmployeeUpsertArgs} args - Arguments to update or create a Employee.
     * @example
     * // Update or create a Employee
     * const employee = await prisma.employee.upsert({
     *   create: {
     *     // ... data to create a Employee
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Employee we want to update
     *   }
     * })
     */
    upsert<T extends EmployeeUpsertArgs>(args: SelectSubset<T, EmployeeUpsertArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Employees.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {EmployeeCountArgs} args - Arguments to filter Employees to count.
     * @example
     * // Count the number of Employees
     * const count = await prisma.employee.count({
     *   where: {
     *     // ... the filter for the Employees we want to count
     *   }
     * })
    **/
    count<T extends EmployeeCountArgs>(
      args?: Subset<T, EmployeeCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], EmployeeCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Employee.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {EmployeeAggregateArgs} 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 EmployeeAggregateArgs>(args: Subset<T, EmployeeAggregateArgs>): Prisma.PrismaPromise<GetEmployeeAggregateType<T>>

    /**
     * Group by Employee.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {EmployeeGroupByArgs} 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 EmployeeGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: EmployeeGroupByArgs['orderBy'] }
        : { orderBy?: EmployeeGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, EmployeeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetEmployeeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Employee model
   */
  readonly fields: EmployeeFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Employee.
   * 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__EmployeeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    attendances<T extends Employee$attendancesArgs<ExtArgs> = {}>(args?: Subset<T, Employee$attendancesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends Employee$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Employee$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Employee model
   */
  interface EmployeeFieldRefs {
    readonly id: FieldRef<"Employee", 'BigInt'>
    readonly employeeCode: FieldRef<"Employee", 'String'>
    readonly name: FieldRef<"Employee", 'String'>
    readonly mobile: FieldRef<"Employee", 'String'>
    readonly designation: FieldRef<"Employee", 'String'>
    readonly status: FieldRef<"Employee", 'Boolean'>
    readonly createdAt: FieldRef<"Employee", 'DateTime'>
    readonly updatedAt: FieldRef<"Employee", 'DateTime'>
    readonly deletedAt: FieldRef<"Employee", 'DateTime'>
    readonly createdBy: FieldRef<"Employee", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Employee findUnique
   */
  export type EmployeeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter, which Employee to fetch.
     */
    where: EmployeeWhereUniqueInput
  }

  /**
   * Employee findUniqueOrThrow
   */
  export type EmployeeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter, which Employee to fetch.
     */
    where: EmployeeWhereUniqueInput
  }

  /**
   * Employee findFirst
   */
  export type EmployeeFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter, which Employee to fetch.
     */
    where?: EmployeeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Employees to fetch.
     */
    orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Employees.
     */
    cursor?: EmployeeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Employees 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` Employees.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Employees.
     */
    distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[]
  }

  /**
   * Employee findFirstOrThrow
   */
  export type EmployeeFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter, which Employee to fetch.
     */
    where?: EmployeeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Employees to fetch.
     */
    orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Employees.
     */
    cursor?: EmployeeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Employees 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` Employees.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Employees.
     */
    distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[]
  }

  /**
   * Employee findMany
   */
  export type EmployeeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter, which Employees to fetch.
     */
    where?: EmployeeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Employees to fetch.
     */
    orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Employees.
     */
    cursor?: EmployeeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Employees 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` Employees.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Employees.
     */
    distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[]
  }

  /**
   * Employee create
   */
  export type EmployeeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * The data needed to create a Employee.
     */
    data: XOR<EmployeeCreateInput, EmployeeUncheckedCreateInput>
  }

  /**
   * Employee createMany
   */
  export type EmployeeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Employees.
     */
    data: EmployeeCreateManyInput | EmployeeCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Employee update
   */
  export type EmployeeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * The data needed to update a Employee.
     */
    data: XOR<EmployeeUpdateInput, EmployeeUncheckedUpdateInput>
    /**
     * Choose, which Employee to update.
     */
    where: EmployeeWhereUniqueInput
  }

  /**
   * Employee updateMany
   */
  export type EmployeeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Employees.
     */
    data: XOR<EmployeeUpdateManyMutationInput, EmployeeUncheckedUpdateManyInput>
    /**
     * Filter which Employees to update
     */
    where?: EmployeeWhereInput
    /**
     * Limit how many Employees to update.
     */
    limit?: number
  }

  /**
   * Employee upsert
   */
  export type EmployeeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * The filter to search for the Employee to update in case it exists.
     */
    where: EmployeeWhereUniqueInput
    /**
     * In case the Employee found by the `where` argument doesn't exist, create a new Employee with this data.
     */
    create: XOR<EmployeeCreateInput, EmployeeUncheckedCreateInput>
    /**
     * In case the Employee was found with the provided `where` argument, update it with this data.
     */
    update: XOR<EmployeeUpdateInput, EmployeeUncheckedUpdateInput>
  }

  /**
   * Employee delete
   */
  export type EmployeeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
    /**
     * Filter which Employee to delete.
     */
    where: EmployeeWhereUniqueInput
  }

  /**
   * Employee deleteMany
   */
  export type EmployeeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Employees to delete
     */
    where?: EmployeeWhereInput
    /**
     * Limit how many Employees to delete.
     */
    limit?: number
  }

  /**
   * Employee.attendances
   */
  export type Employee$attendancesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    where?: AttendanceWhereInput
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    cursor?: AttendanceWhereUniqueInput
    take?: number
    skip?: number
    distinct?: AttendanceScalarFieldEnum | AttendanceScalarFieldEnum[]
  }

  /**
   * Employee.createdByUser
   */
  export type Employee$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Employee without action
   */
  export type EmployeeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Employee
     */
    select?: EmployeeSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Employee
     */
    omit?: EmployeeOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: EmployeeInclude<ExtArgs> | null
  }


  /**
   * Model Attendance
   */

  export type AggregateAttendance = {
    _count: AttendanceCountAggregateOutputType | null
    _avg: AttendanceAvgAggregateOutputType | null
    _sum: AttendanceSumAggregateOutputType | null
    _min: AttendanceMinAggregateOutputType | null
    _max: AttendanceMaxAggregateOutputType | null
  }

  export type AttendanceAvgAggregateOutputType = {
    id: number | null
    employeeId: number | null
    createdBy: number | null
  }

  export type AttendanceSumAggregateOutputType = {
    id: bigint | null
    employeeId: bigint | null
    createdBy: bigint | null
  }

  export type AttendanceMinAggregateOutputType = {
    id: bigint | null
    employeeId: bigint | null
    date: Date | null
    status: $Enums.AttendanceStatus | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type AttendanceMaxAggregateOutputType = {
    id: bigint | null
    employeeId: bigint | null
    date: Date | null
    status: $Enums.AttendanceStatus | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type AttendanceCountAggregateOutputType = {
    id: number
    employeeId: number
    date: number
    status: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type AttendanceAvgAggregateInputType = {
    id?: true
    employeeId?: true
    createdBy?: true
  }

  export type AttendanceSumAggregateInputType = {
    id?: true
    employeeId?: true
    createdBy?: true
  }

  export type AttendanceMinAggregateInputType = {
    id?: true
    employeeId?: true
    date?: true
    status?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type AttendanceMaxAggregateInputType = {
    id?: true
    employeeId?: true
    date?: true
    status?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type AttendanceCountAggregateInputType = {
    id?: true
    employeeId?: true
    date?: true
    status?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type AttendanceAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Attendance to aggregate.
     */
    where?: AttendanceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Attendances to fetch.
     */
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: AttendanceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Attendances 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` Attendances.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Attendances
    **/
    _count?: true | AttendanceCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: AttendanceAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: AttendanceSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: AttendanceMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: AttendanceMaxAggregateInputType
  }

  export type GetAttendanceAggregateType<T extends AttendanceAggregateArgs> = {
        [P in keyof T & keyof AggregateAttendance]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateAttendance[P]>
      : GetScalarType<T[P], AggregateAttendance[P]>
  }




  export type AttendanceGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: AttendanceWhereInput
    orderBy?: AttendanceOrderByWithAggregationInput | AttendanceOrderByWithAggregationInput[]
    by: AttendanceScalarFieldEnum[] | AttendanceScalarFieldEnum
    having?: AttendanceScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: AttendanceCountAggregateInputType | true
    _avg?: AttendanceAvgAggregateInputType
    _sum?: AttendanceSumAggregateInputType
    _min?: AttendanceMinAggregateInputType
    _max?: AttendanceMaxAggregateInputType
  }

  export type AttendanceGroupByOutputType = {
    id: bigint
    employeeId: bigint
    date: Date
    status: $Enums.AttendanceStatus
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: AttendanceCountAggregateOutputType | null
    _avg: AttendanceAvgAggregateOutputType | null
    _sum: AttendanceSumAggregateOutputType | null
    _min: AttendanceMinAggregateOutputType | null
    _max: AttendanceMaxAggregateOutputType | null
  }

  type GetAttendanceGroupByPayload<T extends AttendanceGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<AttendanceGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof AttendanceGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], AttendanceGroupByOutputType[P]>
            : GetScalarType<T[P], AttendanceGroupByOutputType[P]>
        }
      >
    >


  export type AttendanceSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    employeeId?: boolean
    date?: boolean
    status?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    employee?: boolean | EmployeeDefaultArgs<ExtArgs>
    createdByUser?: boolean | Attendance$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["attendance"]>



  export type AttendanceSelectScalar = {
    id?: boolean
    employeeId?: boolean
    date?: boolean
    status?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type AttendanceOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "employeeId" | "date" | "status" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["attendance"]>
  export type AttendanceInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    employee?: boolean | EmployeeDefaultArgs<ExtArgs>
    createdByUser?: boolean | Attendance$createdByUserArgs<ExtArgs>
  }

  export type $AttendancePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Attendance"
    objects: {
      employee: Prisma.$EmployeePayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      employeeId: bigint
      date: Date
      status: $Enums.AttendanceStatus
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["attendance"]>
    composites: {}
  }

  type AttendanceGetPayload<S extends boolean | null | undefined | AttendanceDefaultArgs> = $Result.GetResult<Prisma.$AttendancePayload, S>

  type AttendanceCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<AttendanceFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: AttendanceCountAggregateInputType | true
    }

  export interface AttendanceDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Attendance'], meta: { name: 'Attendance' } }
    /**
     * Find zero or one Attendance that matches the filter.
     * @param {AttendanceFindUniqueArgs} args - Arguments to find a Attendance
     * @example
     * // Get one Attendance
     * const attendance = await prisma.attendance.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends AttendanceFindUniqueArgs>(args: SelectSubset<T, AttendanceFindUniqueArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Attendance that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {AttendanceFindUniqueOrThrowArgs} args - Arguments to find a Attendance
     * @example
     * // Get one Attendance
     * const attendance = await prisma.attendance.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends AttendanceFindUniqueOrThrowArgs>(args: SelectSubset<T, AttendanceFindUniqueOrThrowArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Attendance 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 {AttendanceFindFirstArgs} args - Arguments to find a Attendance
     * @example
     * // Get one Attendance
     * const attendance = await prisma.attendance.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends AttendanceFindFirstArgs>(args?: SelectSubset<T, AttendanceFindFirstArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Attendance 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 {AttendanceFindFirstOrThrowArgs} args - Arguments to find a Attendance
     * @example
     * // Get one Attendance
     * const attendance = await prisma.attendance.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends AttendanceFindFirstOrThrowArgs>(args?: SelectSubset<T, AttendanceFindFirstOrThrowArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Attendances 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 {AttendanceFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Attendances
     * const attendances = await prisma.attendance.findMany()
     * 
     * // Get first 10 Attendances
     * const attendances = await prisma.attendance.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const attendanceWithIdOnly = await prisma.attendance.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends AttendanceFindManyArgs>(args?: SelectSubset<T, AttendanceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Attendance.
     * @param {AttendanceCreateArgs} args - Arguments to create a Attendance.
     * @example
     * // Create one Attendance
     * const Attendance = await prisma.attendance.create({
     *   data: {
     *     // ... data to create a Attendance
     *   }
     * })
     * 
     */
    create<T extends AttendanceCreateArgs>(args: SelectSubset<T, AttendanceCreateArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Attendances.
     * @param {AttendanceCreateManyArgs} args - Arguments to create many Attendances.
     * @example
     * // Create many Attendances
     * const attendance = await prisma.attendance.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends AttendanceCreateManyArgs>(args?: SelectSubset<T, AttendanceCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a Attendance.
     * @param {AttendanceDeleteArgs} args - Arguments to delete one Attendance.
     * @example
     * // Delete one Attendance
     * const Attendance = await prisma.attendance.delete({
     *   where: {
     *     // ... filter to delete one Attendance
     *   }
     * })
     * 
     */
    delete<T extends AttendanceDeleteArgs>(args: SelectSubset<T, AttendanceDeleteArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Attendance.
     * @param {AttendanceUpdateArgs} args - Arguments to update one Attendance.
     * @example
     * // Update one Attendance
     * const attendance = await prisma.attendance.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends AttendanceUpdateArgs>(args: SelectSubset<T, AttendanceUpdateArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Attendances.
     * @param {AttendanceDeleteManyArgs} args - Arguments to filter Attendances to delete.
     * @example
     * // Delete a few Attendances
     * const { count } = await prisma.attendance.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends AttendanceDeleteManyArgs>(args?: SelectSubset<T, AttendanceDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Attendances.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AttendanceUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Attendances
     * const attendance = await prisma.attendance.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends AttendanceUpdateManyArgs>(args: SelectSubset<T, AttendanceUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one Attendance.
     * @param {AttendanceUpsertArgs} args - Arguments to update or create a Attendance.
     * @example
     * // Update or create a Attendance
     * const attendance = await prisma.attendance.upsert({
     *   create: {
     *     // ... data to create a Attendance
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Attendance we want to update
     *   }
     * })
     */
    upsert<T extends AttendanceUpsertArgs>(args: SelectSubset<T, AttendanceUpsertArgs<ExtArgs>>): Prisma__AttendanceClient<$Result.GetResult<Prisma.$AttendancePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Attendances.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AttendanceCountArgs} args - Arguments to filter Attendances to count.
     * @example
     * // Count the number of Attendances
     * const count = await prisma.attendance.count({
     *   where: {
     *     // ... the filter for the Attendances we want to count
     *   }
     * })
    **/
    count<T extends AttendanceCountArgs>(
      args?: Subset<T, AttendanceCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], AttendanceCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Attendance.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AttendanceAggregateArgs} 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 AttendanceAggregateArgs>(args: Subset<T, AttendanceAggregateArgs>): Prisma.PrismaPromise<GetAttendanceAggregateType<T>>

    /**
     * Group by Attendance.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AttendanceGroupByArgs} 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 AttendanceGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: AttendanceGroupByArgs['orderBy'] }
        : { orderBy?: AttendanceGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, AttendanceGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAttendanceGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Attendance model
   */
  readonly fields: AttendanceFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Attendance.
   * 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__AttendanceClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    employee<T extends EmployeeDefaultArgs<ExtArgs> = {}>(args?: Subset<T, EmployeeDefaultArgs<ExtArgs>>): Prisma__EmployeeClient<$Result.GetResult<Prisma.$EmployeePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends Attendance$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, Attendance$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Attendance model
   */
  interface AttendanceFieldRefs {
    readonly id: FieldRef<"Attendance", 'BigInt'>
    readonly employeeId: FieldRef<"Attendance", 'BigInt'>
    readonly date: FieldRef<"Attendance", 'DateTime'>
    readonly status: FieldRef<"Attendance", 'AttendanceStatus'>
    readonly remarks: FieldRef<"Attendance", 'String'>
    readonly createdAt: FieldRef<"Attendance", 'DateTime'>
    readonly updatedAt: FieldRef<"Attendance", 'DateTime'>
    readonly createdBy: FieldRef<"Attendance", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * Attendance findUnique
   */
  export type AttendanceFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter, which Attendance to fetch.
     */
    where: AttendanceWhereUniqueInput
  }

  /**
   * Attendance findUniqueOrThrow
   */
  export type AttendanceFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter, which Attendance to fetch.
     */
    where: AttendanceWhereUniqueInput
  }

  /**
   * Attendance findFirst
   */
  export type AttendanceFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter, which Attendance to fetch.
     */
    where?: AttendanceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Attendances to fetch.
     */
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Attendances.
     */
    cursor?: AttendanceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Attendances 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` Attendances.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Attendances.
     */
    distinct?: AttendanceScalarFieldEnum | AttendanceScalarFieldEnum[]
  }

  /**
   * Attendance findFirstOrThrow
   */
  export type AttendanceFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter, which Attendance to fetch.
     */
    where?: AttendanceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Attendances to fetch.
     */
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Attendances.
     */
    cursor?: AttendanceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Attendances 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` Attendances.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Attendances.
     */
    distinct?: AttendanceScalarFieldEnum | AttendanceScalarFieldEnum[]
  }

  /**
   * Attendance findMany
   */
  export type AttendanceFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter, which Attendances to fetch.
     */
    where?: AttendanceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Attendances to fetch.
     */
    orderBy?: AttendanceOrderByWithRelationInput | AttendanceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Attendances.
     */
    cursor?: AttendanceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Attendances 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` Attendances.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Attendances.
     */
    distinct?: AttendanceScalarFieldEnum | AttendanceScalarFieldEnum[]
  }

  /**
   * Attendance create
   */
  export type AttendanceCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * The data needed to create a Attendance.
     */
    data: XOR<AttendanceCreateInput, AttendanceUncheckedCreateInput>
  }

  /**
   * Attendance createMany
   */
  export type AttendanceCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Attendances.
     */
    data: AttendanceCreateManyInput | AttendanceCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Attendance update
   */
  export type AttendanceUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * The data needed to update a Attendance.
     */
    data: XOR<AttendanceUpdateInput, AttendanceUncheckedUpdateInput>
    /**
     * Choose, which Attendance to update.
     */
    where: AttendanceWhereUniqueInput
  }

  /**
   * Attendance updateMany
   */
  export type AttendanceUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Attendances.
     */
    data: XOR<AttendanceUpdateManyMutationInput, AttendanceUncheckedUpdateManyInput>
    /**
     * Filter which Attendances to update
     */
    where?: AttendanceWhereInput
    /**
     * Limit how many Attendances to update.
     */
    limit?: number
  }

  /**
   * Attendance upsert
   */
  export type AttendanceUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * The filter to search for the Attendance to update in case it exists.
     */
    where: AttendanceWhereUniqueInput
    /**
     * In case the Attendance found by the `where` argument doesn't exist, create a new Attendance with this data.
     */
    create: XOR<AttendanceCreateInput, AttendanceUncheckedCreateInput>
    /**
     * In case the Attendance was found with the provided `where` argument, update it with this data.
     */
    update: XOR<AttendanceUpdateInput, AttendanceUncheckedUpdateInput>
  }

  /**
   * Attendance delete
   */
  export type AttendanceDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
    /**
     * Filter which Attendance to delete.
     */
    where: AttendanceWhereUniqueInput
  }

  /**
   * Attendance deleteMany
   */
  export type AttendanceDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Attendances to delete
     */
    where?: AttendanceWhereInput
    /**
     * Limit how many Attendances to delete.
     */
    limit?: number
  }

  /**
   * Attendance.createdByUser
   */
  export type Attendance$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * Attendance without action
   */
  export type AttendanceDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Attendance
     */
    select?: AttendanceSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Attendance
     */
    omit?: AttendanceOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AttendanceInclude<ExtArgs> | null
  }


  /**
   * Model AuditLog
   */

  export type AggregateAuditLog = {
    _count: AuditLogCountAggregateOutputType | null
    _avg: AuditLogAvgAggregateOutputType | null
    _sum: AuditLogSumAggregateOutputType | null
    _min: AuditLogMinAggregateOutputType | null
    _max: AuditLogMaxAggregateOutputType | null
  }

  export type AuditLogAvgAggregateOutputType = {
    id: number | null
    entityId: number | null
    userId: number | null
  }

  export type AuditLogSumAggregateOutputType = {
    id: bigint | null
    entityId: bigint | null
    userId: bigint | null
  }

  export type AuditLogMinAggregateOutputType = {
    id: bigint | null
    entityName: string | null
    entityId: bigint | null
    action: $Enums.AuditAction | null
    createdAt: Date | null
    userId: bigint | null
  }

  export type AuditLogMaxAggregateOutputType = {
    id: bigint | null
    entityName: string | null
    entityId: bigint | null
    action: $Enums.AuditAction | null
    createdAt: Date | null
    userId: bigint | null
  }

  export type AuditLogCountAggregateOutputType = {
    id: number
    entityName: number
    entityId: number
    action: number
    oldValues: number
    newValues: number
    createdAt: number
    userId: number
    _all: number
  }


  export type AuditLogAvgAggregateInputType = {
    id?: true
    entityId?: true
    userId?: true
  }

  export type AuditLogSumAggregateInputType = {
    id?: true
    entityId?: true
    userId?: true
  }

  export type AuditLogMinAggregateInputType = {
    id?: true
    entityName?: true
    entityId?: true
    action?: true
    createdAt?: true
    userId?: true
  }

  export type AuditLogMaxAggregateInputType = {
    id?: true
    entityName?: true
    entityId?: true
    action?: true
    createdAt?: true
    userId?: true
  }

  export type AuditLogCountAggregateInputType = {
    id?: true
    entityName?: true
    entityId?: true
    action?: true
    oldValues?: true
    newValues?: true
    createdAt?: true
    userId?: true
    _all?: true
  }

  export type AuditLogAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which AuditLog to aggregate.
     */
    where?: AuditLogWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of AuditLogs to fetch.
     */
    orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: AuditLogWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` AuditLogs 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` AuditLogs.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned AuditLogs
    **/
    _count?: true | AuditLogCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: AuditLogAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: AuditLogSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: AuditLogMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: AuditLogMaxAggregateInputType
  }

  export type GetAuditLogAggregateType<T extends AuditLogAggregateArgs> = {
        [P in keyof T & keyof AggregateAuditLog]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateAuditLog[P]>
      : GetScalarType<T[P], AggregateAuditLog[P]>
  }




  export type AuditLogGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: AuditLogWhereInput
    orderBy?: AuditLogOrderByWithAggregationInput | AuditLogOrderByWithAggregationInput[]
    by: AuditLogScalarFieldEnum[] | AuditLogScalarFieldEnum
    having?: AuditLogScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: AuditLogCountAggregateInputType | true
    _avg?: AuditLogAvgAggregateInputType
    _sum?: AuditLogSumAggregateInputType
    _min?: AuditLogMinAggregateInputType
    _max?: AuditLogMaxAggregateInputType
  }

  export type AuditLogGroupByOutputType = {
    id: bigint
    entityName: string
    entityId: bigint
    action: $Enums.AuditAction
    oldValues: JsonValue
    newValues: JsonValue | null
    createdAt: Date
    userId: bigint | null
    _count: AuditLogCountAggregateOutputType | null
    _avg: AuditLogAvgAggregateOutputType | null
    _sum: AuditLogSumAggregateOutputType | null
    _min: AuditLogMinAggregateOutputType | null
    _max: AuditLogMaxAggregateOutputType | null
  }

  type GetAuditLogGroupByPayload<T extends AuditLogGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<AuditLogGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof AuditLogGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], AuditLogGroupByOutputType[P]>
            : GetScalarType<T[P], AuditLogGroupByOutputType[P]>
        }
      >
    >


  export type AuditLogSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    entityName?: boolean
    entityId?: boolean
    action?: boolean
    oldValues?: boolean
    newValues?: boolean
    createdAt?: boolean
    userId?: boolean
    user?: boolean | AuditLog$userArgs<ExtArgs>
  }, ExtArgs["result"]["auditLog"]>



  export type AuditLogSelectScalar = {
    id?: boolean
    entityName?: boolean
    entityId?: boolean
    action?: boolean
    oldValues?: boolean
    newValues?: boolean
    createdAt?: boolean
    userId?: boolean
  }

  export type AuditLogOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "entityName" | "entityId" | "action" | "oldValues" | "newValues" | "createdAt" | "userId", ExtArgs["result"]["auditLog"]>
  export type AuditLogInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    user?: boolean | AuditLog$userArgs<ExtArgs>
  }

  export type $AuditLogPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "AuditLog"
    objects: {
      user: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      entityName: string
      entityId: bigint
      action: $Enums.AuditAction
      oldValues: Prisma.JsonValue
      newValues: Prisma.JsonValue | null
      createdAt: Date
      userId: bigint | null
    }, ExtArgs["result"]["auditLog"]>
    composites: {}
  }

  type AuditLogGetPayload<S extends boolean | null | undefined | AuditLogDefaultArgs> = $Result.GetResult<Prisma.$AuditLogPayload, S>

  type AuditLogCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<AuditLogFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: AuditLogCountAggregateInputType | true
    }

  export interface AuditLogDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['AuditLog'], meta: { name: 'AuditLog' } }
    /**
     * Find zero or one AuditLog that matches the filter.
     * @param {AuditLogFindUniqueArgs} args - Arguments to find a AuditLog
     * @example
     * // Get one AuditLog
     * const auditLog = await prisma.auditLog.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends AuditLogFindUniqueArgs>(args: SelectSubset<T, AuditLogFindUniqueArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one AuditLog that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {AuditLogFindUniqueOrThrowArgs} args - Arguments to find a AuditLog
     * @example
     * // Get one AuditLog
     * const auditLog = await prisma.auditLog.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends AuditLogFindUniqueOrThrowArgs>(args: SelectSubset<T, AuditLogFindUniqueOrThrowArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first AuditLog 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 {AuditLogFindFirstArgs} args - Arguments to find a AuditLog
     * @example
     * // Get one AuditLog
     * const auditLog = await prisma.auditLog.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends AuditLogFindFirstArgs>(args?: SelectSubset<T, AuditLogFindFirstArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first AuditLog 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 {AuditLogFindFirstOrThrowArgs} args - Arguments to find a AuditLog
     * @example
     * // Get one AuditLog
     * const auditLog = await prisma.auditLog.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends AuditLogFindFirstOrThrowArgs>(args?: SelectSubset<T, AuditLogFindFirstOrThrowArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more AuditLogs 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 {AuditLogFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all AuditLogs
     * const auditLogs = await prisma.auditLog.findMany()
     * 
     * // Get first 10 AuditLogs
     * const auditLogs = await prisma.auditLog.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const auditLogWithIdOnly = await prisma.auditLog.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends AuditLogFindManyArgs>(args?: SelectSubset<T, AuditLogFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a AuditLog.
     * @param {AuditLogCreateArgs} args - Arguments to create a AuditLog.
     * @example
     * // Create one AuditLog
     * const AuditLog = await prisma.auditLog.create({
     *   data: {
     *     // ... data to create a AuditLog
     *   }
     * })
     * 
     */
    create<T extends AuditLogCreateArgs>(args: SelectSubset<T, AuditLogCreateArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many AuditLogs.
     * @param {AuditLogCreateManyArgs} args - Arguments to create many AuditLogs.
     * @example
     * // Create many AuditLogs
     * const auditLog = await prisma.auditLog.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends AuditLogCreateManyArgs>(args?: SelectSubset<T, AuditLogCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a AuditLog.
     * @param {AuditLogDeleteArgs} args - Arguments to delete one AuditLog.
     * @example
     * // Delete one AuditLog
     * const AuditLog = await prisma.auditLog.delete({
     *   where: {
     *     // ... filter to delete one AuditLog
     *   }
     * })
     * 
     */
    delete<T extends AuditLogDeleteArgs>(args: SelectSubset<T, AuditLogDeleteArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one AuditLog.
     * @param {AuditLogUpdateArgs} args - Arguments to update one AuditLog.
     * @example
     * // Update one AuditLog
     * const auditLog = await prisma.auditLog.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends AuditLogUpdateArgs>(args: SelectSubset<T, AuditLogUpdateArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more AuditLogs.
     * @param {AuditLogDeleteManyArgs} args - Arguments to filter AuditLogs to delete.
     * @example
     * // Delete a few AuditLogs
     * const { count } = await prisma.auditLog.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends AuditLogDeleteManyArgs>(args?: SelectSubset<T, AuditLogDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more AuditLogs.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AuditLogUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many AuditLogs
     * const auditLog = await prisma.auditLog.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends AuditLogUpdateManyArgs>(args: SelectSubset<T, AuditLogUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one AuditLog.
     * @param {AuditLogUpsertArgs} args - Arguments to update or create a AuditLog.
     * @example
     * // Update or create a AuditLog
     * const auditLog = await prisma.auditLog.upsert({
     *   create: {
     *     // ... data to create a AuditLog
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the AuditLog we want to update
     *   }
     * })
     */
    upsert<T extends AuditLogUpsertArgs>(args: SelectSubset<T, AuditLogUpsertArgs<ExtArgs>>): Prisma__AuditLogClient<$Result.GetResult<Prisma.$AuditLogPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of AuditLogs.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AuditLogCountArgs} args - Arguments to filter AuditLogs to count.
     * @example
     * // Count the number of AuditLogs
     * const count = await prisma.auditLog.count({
     *   where: {
     *     // ... the filter for the AuditLogs we want to count
     *   }
     * })
    **/
    count<T extends AuditLogCountArgs>(
      args?: Subset<T, AuditLogCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], AuditLogCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a AuditLog.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AuditLogAggregateArgs} 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 AuditLogAggregateArgs>(args: Subset<T, AuditLogAggregateArgs>): Prisma.PrismaPromise<GetAuditLogAggregateType<T>>

    /**
     * Group by AuditLog.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {AuditLogGroupByArgs} 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 AuditLogGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: AuditLogGroupByArgs['orderBy'] }
        : { orderBy?: AuditLogGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, AuditLogGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAuditLogGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the AuditLog model
   */
  readonly fields: AuditLogFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for AuditLog.
   * 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__AuditLogClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    user<T extends AuditLog$userArgs<ExtArgs> = {}>(args?: Subset<T, AuditLog$userArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the AuditLog model
   */
  interface AuditLogFieldRefs {
    readonly id: FieldRef<"AuditLog", 'BigInt'>
    readonly entityName: FieldRef<"AuditLog", 'String'>
    readonly entityId: FieldRef<"AuditLog", 'BigInt'>
    readonly action: FieldRef<"AuditLog", 'AuditAction'>
    readonly oldValues: FieldRef<"AuditLog", 'Json'>
    readonly newValues: FieldRef<"AuditLog", 'Json'>
    readonly createdAt: FieldRef<"AuditLog", 'DateTime'>
    readonly userId: FieldRef<"AuditLog", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * AuditLog findUnique
   */
  export type AuditLogFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter, which AuditLog to fetch.
     */
    where: AuditLogWhereUniqueInput
  }

  /**
   * AuditLog findUniqueOrThrow
   */
  export type AuditLogFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter, which AuditLog to fetch.
     */
    where: AuditLogWhereUniqueInput
  }

  /**
   * AuditLog findFirst
   */
  export type AuditLogFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter, which AuditLog to fetch.
     */
    where?: AuditLogWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of AuditLogs to fetch.
     */
    orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for AuditLogs.
     */
    cursor?: AuditLogWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` AuditLogs 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` AuditLogs.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of AuditLogs.
     */
    distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[]
  }

  /**
   * AuditLog findFirstOrThrow
   */
  export type AuditLogFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter, which AuditLog to fetch.
     */
    where?: AuditLogWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of AuditLogs to fetch.
     */
    orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for AuditLogs.
     */
    cursor?: AuditLogWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` AuditLogs 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` AuditLogs.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of AuditLogs.
     */
    distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[]
  }

  /**
   * AuditLog findMany
   */
  export type AuditLogFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter, which AuditLogs to fetch.
     */
    where?: AuditLogWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of AuditLogs to fetch.
     */
    orderBy?: AuditLogOrderByWithRelationInput | AuditLogOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing AuditLogs.
     */
    cursor?: AuditLogWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` AuditLogs 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` AuditLogs.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of AuditLogs.
     */
    distinct?: AuditLogScalarFieldEnum | AuditLogScalarFieldEnum[]
  }

  /**
   * AuditLog create
   */
  export type AuditLogCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * The data needed to create a AuditLog.
     */
    data: XOR<AuditLogCreateInput, AuditLogUncheckedCreateInput>
  }

  /**
   * AuditLog createMany
   */
  export type AuditLogCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many AuditLogs.
     */
    data: AuditLogCreateManyInput | AuditLogCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * AuditLog update
   */
  export type AuditLogUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * The data needed to update a AuditLog.
     */
    data: XOR<AuditLogUpdateInput, AuditLogUncheckedUpdateInput>
    /**
     * Choose, which AuditLog to update.
     */
    where: AuditLogWhereUniqueInput
  }

  /**
   * AuditLog updateMany
   */
  export type AuditLogUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update AuditLogs.
     */
    data: XOR<AuditLogUpdateManyMutationInput, AuditLogUncheckedUpdateManyInput>
    /**
     * Filter which AuditLogs to update
     */
    where?: AuditLogWhereInput
    /**
     * Limit how many AuditLogs to update.
     */
    limit?: number
  }

  /**
   * AuditLog upsert
   */
  export type AuditLogUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * The filter to search for the AuditLog to update in case it exists.
     */
    where: AuditLogWhereUniqueInput
    /**
     * In case the AuditLog found by the `where` argument doesn't exist, create a new AuditLog with this data.
     */
    create: XOR<AuditLogCreateInput, AuditLogUncheckedCreateInput>
    /**
     * In case the AuditLog was found with the provided `where` argument, update it with this data.
     */
    update: XOR<AuditLogUpdateInput, AuditLogUncheckedUpdateInput>
  }

  /**
   * AuditLog delete
   */
  export type AuditLogDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
    /**
     * Filter which AuditLog to delete.
     */
    where: AuditLogWhereUniqueInput
  }

  /**
   * AuditLog deleteMany
   */
  export type AuditLogDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which AuditLogs to delete
     */
    where?: AuditLogWhereInput
    /**
     * Limit how many AuditLogs to delete.
     */
    limit?: number
  }

  /**
   * AuditLog.user
   */
  export type AuditLog$userArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * AuditLog without action
   */
  export type AuditLogDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the AuditLog
     */
    select?: AuditLogSelect<ExtArgs> | null
    /**
     * Omit specific fields from the AuditLog
     */
    omit?: AuditLogOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: AuditLogInclude<ExtArgs> | null
  }


  /**
   * Model FastBilling
   */

  export type AggregateFastBilling = {
    _count: FastBillingCountAggregateOutputType | null
    _avg: FastBillingAvgAggregateOutputType | null
    _sum: FastBillingSumAggregateOutputType | null
    _min: FastBillingMinAggregateOutputType | null
    _max: FastBillingMaxAggregateOutputType | null
  }

  export type FastBillingAvgAggregateOutputType = {
    id: number | null
    totalAmount: Decimal | null
    createdBy: number | null
  }

  export type FastBillingSumAggregateOutputType = {
    id: bigint | null
    totalAmount: Decimal | null
    createdBy: bigint | null
  }

  export type FastBillingMinAggregateOutputType = {
    id: bigint | null
    billNo: string | null
    billDate: Date | null
    customerName: string | null
    totalAmount: Decimal | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type FastBillingMaxAggregateOutputType = {
    id: bigint | null
    billNo: string | null
    billDate: Date | null
    customerName: string | null
    totalAmount: Decimal | null
    remarks: string | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type FastBillingCountAggregateOutputType = {
    id: number
    billNo: number
    billDate: number
    customerName: number
    totalAmount: number
    remarks: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type FastBillingAvgAggregateInputType = {
    id?: true
    totalAmount?: true
    createdBy?: true
  }

  export type FastBillingSumAggregateInputType = {
    id?: true
    totalAmount?: true
    createdBy?: true
  }

  export type FastBillingMinAggregateInputType = {
    id?: true
    billNo?: true
    billDate?: true
    customerName?: true
    totalAmount?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type FastBillingMaxAggregateInputType = {
    id?: true
    billNo?: true
    billDate?: true
    customerName?: true
    totalAmount?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type FastBillingCountAggregateInputType = {
    id?: true
    billNo?: true
    billDate?: true
    customerName?: true
    totalAmount?: true
    remarks?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type FastBillingAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FastBilling to aggregate.
     */
    where?: FastBillingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillings to fetch.
     */
    orderBy?: FastBillingOrderByWithRelationInput | FastBillingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: FastBillingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillings 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` FastBillings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned FastBillings
    **/
    _count?: true | FastBillingCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: FastBillingAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: FastBillingSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: FastBillingMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: FastBillingMaxAggregateInputType
  }

  export type GetFastBillingAggregateType<T extends FastBillingAggregateArgs> = {
        [P in keyof T & keyof AggregateFastBilling]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateFastBilling[P]>
      : GetScalarType<T[P], AggregateFastBilling[P]>
  }




  export type FastBillingGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FastBillingWhereInput
    orderBy?: FastBillingOrderByWithAggregationInput | FastBillingOrderByWithAggregationInput[]
    by: FastBillingScalarFieldEnum[] | FastBillingScalarFieldEnum
    having?: FastBillingScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: FastBillingCountAggregateInputType | true
    _avg?: FastBillingAvgAggregateInputType
    _sum?: FastBillingSumAggregateInputType
    _min?: FastBillingMinAggregateInputType
    _max?: FastBillingMaxAggregateInputType
  }

  export type FastBillingGroupByOutputType = {
    id: bigint
    billNo: string
    billDate: Date
    customerName: string
    totalAmount: Decimal
    remarks: string | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: FastBillingCountAggregateOutputType | null
    _avg: FastBillingAvgAggregateOutputType | null
    _sum: FastBillingSumAggregateOutputType | null
    _min: FastBillingMinAggregateOutputType | null
    _max: FastBillingMaxAggregateOutputType | null
  }

  type GetFastBillingGroupByPayload<T extends FastBillingGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<FastBillingGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof FastBillingGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], FastBillingGroupByOutputType[P]>
            : GetScalarType<T[P], FastBillingGroupByOutputType[P]>
        }
      >
    >


  export type FastBillingSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    billNo?: boolean
    billDate?: boolean
    customerName?: boolean
    totalAmount?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    items?: boolean | FastBilling$itemsArgs<ExtArgs>
    createdByUser?: boolean | FastBilling$createdByUserArgs<ExtArgs>
    _count?: boolean | FastBillingCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["fastBilling"]>



  export type FastBillingSelectScalar = {
    id?: boolean
    billNo?: boolean
    billDate?: boolean
    customerName?: boolean
    totalAmount?: boolean
    remarks?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type FastBillingOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "billNo" | "billDate" | "customerName" | "totalAmount" | "remarks" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["fastBilling"]>
  export type FastBillingInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    items?: boolean | FastBilling$itemsArgs<ExtArgs>
    createdByUser?: boolean | FastBilling$createdByUserArgs<ExtArgs>
    _count?: boolean | FastBillingCountOutputTypeDefaultArgs<ExtArgs>
  }

  export type $FastBillingPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "FastBilling"
    objects: {
      items: Prisma.$FastBillingItemPayload<ExtArgs>[]
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      billNo: string
      billDate: Date
      customerName: string
      totalAmount: Prisma.Decimal
      remarks: string | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["fastBilling"]>
    composites: {}
  }

  type FastBillingGetPayload<S extends boolean | null | undefined | FastBillingDefaultArgs> = $Result.GetResult<Prisma.$FastBillingPayload, S>

  type FastBillingCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<FastBillingFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: FastBillingCountAggregateInputType | true
    }

  export interface FastBillingDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['FastBilling'], meta: { name: 'FastBilling' } }
    /**
     * Find zero or one FastBilling that matches the filter.
     * @param {FastBillingFindUniqueArgs} args - Arguments to find a FastBilling
     * @example
     * // Get one FastBilling
     * const fastBilling = await prisma.fastBilling.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends FastBillingFindUniqueArgs>(args: SelectSubset<T, FastBillingFindUniqueArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one FastBilling that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {FastBillingFindUniqueOrThrowArgs} args - Arguments to find a FastBilling
     * @example
     * // Get one FastBilling
     * const fastBilling = await prisma.fastBilling.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends FastBillingFindUniqueOrThrowArgs>(args: SelectSubset<T, FastBillingFindUniqueOrThrowArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FastBilling 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 {FastBillingFindFirstArgs} args - Arguments to find a FastBilling
     * @example
     * // Get one FastBilling
     * const fastBilling = await prisma.fastBilling.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends FastBillingFindFirstArgs>(args?: SelectSubset<T, FastBillingFindFirstArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FastBilling 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 {FastBillingFindFirstOrThrowArgs} args - Arguments to find a FastBilling
     * @example
     * // Get one FastBilling
     * const fastBilling = await prisma.fastBilling.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends FastBillingFindFirstOrThrowArgs>(args?: SelectSubset<T, FastBillingFindFirstOrThrowArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more FastBillings 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 {FastBillingFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all FastBillings
     * const fastBillings = await prisma.fastBilling.findMany()
     * 
     * // Get first 10 FastBillings
     * const fastBillings = await prisma.fastBilling.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const fastBillingWithIdOnly = await prisma.fastBilling.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends FastBillingFindManyArgs>(args?: SelectSubset<T, FastBillingFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a FastBilling.
     * @param {FastBillingCreateArgs} args - Arguments to create a FastBilling.
     * @example
     * // Create one FastBilling
     * const FastBilling = await prisma.fastBilling.create({
     *   data: {
     *     // ... data to create a FastBilling
     *   }
     * })
     * 
     */
    create<T extends FastBillingCreateArgs>(args: SelectSubset<T, FastBillingCreateArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many FastBillings.
     * @param {FastBillingCreateManyArgs} args - Arguments to create many FastBillings.
     * @example
     * // Create many FastBillings
     * const fastBilling = await prisma.fastBilling.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends FastBillingCreateManyArgs>(args?: SelectSubset<T, FastBillingCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a FastBilling.
     * @param {FastBillingDeleteArgs} args - Arguments to delete one FastBilling.
     * @example
     * // Delete one FastBilling
     * const FastBilling = await prisma.fastBilling.delete({
     *   where: {
     *     // ... filter to delete one FastBilling
     *   }
     * })
     * 
     */
    delete<T extends FastBillingDeleteArgs>(args: SelectSubset<T, FastBillingDeleteArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one FastBilling.
     * @param {FastBillingUpdateArgs} args - Arguments to update one FastBilling.
     * @example
     * // Update one FastBilling
     * const fastBilling = await prisma.fastBilling.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends FastBillingUpdateArgs>(args: SelectSubset<T, FastBillingUpdateArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more FastBillings.
     * @param {FastBillingDeleteManyArgs} args - Arguments to filter FastBillings to delete.
     * @example
     * // Delete a few FastBillings
     * const { count } = await prisma.fastBilling.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends FastBillingDeleteManyArgs>(args?: SelectSubset<T, FastBillingDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more FastBillings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many FastBillings
     * const fastBilling = await prisma.fastBilling.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends FastBillingUpdateManyArgs>(args: SelectSubset<T, FastBillingUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one FastBilling.
     * @param {FastBillingUpsertArgs} args - Arguments to update or create a FastBilling.
     * @example
     * // Update or create a FastBilling
     * const fastBilling = await prisma.fastBilling.upsert({
     *   create: {
     *     // ... data to create a FastBilling
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the FastBilling we want to update
     *   }
     * })
     */
    upsert<T extends FastBillingUpsertArgs>(args: SelectSubset<T, FastBillingUpsertArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of FastBillings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingCountArgs} args - Arguments to filter FastBillings to count.
     * @example
     * // Count the number of FastBillings
     * const count = await prisma.fastBilling.count({
     *   where: {
     *     // ... the filter for the FastBillings we want to count
     *   }
     * })
    **/
    count<T extends FastBillingCountArgs>(
      args?: Subset<T, FastBillingCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], FastBillingCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a FastBilling.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingAggregateArgs} 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 FastBillingAggregateArgs>(args: Subset<T, FastBillingAggregateArgs>): Prisma.PrismaPromise<GetFastBillingAggregateType<T>>

    /**
     * Group by FastBilling.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingGroupByArgs} 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 FastBillingGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: FastBillingGroupByArgs['orderBy'] }
        : { orderBy?: FastBillingGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, FastBillingGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetFastBillingGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the FastBilling model
   */
  readonly fields: FastBillingFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for FastBilling.
   * 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__FastBillingClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    items<T extends FastBilling$itemsArgs<ExtArgs> = {}>(args?: Subset<T, FastBilling$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    createdByUser<T extends FastBilling$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, FastBilling$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the FastBilling model
   */
  interface FastBillingFieldRefs {
    readonly id: FieldRef<"FastBilling", 'BigInt'>
    readonly billNo: FieldRef<"FastBilling", 'String'>
    readonly billDate: FieldRef<"FastBilling", 'DateTime'>
    readonly customerName: FieldRef<"FastBilling", 'String'>
    readonly totalAmount: FieldRef<"FastBilling", 'Decimal'>
    readonly remarks: FieldRef<"FastBilling", 'String'>
    readonly createdAt: FieldRef<"FastBilling", 'DateTime'>
    readonly updatedAt: FieldRef<"FastBilling", 'DateTime'>
    readonly createdBy: FieldRef<"FastBilling", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * FastBilling findUnique
   */
  export type FastBillingFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter, which FastBilling to fetch.
     */
    where: FastBillingWhereUniqueInput
  }

  /**
   * FastBilling findUniqueOrThrow
   */
  export type FastBillingFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter, which FastBilling to fetch.
     */
    where: FastBillingWhereUniqueInput
  }

  /**
   * FastBilling findFirst
   */
  export type FastBillingFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter, which FastBilling to fetch.
     */
    where?: FastBillingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillings to fetch.
     */
    orderBy?: FastBillingOrderByWithRelationInput | FastBillingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FastBillings.
     */
    cursor?: FastBillingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillings 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` FastBillings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillings.
     */
    distinct?: FastBillingScalarFieldEnum | FastBillingScalarFieldEnum[]
  }

  /**
   * FastBilling findFirstOrThrow
   */
  export type FastBillingFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter, which FastBilling to fetch.
     */
    where?: FastBillingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillings to fetch.
     */
    orderBy?: FastBillingOrderByWithRelationInput | FastBillingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FastBillings.
     */
    cursor?: FastBillingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillings 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` FastBillings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillings.
     */
    distinct?: FastBillingScalarFieldEnum | FastBillingScalarFieldEnum[]
  }

  /**
   * FastBilling findMany
   */
  export type FastBillingFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter, which FastBillings to fetch.
     */
    where?: FastBillingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillings to fetch.
     */
    orderBy?: FastBillingOrderByWithRelationInput | FastBillingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing FastBillings.
     */
    cursor?: FastBillingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillings 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` FastBillings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillings.
     */
    distinct?: FastBillingScalarFieldEnum | FastBillingScalarFieldEnum[]
  }

  /**
   * FastBilling create
   */
  export type FastBillingCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * The data needed to create a FastBilling.
     */
    data: XOR<FastBillingCreateInput, FastBillingUncheckedCreateInput>
  }

  /**
   * FastBilling createMany
   */
  export type FastBillingCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many FastBillings.
     */
    data: FastBillingCreateManyInput | FastBillingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * FastBilling update
   */
  export type FastBillingUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * The data needed to update a FastBilling.
     */
    data: XOR<FastBillingUpdateInput, FastBillingUncheckedUpdateInput>
    /**
     * Choose, which FastBilling to update.
     */
    where: FastBillingWhereUniqueInput
  }

  /**
   * FastBilling updateMany
   */
  export type FastBillingUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update FastBillings.
     */
    data: XOR<FastBillingUpdateManyMutationInput, FastBillingUncheckedUpdateManyInput>
    /**
     * Filter which FastBillings to update
     */
    where?: FastBillingWhereInput
    /**
     * Limit how many FastBillings to update.
     */
    limit?: number
  }

  /**
   * FastBilling upsert
   */
  export type FastBillingUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * The filter to search for the FastBilling to update in case it exists.
     */
    where: FastBillingWhereUniqueInput
    /**
     * In case the FastBilling found by the `where` argument doesn't exist, create a new FastBilling with this data.
     */
    create: XOR<FastBillingCreateInput, FastBillingUncheckedCreateInput>
    /**
     * In case the FastBilling was found with the provided `where` argument, update it with this data.
     */
    update: XOR<FastBillingUpdateInput, FastBillingUncheckedUpdateInput>
  }

  /**
   * FastBilling delete
   */
  export type FastBillingDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
    /**
     * Filter which FastBilling to delete.
     */
    where: FastBillingWhereUniqueInput
  }

  /**
   * FastBilling deleteMany
   */
  export type FastBillingDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FastBillings to delete
     */
    where?: FastBillingWhereInput
    /**
     * Limit how many FastBillings to delete.
     */
    limit?: number
  }

  /**
   * FastBilling.items
   */
  export type FastBilling$itemsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    where?: FastBillingItemWhereInput
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    cursor?: FastBillingItemWhereUniqueInput
    take?: number
    skip?: number
    distinct?: FastBillingItemScalarFieldEnum | FastBillingItemScalarFieldEnum[]
  }

  /**
   * FastBilling.createdByUser
   */
  export type FastBilling$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * FastBilling without action
   */
  export type FastBillingDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBilling
     */
    select?: FastBillingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBilling
     */
    omit?: FastBillingOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingInclude<ExtArgs> | null
  }


  /**
   * Model FastBillingItem
   */

  export type AggregateFastBillingItem = {
    _count: FastBillingItemCountAggregateOutputType | null
    _avg: FastBillingItemAvgAggregateOutputType | null
    _sum: FastBillingItemSumAggregateOutputType | null
    _min: FastBillingItemMinAggregateOutputType | null
    _max: FastBillingItemMaxAggregateOutputType | null
  }

  export type FastBillingItemAvgAggregateOutputType = {
    id: number | null
    fastBillingId: number | null
    quantity: Decimal | null
    numberOfBoxes: Decimal | null
    numberOfThaar: Decimal | null
    numberOfPieces: Decimal | null
    ratePerUnit: Decimal | null
    extraCharges: Decimal | null
    totalAmount: Decimal | null
    createdBy: number | null
  }

  export type FastBillingItemSumAggregateOutputType = {
    id: bigint | null
    fastBillingId: bigint | null
    quantity: Decimal | null
    numberOfBoxes: Decimal | null
    numberOfThaar: Decimal | null
    numberOfPieces: Decimal | null
    ratePerUnit: Decimal | null
    extraCharges: Decimal | null
    totalAmount: Decimal | null
    createdBy: bigint | null
  }

  export type FastBillingItemMinAggregateOutputType = {
    id: bigint | null
    fastBillingId: bigint | null
    vegetableName: string | null
    quantity: Decimal | null
    unit: string | null
    rateType: string | null
    numberOfBoxes: Decimal | null
    numberOfThaar: Decimal | null
    numberOfPieces: Decimal | null
    ratePerUnit: Decimal | null
    extraCharges: Decimal | null
    totalAmount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type FastBillingItemMaxAggregateOutputType = {
    id: bigint | null
    fastBillingId: bigint | null
    vegetableName: string | null
    quantity: Decimal | null
    unit: string | null
    rateType: string | null
    numberOfBoxes: Decimal | null
    numberOfThaar: Decimal | null
    numberOfPieces: Decimal | null
    ratePerUnit: Decimal | null
    extraCharges: Decimal | null
    totalAmount: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type FastBillingItemCountAggregateOutputType = {
    id: number
    fastBillingId: number
    vegetableName: number
    quantity: number
    unit: number
    rateType: number
    numberOfBoxes: number
    numberOfThaar: number
    numberOfPieces: number
    ratePerUnit: number
    extraCharges: number
    totalAmount: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type FastBillingItemAvgAggregateInputType = {
    id?: true
    fastBillingId?: true
    quantity?: true
    numberOfBoxes?: true
    numberOfThaar?: true
    numberOfPieces?: true
    ratePerUnit?: true
    extraCharges?: true
    totalAmount?: true
    createdBy?: true
  }

  export type FastBillingItemSumAggregateInputType = {
    id?: true
    fastBillingId?: true
    quantity?: true
    numberOfBoxes?: true
    numberOfThaar?: true
    numberOfPieces?: true
    ratePerUnit?: true
    extraCharges?: true
    totalAmount?: true
    createdBy?: true
  }

  export type FastBillingItemMinAggregateInputType = {
    id?: true
    fastBillingId?: true
    vegetableName?: true
    quantity?: true
    unit?: true
    rateType?: true
    numberOfBoxes?: true
    numberOfThaar?: true
    numberOfPieces?: true
    ratePerUnit?: true
    extraCharges?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type FastBillingItemMaxAggregateInputType = {
    id?: true
    fastBillingId?: true
    vegetableName?: true
    quantity?: true
    unit?: true
    rateType?: true
    numberOfBoxes?: true
    numberOfThaar?: true
    numberOfPieces?: true
    ratePerUnit?: true
    extraCharges?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type FastBillingItemCountAggregateInputType = {
    id?: true
    fastBillingId?: true
    vegetableName?: true
    quantity?: true
    unit?: true
    rateType?: true
    numberOfBoxes?: true
    numberOfThaar?: true
    numberOfPieces?: true
    ratePerUnit?: true
    extraCharges?: true
    totalAmount?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type FastBillingItemAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FastBillingItem to aggregate.
     */
    where?: FastBillingItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillingItems to fetch.
     */
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: FastBillingItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillingItems 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` FastBillingItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned FastBillingItems
    **/
    _count?: true | FastBillingItemCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: FastBillingItemAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: FastBillingItemSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: FastBillingItemMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: FastBillingItemMaxAggregateInputType
  }

  export type GetFastBillingItemAggregateType<T extends FastBillingItemAggregateArgs> = {
        [P in keyof T & keyof AggregateFastBillingItem]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateFastBillingItem[P]>
      : GetScalarType<T[P], AggregateFastBillingItem[P]>
  }




  export type FastBillingItemGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FastBillingItemWhereInput
    orderBy?: FastBillingItemOrderByWithAggregationInput | FastBillingItemOrderByWithAggregationInput[]
    by: FastBillingItemScalarFieldEnum[] | FastBillingItemScalarFieldEnum
    having?: FastBillingItemScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: FastBillingItemCountAggregateInputType | true
    _avg?: FastBillingItemAvgAggregateInputType
    _sum?: FastBillingItemSumAggregateInputType
    _min?: FastBillingItemMinAggregateInputType
    _max?: FastBillingItemMaxAggregateInputType
  }

  export type FastBillingItemGroupByOutputType = {
    id: bigint
    fastBillingId: bigint
    vegetableName: string
    quantity: Decimal | null
    unit: string
    rateType: string | null
    numberOfBoxes: Decimal | null
    numberOfThaar: Decimal | null
    numberOfPieces: Decimal | null
    ratePerUnit: Decimal
    extraCharges: Decimal | null
    totalAmount: Decimal
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: FastBillingItemCountAggregateOutputType | null
    _avg: FastBillingItemAvgAggregateOutputType | null
    _sum: FastBillingItemSumAggregateOutputType | null
    _min: FastBillingItemMinAggregateOutputType | null
    _max: FastBillingItemMaxAggregateOutputType | null
  }

  type GetFastBillingItemGroupByPayload<T extends FastBillingItemGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<FastBillingItemGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof FastBillingItemGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], FastBillingItemGroupByOutputType[P]>
            : GetScalarType<T[P], FastBillingItemGroupByOutputType[P]>
        }
      >
    >


  export type FastBillingItemSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    fastBillingId?: boolean
    vegetableName?: boolean
    quantity?: boolean
    unit?: boolean
    rateType?: boolean
    numberOfBoxes?: boolean
    numberOfThaar?: boolean
    numberOfPieces?: boolean
    ratePerUnit?: boolean
    extraCharges?: boolean
    totalAmount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    fastBilling?: boolean | FastBillingDefaultArgs<ExtArgs>
    createdByUser?: boolean | FastBillingItem$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["fastBillingItem"]>



  export type FastBillingItemSelectScalar = {
    id?: boolean
    fastBillingId?: boolean
    vegetableName?: boolean
    quantity?: boolean
    unit?: boolean
    rateType?: boolean
    numberOfBoxes?: boolean
    numberOfThaar?: boolean
    numberOfPieces?: boolean
    ratePerUnit?: boolean
    extraCharges?: boolean
    totalAmount?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type FastBillingItemOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "fastBillingId" | "vegetableName" | "quantity" | "unit" | "rateType" | "numberOfBoxes" | "numberOfThaar" | "numberOfPieces" | "ratePerUnit" | "extraCharges" | "totalAmount" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["fastBillingItem"]>
  export type FastBillingItemInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    fastBilling?: boolean | FastBillingDefaultArgs<ExtArgs>
    createdByUser?: boolean | FastBillingItem$createdByUserArgs<ExtArgs>
  }

  export type $FastBillingItemPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "FastBillingItem"
    objects: {
      fastBilling: Prisma.$FastBillingPayload<ExtArgs>
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      fastBillingId: bigint
      vegetableName: string
      quantity: Prisma.Decimal | null
      unit: string
      rateType: string | null
      numberOfBoxes: Prisma.Decimal | null
      numberOfThaar: Prisma.Decimal | null
      numberOfPieces: Prisma.Decimal | null
      ratePerUnit: Prisma.Decimal
      extraCharges: Prisma.Decimal | null
      totalAmount: Prisma.Decimal
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["fastBillingItem"]>
    composites: {}
  }

  type FastBillingItemGetPayload<S extends boolean | null | undefined | FastBillingItemDefaultArgs> = $Result.GetResult<Prisma.$FastBillingItemPayload, S>

  type FastBillingItemCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<FastBillingItemFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: FastBillingItemCountAggregateInputType | true
    }

  export interface FastBillingItemDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['FastBillingItem'], meta: { name: 'FastBillingItem' } }
    /**
     * Find zero or one FastBillingItem that matches the filter.
     * @param {FastBillingItemFindUniqueArgs} args - Arguments to find a FastBillingItem
     * @example
     * // Get one FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends FastBillingItemFindUniqueArgs>(args: SelectSubset<T, FastBillingItemFindUniqueArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one FastBillingItem that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {FastBillingItemFindUniqueOrThrowArgs} args - Arguments to find a FastBillingItem
     * @example
     * // Get one FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends FastBillingItemFindUniqueOrThrowArgs>(args: SelectSubset<T, FastBillingItemFindUniqueOrThrowArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FastBillingItem 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 {FastBillingItemFindFirstArgs} args - Arguments to find a FastBillingItem
     * @example
     * // Get one FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends FastBillingItemFindFirstArgs>(args?: SelectSubset<T, FastBillingItemFindFirstArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FastBillingItem 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 {FastBillingItemFindFirstOrThrowArgs} args - Arguments to find a FastBillingItem
     * @example
     * // Get one FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends FastBillingItemFindFirstOrThrowArgs>(args?: SelectSubset<T, FastBillingItemFindFirstOrThrowArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more FastBillingItems 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 {FastBillingItemFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all FastBillingItems
     * const fastBillingItems = await prisma.fastBillingItem.findMany()
     * 
     * // Get first 10 FastBillingItems
     * const fastBillingItems = await prisma.fastBillingItem.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const fastBillingItemWithIdOnly = await prisma.fastBillingItem.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends FastBillingItemFindManyArgs>(args?: SelectSubset<T, FastBillingItemFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a FastBillingItem.
     * @param {FastBillingItemCreateArgs} args - Arguments to create a FastBillingItem.
     * @example
     * // Create one FastBillingItem
     * const FastBillingItem = await prisma.fastBillingItem.create({
     *   data: {
     *     // ... data to create a FastBillingItem
     *   }
     * })
     * 
     */
    create<T extends FastBillingItemCreateArgs>(args: SelectSubset<T, FastBillingItemCreateArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many FastBillingItems.
     * @param {FastBillingItemCreateManyArgs} args - Arguments to create many FastBillingItems.
     * @example
     * // Create many FastBillingItems
     * const fastBillingItem = await prisma.fastBillingItem.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends FastBillingItemCreateManyArgs>(args?: SelectSubset<T, FastBillingItemCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a FastBillingItem.
     * @param {FastBillingItemDeleteArgs} args - Arguments to delete one FastBillingItem.
     * @example
     * // Delete one FastBillingItem
     * const FastBillingItem = await prisma.fastBillingItem.delete({
     *   where: {
     *     // ... filter to delete one FastBillingItem
     *   }
     * })
     * 
     */
    delete<T extends FastBillingItemDeleteArgs>(args: SelectSubset<T, FastBillingItemDeleteArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one FastBillingItem.
     * @param {FastBillingItemUpdateArgs} args - Arguments to update one FastBillingItem.
     * @example
     * // Update one FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends FastBillingItemUpdateArgs>(args: SelectSubset<T, FastBillingItemUpdateArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more FastBillingItems.
     * @param {FastBillingItemDeleteManyArgs} args - Arguments to filter FastBillingItems to delete.
     * @example
     * // Delete a few FastBillingItems
     * const { count } = await prisma.fastBillingItem.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends FastBillingItemDeleteManyArgs>(args?: SelectSubset<T, FastBillingItemDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more FastBillingItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingItemUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many FastBillingItems
     * const fastBillingItem = await prisma.fastBillingItem.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends FastBillingItemUpdateManyArgs>(args: SelectSubset<T, FastBillingItemUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one FastBillingItem.
     * @param {FastBillingItemUpsertArgs} args - Arguments to update or create a FastBillingItem.
     * @example
     * // Update or create a FastBillingItem
     * const fastBillingItem = await prisma.fastBillingItem.upsert({
     *   create: {
     *     // ... data to create a FastBillingItem
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the FastBillingItem we want to update
     *   }
     * })
     */
    upsert<T extends FastBillingItemUpsertArgs>(args: SelectSubset<T, FastBillingItemUpsertArgs<ExtArgs>>): Prisma__FastBillingItemClient<$Result.GetResult<Prisma.$FastBillingItemPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of FastBillingItems.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingItemCountArgs} args - Arguments to filter FastBillingItems to count.
     * @example
     * // Count the number of FastBillingItems
     * const count = await prisma.fastBillingItem.count({
     *   where: {
     *     // ... the filter for the FastBillingItems we want to count
     *   }
     * })
    **/
    count<T extends FastBillingItemCountArgs>(
      args?: Subset<T, FastBillingItemCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], FastBillingItemCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a FastBillingItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingItemAggregateArgs} 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 FastBillingItemAggregateArgs>(args: Subset<T, FastBillingItemAggregateArgs>): Prisma.PrismaPromise<GetFastBillingItemAggregateType<T>>

    /**
     * Group by FastBillingItem.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FastBillingItemGroupByArgs} 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 FastBillingItemGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: FastBillingItemGroupByArgs['orderBy'] }
        : { orderBy?: FastBillingItemGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, FastBillingItemGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetFastBillingItemGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the FastBillingItem model
   */
  readonly fields: FastBillingItemFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for FastBillingItem.
   * 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__FastBillingItemClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    fastBilling<T extends FastBillingDefaultArgs<ExtArgs> = {}>(args?: Subset<T, FastBillingDefaultArgs<ExtArgs>>): Prisma__FastBillingClient<$Result.GetResult<Prisma.$FastBillingPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends FastBillingItem$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, FastBillingItem$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the FastBillingItem model
   */
  interface FastBillingItemFieldRefs {
    readonly id: FieldRef<"FastBillingItem", 'BigInt'>
    readonly fastBillingId: FieldRef<"FastBillingItem", 'BigInt'>
    readonly vegetableName: FieldRef<"FastBillingItem", 'String'>
    readonly quantity: FieldRef<"FastBillingItem", 'Decimal'>
    readonly unit: FieldRef<"FastBillingItem", 'String'>
    readonly rateType: FieldRef<"FastBillingItem", 'String'>
    readonly numberOfBoxes: FieldRef<"FastBillingItem", 'Decimal'>
    readonly numberOfThaar: FieldRef<"FastBillingItem", 'Decimal'>
    readonly numberOfPieces: FieldRef<"FastBillingItem", 'Decimal'>
    readonly ratePerUnit: FieldRef<"FastBillingItem", 'Decimal'>
    readonly extraCharges: FieldRef<"FastBillingItem", 'Decimal'>
    readonly totalAmount: FieldRef<"FastBillingItem", 'Decimal'>
    readonly createdAt: FieldRef<"FastBillingItem", 'DateTime'>
    readonly updatedAt: FieldRef<"FastBillingItem", 'DateTime'>
    readonly createdBy: FieldRef<"FastBillingItem", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * FastBillingItem findUnique
   */
  export type FastBillingItemFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter, which FastBillingItem to fetch.
     */
    where: FastBillingItemWhereUniqueInput
  }

  /**
   * FastBillingItem findUniqueOrThrow
   */
  export type FastBillingItemFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter, which FastBillingItem to fetch.
     */
    where: FastBillingItemWhereUniqueInput
  }

  /**
   * FastBillingItem findFirst
   */
  export type FastBillingItemFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter, which FastBillingItem to fetch.
     */
    where?: FastBillingItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillingItems to fetch.
     */
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FastBillingItems.
     */
    cursor?: FastBillingItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillingItems 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` FastBillingItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillingItems.
     */
    distinct?: FastBillingItemScalarFieldEnum | FastBillingItemScalarFieldEnum[]
  }

  /**
   * FastBillingItem findFirstOrThrow
   */
  export type FastBillingItemFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter, which FastBillingItem to fetch.
     */
    where?: FastBillingItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillingItems to fetch.
     */
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FastBillingItems.
     */
    cursor?: FastBillingItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillingItems 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` FastBillingItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillingItems.
     */
    distinct?: FastBillingItemScalarFieldEnum | FastBillingItemScalarFieldEnum[]
  }

  /**
   * FastBillingItem findMany
   */
  export type FastBillingItemFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter, which FastBillingItems to fetch.
     */
    where?: FastBillingItemWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FastBillingItems to fetch.
     */
    orderBy?: FastBillingItemOrderByWithRelationInput | FastBillingItemOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing FastBillingItems.
     */
    cursor?: FastBillingItemWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FastBillingItems 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` FastBillingItems.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FastBillingItems.
     */
    distinct?: FastBillingItemScalarFieldEnum | FastBillingItemScalarFieldEnum[]
  }

  /**
   * FastBillingItem create
   */
  export type FastBillingItemCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * The data needed to create a FastBillingItem.
     */
    data: XOR<FastBillingItemCreateInput, FastBillingItemUncheckedCreateInput>
  }

  /**
   * FastBillingItem createMany
   */
  export type FastBillingItemCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many FastBillingItems.
     */
    data: FastBillingItemCreateManyInput | FastBillingItemCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * FastBillingItem update
   */
  export type FastBillingItemUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * The data needed to update a FastBillingItem.
     */
    data: XOR<FastBillingItemUpdateInput, FastBillingItemUncheckedUpdateInput>
    /**
     * Choose, which FastBillingItem to update.
     */
    where: FastBillingItemWhereUniqueInput
  }

  /**
   * FastBillingItem updateMany
   */
  export type FastBillingItemUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update FastBillingItems.
     */
    data: XOR<FastBillingItemUpdateManyMutationInput, FastBillingItemUncheckedUpdateManyInput>
    /**
     * Filter which FastBillingItems to update
     */
    where?: FastBillingItemWhereInput
    /**
     * Limit how many FastBillingItems to update.
     */
    limit?: number
  }

  /**
   * FastBillingItem upsert
   */
  export type FastBillingItemUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * The filter to search for the FastBillingItem to update in case it exists.
     */
    where: FastBillingItemWhereUniqueInput
    /**
     * In case the FastBillingItem found by the `where` argument doesn't exist, create a new FastBillingItem with this data.
     */
    create: XOR<FastBillingItemCreateInput, FastBillingItemUncheckedCreateInput>
    /**
     * In case the FastBillingItem was found with the provided `where` argument, update it with this data.
     */
    update: XOR<FastBillingItemUpdateInput, FastBillingItemUncheckedUpdateInput>
  }

  /**
   * FastBillingItem delete
   */
  export type FastBillingItemDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
    /**
     * Filter which FastBillingItem to delete.
     */
    where: FastBillingItemWhereUniqueInput
  }

  /**
   * FastBillingItem deleteMany
   */
  export type FastBillingItemDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FastBillingItems to delete
     */
    where?: FastBillingItemWhereInput
    /**
     * Limit how many FastBillingItems to delete.
     */
    limit?: number
  }

  /**
   * FastBillingItem.createdByUser
   */
  export type FastBillingItem$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * FastBillingItem without action
   */
  export type FastBillingItemDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FastBillingItem
     */
    select?: FastBillingItemSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FastBillingItem
     */
    omit?: FastBillingItemOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: FastBillingItemInclude<ExtArgs> | null
  }


  /**
   * Model CashBankSetting
   */

  export type AggregateCashBankSetting = {
    _count: CashBankSettingCountAggregateOutputType | null
    _avg: CashBankSettingAvgAggregateOutputType | null
    _sum: CashBankSettingSumAggregateOutputType | null
    _min: CashBankSettingMinAggregateOutputType | null
    _max: CashBankSettingMaxAggregateOutputType | null
  }

  export type CashBankSettingAvgAggregateOutputType = {
    id: number | null
    openingCashInHand: Decimal | null
    openingCashInBank: Decimal | null
  }

  export type CashBankSettingSumAggregateOutputType = {
    id: bigint | null
    openingCashInHand: Decimal | null
    openingCashInBank: Decimal | null
  }

  export type CashBankSettingMinAggregateOutputType = {
    id: bigint | null
    openingCashInHand: Decimal | null
    openingCashInBank: Decimal | null
    openingDate: Date | null
    remarks: string | null
    isLocked: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type CashBankSettingMaxAggregateOutputType = {
    id: bigint | null
    openingCashInHand: Decimal | null
    openingCashInBank: Decimal | null
    openingDate: Date | null
    remarks: string | null
    isLocked: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type CashBankSettingCountAggregateOutputType = {
    id: number
    openingCashInHand: number
    openingCashInBank: number
    openingDate: number
    remarks: number
    isLocked: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type CashBankSettingAvgAggregateInputType = {
    id?: true
    openingCashInHand?: true
    openingCashInBank?: true
  }

  export type CashBankSettingSumAggregateInputType = {
    id?: true
    openingCashInHand?: true
    openingCashInBank?: true
  }

  export type CashBankSettingMinAggregateInputType = {
    id?: true
    openingCashInHand?: true
    openingCashInBank?: true
    openingDate?: true
    remarks?: true
    isLocked?: true
    createdAt?: true
    updatedAt?: true
  }

  export type CashBankSettingMaxAggregateInputType = {
    id?: true
    openingCashInHand?: true
    openingCashInBank?: true
    openingDate?: true
    remarks?: true
    isLocked?: true
    createdAt?: true
    updatedAt?: true
  }

  export type CashBankSettingCountAggregateInputType = {
    id?: true
    openingCashInHand?: true
    openingCashInBank?: true
    openingDate?: true
    remarks?: true
    isLocked?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type CashBankSettingAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CashBankSetting to aggregate.
     */
    where?: CashBankSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankSettings to fetch.
     */
    orderBy?: CashBankSettingOrderByWithRelationInput | CashBankSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: CashBankSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankSettings 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` CashBankSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned CashBankSettings
    **/
    _count?: true | CashBankSettingCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: CashBankSettingAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: CashBankSettingSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: CashBankSettingMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: CashBankSettingMaxAggregateInputType
  }

  export type GetCashBankSettingAggregateType<T extends CashBankSettingAggregateArgs> = {
        [P in keyof T & keyof AggregateCashBankSetting]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateCashBankSetting[P]>
      : GetScalarType<T[P], AggregateCashBankSetting[P]>
  }




  export type CashBankSettingGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CashBankSettingWhereInput
    orderBy?: CashBankSettingOrderByWithAggregationInput | CashBankSettingOrderByWithAggregationInput[]
    by: CashBankSettingScalarFieldEnum[] | CashBankSettingScalarFieldEnum
    having?: CashBankSettingScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: CashBankSettingCountAggregateInputType | true
    _avg?: CashBankSettingAvgAggregateInputType
    _sum?: CashBankSettingSumAggregateInputType
    _min?: CashBankSettingMinAggregateInputType
    _max?: CashBankSettingMaxAggregateInputType
  }

  export type CashBankSettingGroupByOutputType = {
    id: bigint
    openingCashInHand: Decimal
    openingCashInBank: Decimal
    openingDate: Date
    remarks: string | null
    isLocked: boolean
    createdAt: Date
    updatedAt: Date
    _count: CashBankSettingCountAggregateOutputType | null
    _avg: CashBankSettingAvgAggregateOutputType | null
    _sum: CashBankSettingSumAggregateOutputType | null
    _min: CashBankSettingMinAggregateOutputType | null
    _max: CashBankSettingMaxAggregateOutputType | null
  }

  type GetCashBankSettingGroupByPayload<T extends CashBankSettingGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<CashBankSettingGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof CashBankSettingGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], CashBankSettingGroupByOutputType[P]>
            : GetScalarType<T[P], CashBankSettingGroupByOutputType[P]>
        }
      >
    >


  export type CashBankSettingSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    openingCashInHand?: boolean
    openingCashInBank?: boolean
    openingDate?: boolean
    remarks?: boolean
    isLocked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["cashBankSetting"]>



  export type CashBankSettingSelectScalar = {
    id?: boolean
    openingCashInHand?: boolean
    openingCashInBank?: boolean
    openingDate?: boolean
    remarks?: boolean
    isLocked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type CashBankSettingOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "openingCashInHand" | "openingCashInBank" | "openingDate" | "remarks" | "isLocked" | "createdAt" | "updatedAt", ExtArgs["result"]["cashBankSetting"]>

  export type $CashBankSettingPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "CashBankSetting"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      openingCashInHand: Prisma.Decimal
      openingCashInBank: Prisma.Decimal
      openingDate: Date
      remarks: string | null
      isLocked: boolean
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["cashBankSetting"]>
    composites: {}
  }

  type CashBankSettingGetPayload<S extends boolean | null | undefined | CashBankSettingDefaultArgs> = $Result.GetResult<Prisma.$CashBankSettingPayload, S>

  type CashBankSettingCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<CashBankSettingFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: CashBankSettingCountAggregateInputType | true
    }

  export interface CashBankSettingDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['CashBankSetting'], meta: { name: 'CashBankSetting' } }
    /**
     * Find zero or one CashBankSetting that matches the filter.
     * @param {CashBankSettingFindUniqueArgs} args - Arguments to find a CashBankSetting
     * @example
     * // Get one CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends CashBankSettingFindUniqueArgs>(args: SelectSubset<T, CashBankSettingFindUniqueArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one CashBankSetting that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {CashBankSettingFindUniqueOrThrowArgs} args - Arguments to find a CashBankSetting
     * @example
     * // Get one CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends CashBankSettingFindUniqueOrThrowArgs>(args: SelectSubset<T, CashBankSettingFindUniqueOrThrowArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CashBankSetting 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 {CashBankSettingFindFirstArgs} args - Arguments to find a CashBankSetting
     * @example
     * // Get one CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends CashBankSettingFindFirstArgs>(args?: SelectSubset<T, CashBankSettingFindFirstArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CashBankSetting 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 {CashBankSettingFindFirstOrThrowArgs} args - Arguments to find a CashBankSetting
     * @example
     * // Get one CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends CashBankSettingFindFirstOrThrowArgs>(args?: SelectSubset<T, CashBankSettingFindFirstOrThrowArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more CashBankSettings 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 {CashBankSettingFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all CashBankSettings
     * const cashBankSettings = await prisma.cashBankSetting.findMany()
     * 
     * // Get first 10 CashBankSettings
     * const cashBankSettings = await prisma.cashBankSetting.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const cashBankSettingWithIdOnly = await prisma.cashBankSetting.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends CashBankSettingFindManyArgs>(args?: SelectSubset<T, CashBankSettingFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a CashBankSetting.
     * @param {CashBankSettingCreateArgs} args - Arguments to create a CashBankSetting.
     * @example
     * // Create one CashBankSetting
     * const CashBankSetting = await prisma.cashBankSetting.create({
     *   data: {
     *     // ... data to create a CashBankSetting
     *   }
     * })
     * 
     */
    create<T extends CashBankSettingCreateArgs>(args: SelectSubset<T, CashBankSettingCreateArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many CashBankSettings.
     * @param {CashBankSettingCreateManyArgs} args - Arguments to create many CashBankSettings.
     * @example
     * // Create many CashBankSettings
     * const cashBankSetting = await prisma.cashBankSetting.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends CashBankSettingCreateManyArgs>(args?: SelectSubset<T, CashBankSettingCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a CashBankSetting.
     * @param {CashBankSettingDeleteArgs} args - Arguments to delete one CashBankSetting.
     * @example
     * // Delete one CashBankSetting
     * const CashBankSetting = await prisma.cashBankSetting.delete({
     *   where: {
     *     // ... filter to delete one CashBankSetting
     *   }
     * })
     * 
     */
    delete<T extends CashBankSettingDeleteArgs>(args: SelectSubset<T, CashBankSettingDeleteArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one CashBankSetting.
     * @param {CashBankSettingUpdateArgs} args - Arguments to update one CashBankSetting.
     * @example
     * // Update one CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends CashBankSettingUpdateArgs>(args: SelectSubset<T, CashBankSettingUpdateArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more CashBankSettings.
     * @param {CashBankSettingDeleteManyArgs} args - Arguments to filter CashBankSettings to delete.
     * @example
     * // Delete a few CashBankSettings
     * const { count } = await prisma.cashBankSetting.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends CashBankSettingDeleteManyArgs>(args?: SelectSubset<T, CashBankSettingDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more CashBankSettings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankSettingUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many CashBankSettings
     * const cashBankSetting = await prisma.cashBankSetting.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends CashBankSettingUpdateManyArgs>(args: SelectSubset<T, CashBankSettingUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one CashBankSetting.
     * @param {CashBankSettingUpsertArgs} args - Arguments to update or create a CashBankSetting.
     * @example
     * // Update or create a CashBankSetting
     * const cashBankSetting = await prisma.cashBankSetting.upsert({
     *   create: {
     *     // ... data to create a CashBankSetting
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the CashBankSetting we want to update
     *   }
     * })
     */
    upsert<T extends CashBankSettingUpsertArgs>(args: SelectSubset<T, CashBankSettingUpsertArgs<ExtArgs>>): Prisma__CashBankSettingClient<$Result.GetResult<Prisma.$CashBankSettingPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of CashBankSettings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankSettingCountArgs} args - Arguments to filter CashBankSettings to count.
     * @example
     * // Count the number of CashBankSettings
     * const count = await prisma.cashBankSetting.count({
     *   where: {
     *     // ... the filter for the CashBankSettings we want to count
     *   }
     * })
    **/
    count<T extends CashBankSettingCountArgs>(
      args?: Subset<T, CashBankSettingCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], CashBankSettingCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a CashBankSetting.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankSettingAggregateArgs} 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 CashBankSettingAggregateArgs>(args: Subset<T, CashBankSettingAggregateArgs>): Prisma.PrismaPromise<GetCashBankSettingAggregateType<T>>

    /**
     * Group by CashBankSetting.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankSettingGroupByArgs} 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 CashBankSettingGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: CashBankSettingGroupByArgs['orderBy'] }
        : { orderBy?: CashBankSettingGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, CashBankSettingGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCashBankSettingGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the CashBankSetting model
   */
  readonly fields: CashBankSettingFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for CashBankSetting.
   * 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__CashBankSettingClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the CashBankSetting model
   */
  interface CashBankSettingFieldRefs {
    readonly id: FieldRef<"CashBankSetting", 'BigInt'>
    readonly openingCashInHand: FieldRef<"CashBankSetting", 'Decimal'>
    readonly openingCashInBank: FieldRef<"CashBankSetting", 'Decimal'>
    readonly openingDate: FieldRef<"CashBankSetting", 'DateTime'>
    readonly remarks: FieldRef<"CashBankSetting", 'String'>
    readonly isLocked: FieldRef<"CashBankSetting", 'Boolean'>
    readonly createdAt: FieldRef<"CashBankSetting", 'DateTime'>
    readonly updatedAt: FieldRef<"CashBankSetting", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * CashBankSetting findUnique
   */
  export type CashBankSettingFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter, which CashBankSetting to fetch.
     */
    where: CashBankSettingWhereUniqueInput
  }

  /**
   * CashBankSetting findUniqueOrThrow
   */
  export type CashBankSettingFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter, which CashBankSetting to fetch.
     */
    where: CashBankSettingWhereUniqueInput
  }

  /**
   * CashBankSetting findFirst
   */
  export type CashBankSettingFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter, which CashBankSetting to fetch.
     */
    where?: CashBankSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankSettings to fetch.
     */
    orderBy?: CashBankSettingOrderByWithRelationInput | CashBankSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CashBankSettings.
     */
    cursor?: CashBankSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankSettings 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` CashBankSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankSettings.
     */
    distinct?: CashBankSettingScalarFieldEnum | CashBankSettingScalarFieldEnum[]
  }

  /**
   * CashBankSetting findFirstOrThrow
   */
  export type CashBankSettingFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter, which CashBankSetting to fetch.
     */
    where?: CashBankSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankSettings to fetch.
     */
    orderBy?: CashBankSettingOrderByWithRelationInput | CashBankSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CashBankSettings.
     */
    cursor?: CashBankSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankSettings 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` CashBankSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankSettings.
     */
    distinct?: CashBankSettingScalarFieldEnum | CashBankSettingScalarFieldEnum[]
  }

  /**
   * CashBankSetting findMany
   */
  export type CashBankSettingFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter, which CashBankSettings to fetch.
     */
    where?: CashBankSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankSettings to fetch.
     */
    orderBy?: CashBankSettingOrderByWithRelationInput | CashBankSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing CashBankSettings.
     */
    cursor?: CashBankSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankSettings 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` CashBankSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankSettings.
     */
    distinct?: CashBankSettingScalarFieldEnum | CashBankSettingScalarFieldEnum[]
  }

  /**
   * CashBankSetting create
   */
  export type CashBankSettingCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * The data needed to create a CashBankSetting.
     */
    data: XOR<CashBankSettingCreateInput, CashBankSettingUncheckedCreateInput>
  }

  /**
   * CashBankSetting createMany
   */
  export type CashBankSettingCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many CashBankSettings.
     */
    data: CashBankSettingCreateManyInput | CashBankSettingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * CashBankSetting update
   */
  export type CashBankSettingUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * The data needed to update a CashBankSetting.
     */
    data: XOR<CashBankSettingUpdateInput, CashBankSettingUncheckedUpdateInput>
    /**
     * Choose, which CashBankSetting to update.
     */
    where: CashBankSettingWhereUniqueInput
  }

  /**
   * CashBankSetting updateMany
   */
  export type CashBankSettingUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update CashBankSettings.
     */
    data: XOR<CashBankSettingUpdateManyMutationInput, CashBankSettingUncheckedUpdateManyInput>
    /**
     * Filter which CashBankSettings to update
     */
    where?: CashBankSettingWhereInput
    /**
     * Limit how many CashBankSettings to update.
     */
    limit?: number
  }

  /**
   * CashBankSetting upsert
   */
  export type CashBankSettingUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * The filter to search for the CashBankSetting to update in case it exists.
     */
    where: CashBankSettingWhereUniqueInput
    /**
     * In case the CashBankSetting found by the `where` argument doesn't exist, create a new CashBankSetting with this data.
     */
    create: XOR<CashBankSettingCreateInput, CashBankSettingUncheckedCreateInput>
    /**
     * In case the CashBankSetting was found with the provided `where` argument, update it with this data.
     */
    update: XOR<CashBankSettingUpdateInput, CashBankSettingUncheckedUpdateInput>
  }

  /**
   * CashBankSetting delete
   */
  export type CashBankSettingDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
    /**
     * Filter which CashBankSetting to delete.
     */
    where: CashBankSettingWhereUniqueInput
  }

  /**
   * CashBankSetting deleteMany
   */
  export type CashBankSettingDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CashBankSettings to delete
     */
    where?: CashBankSettingWhereInput
    /**
     * Limit how many CashBankSettings to delete.
     */
    limit?: number
  }

  /**
   * CashBankSetting without action
   */
  export type CashBankSettingDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankSetting
     */
    select?: CashBankSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankSetting
     */
    omit?: CashBankSettingOmit<ExtArgs> | null
  }


  /**
   * Model CashBankTransfer
   */

  export type AggregateCashBankTransfer = {
    _count: CashBankTransferCountAggregateOutputType | null
    _avg: CashBankTransferAvgAggregateOutputType | null
    _sum: CashBankTransferSumAggregateOutputType | null
    _min: CashBankTransferMinAggregateOutputType | null
    _max: CashBankTransferMaxAggregateOutputType | null
  }

  export type CashBankTransferAvgAggregateOutputType = {
    id: number | null
    amount: Decimal | null
    deletedBy: number | null
    createdBy: number | null
  }

  export type CashBankTransferSumAggregateOutputType = {
    id: bigint | null
    amount: Decimal | null
    deletedBy: bigint | null
    createdBy: bigint | null
  }

  export type CashBankTransferMinAggregateOutputType = {
    id: bigint | null
    transferDate: Date | null
    amount: Decimal | null
    fromAccount: string | null
    toAccount: string | null
    referenceNo: string | null
    remarks: string | null
    deletedAt: Date | null
    deletedBy: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type CashBankTransferMaxAggregateOutputType = {
    id: bigint | null
    transferDate: Date | null
    amount: Decimal | null
    fromAccount: string | null
    toAccount: string | null
    referenceNo: string | null
    remarks: string | null
    deletedAt: Date | null
    deletedBy: bigint | null
    createdAt: Date | null
    updatedAt: Date | null
    createdBy: bigint | null
  }

  export type CashBankTransferCountAggregateOutputType = {
    id: number
    transferDate: number
    amount: number
    fromAccount: number
    toAccount: number
    referenceNo: number
    remarks: number
    deletedAt: number
    deletedBy: number
    createdAt: number
    updatedAt: number
    createdBy: number
    _all: number
  }


  export type CashBankTransferAvgAggregateInputType = {
    id?: true
    amount?: true
    deletedBy?: true
    createdBy?: true
  }

  export type CashBankTransferSumAggregateInputType = {
    id?: true
    amount?: true
    deletedBy?: true
    createdBy?: true
  }

  export type CashBankTransferMinAggregateInputType = {
    id?: true
    transferDate?: true
    amount?: true
    fromAccount?: true
    toAccount?: true
    referenceNo?: true
    remarks?: true
    deletedAt?: true
    deletedBy?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type CashBankTransferMaxAggregateInputType = {
    id?: true
    transferDate?: true
    amount?: true
    fromAccount?: true
    toAccount?: true
    referenceNo?: true
    remarks?: true
    deletedAt?: true
    deletedBy?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
  }

  export type CashBankTransferCountAggregateInputType = {
    id?: true
    transferDate?: true
    amount?: true
    fromAccount?: true
    toAccount?: true
    referenceNo?: true
    remarks?: true
    deletedAt?: true
    deletedBy?: true
    createdAt?: true
    updatedAt?: true
    createdBy?: true
    _all?: true
  }

  export type CashBankTransferAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CashBankTransfer to aggregate.
     */
    where?: CashBankTransferWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankTransfers to fetch.
     */
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: CashBankTransferWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankTransfers 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` CashBankTransfers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned CashBankTransfers
    **/
    _count?: true | CashBankTransferCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: CashBankTransferAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: CashBankTransferSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: CashBankTransferMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: CashBankTransferMaxAggregateInputType
  }

  export type GetCashBankTransferAggregateType<T extends CashBankTransferAggregateArgs> = {
        [P in keyof T & keyof AggregateCashBankTransfer]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateCashBankTransfer[P]>
      : GetScalarType<T[P], AggregateCashBankTransfer[P]>
  }




  export type CashBankTransferGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: CashBankTransferWhereInput
    orderBy?: CashBankTransferOrderByWithAggregationInput | CashBankTransferOrderByWithAggregationInput[]
    by: CashBankTransferScalarFieldEnum[] | CashBankTransferScalarFieldEnum
    having?: CashBankTransferScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: CashBankTransferCountAggregateInputType | true
    _avg?: CashBankTransferAvgAggregateInputType
    _sum?: CashBankTransferSumAggregateInputType
    _min?: CashBankTransferMinAggregateInputType
    _max?: CashBankTransferMaxAggregateInputType
  }

  export type CashBankTransferGroupByOutputType = {
    id: bigint
    transferDate: Date
    amount: Decimal
    fromAccount: string
    toAccount: string
    referenceNo: string | null
    remarks: string | null
    deletedAt: Date | null
    deletedBy: bigint | null
    createdAt: Date
    updatedAt: Date
    createdBy: bigint | null
    _count: CashBankTransferCountAggregateOutputType | null
    _avg: CashBankTransferAvgAggregateOutputType | null
    _sum: CashBankTransferSumAggregateOutputType | null
    _min: CashBankTransferMinAggregateOutputType | null
    _max: CashBankTransferMaxAggregateOutputType | null
  }

  type GetCashBankTransferGroupByPayload<T extends CashBankTransferGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<CashBankTransferGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof CashBankTransferGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], CashBankTransferGroupByOutputType[P]>
            : GetScalarType<T[P], CashBankTransferGroupByOutputType[P]>
        }
      >
    >


  export type CashBankTransferSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    transferDate?: boolean
    amount?: boolean
    fromAccount?: boolean
    toAccount?: boolean
    referenceNo?: boolean
    remarks?: boolean
    deletedAt?: boolean
    deletedBy?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
    deletedByUser?: boolean | CashBankTransfer$deletedByUserArgs<ExtArgs>
    createdByUser?: boolean | CashBankTransfer$createdByUserArgs<ExtArgs>
  }, ExtArgs["result"]["cashBankTransfer"]>



  export type CashBankTransferSelectScalar = {
    id?: boolean
    transferDate?: boolean
    amount?: boolean
    fromAccount?: boolean
    toAccount?: boolean
    referenceNo?: boolean
    remarks?: boolean
    deletedAt?: boolean
    deletedBy?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    createdBy?: boolean
  }

  export type CashBankTransferOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "transferDate" | "amount" | "fromAccount" | "toAccount" | "referenceNo" | "remarks" | "deletedAt" | "deletedBy" | "createdAt" | "updatedAt" | "createdBy", ExtArgs["result"]["cashBankTransfer"]>
  export type CashBankTransferInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    deletedByUser?: boolean | CashBankTransfer$deletedByUserArgs<ExtArgs>
    createdByUser?: boolean | CashBankTransfer$createdByUserArgs<ExtArgs>
  }

  export type $CashBankTransferPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "CashBankTransfer"
    objects: {
      deletedByUser: Prisma.$UserPayload<ExtArgs> | null
      createdByUser: Prisma.$UserPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: bigint
      transferDate: Date
      amount: Prisma.Decimal
      fromAccount: string
      toAccount: string
      referenceNo: string | null
      remarks: string | null
      deletedAt: Date | null
      deletedBy: bigint | null
      createdAt: Date
      updatedAt: Date
      createdBy: bigint | null
    }, ExtArgs["result"]["cashBankTransfer"]>
    composites: {}
  }

  type CashBankTransferGetPayload<S extends boolean | null | undefined | CashBankTransferDefaultArgs> = $Result.GetResult<Prisma.$CashBankTransferPayload, S>

  type CashBankTransferCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<CashBankTransferFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: CashBankTransferCountAggregateInputType | true
    }

  export interface CashBankTransferDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['CashBankTransfer'], meta: { name: 'CashBankTransfer' } }
    /**
     * Find zero or one CashBankTransfer that matches the filter.
     * @param {CashBankTransferFindUniqueArgs} args - Arguments to find a CashBankTransfer
     * @example
     * // Get one CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends CashBankTransferFindUniqueArgs>(args: SelectSubset<T, CashBankTransferFindUniqueArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one CashBankTransfer that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {CashBankTransferFindUniqueOrThrowArgs} args - Arguments to find a CashBankTransfer
     * @example
     * // Get one CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends CashBankTransferFindUniqueOrThrowArgs>(args: SelectSubset<T, CashBankTransferFindUniqueOrThrowArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CashBankTransfer 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 {CashBankTransferFindFirstArgs} args - Arguments to find a CashBankTransfer
     * @example
     * // Get one CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends CashBankTransferFindFirstArgs>(args?: SelectSubset<T, CashBankTransferFindFirstArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first CashBankTransfer 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 {CashBankTransferFindFirstOrThrowArgs} args - Arguments to find a CashBankTransfer
     * @example
     * // Get one CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends CashBankTransferFindFirstOrThrowArgs>(args?: SelectSubset<T, CashBankTransferFindFirstOrThrowArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more CashBankTransfers 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 {CashBankTransferFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all CashBankTransfers
     * const cashBankTransfers = await prisma.cashBankTransfer.findMany()
     * 
     * // Get first 10 CashBankTransfers
     * const cashBankTransfers = await prisma.cashBankTransfer.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const cashBankTransferWithIdOnly = await prisma.cashBankTransfer.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends CashBankTransferFindManyArgs>(args?: SelectSubset<T, CashBankTransferFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a CashBankTransfer.
     * @param {CashBankTransferCreateArgs} args - Arguments to create a CashBankTransfer.
     * @example
     * // Create one CashBankTransfer
     * const CashBankTransfer = await prisma.cashBankTransfer.create({
     *   data: {
     *     // ... data to create a CashBankTransfer
     *   }
     * })
     * 
     */
    create<T extends CashBankTransferCreateArgs>(args: SelectSubset<T, CashBankTransferCreateArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many CashBankTransfers.
     * @param {CashBankTransferCreateManyArgs} args - Arguments to create many CashBankTransfers.
     * @example
     * // Create many CashBankTransfers
     * const cashBankTransfer = await prisma.cashBankTransfer.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends CashBankTransferCreateManyArgs>(args?: SelectSubset<T, CashBankTransferCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Delete a CashBankTransfer.
     * @param {CashBankTransferDeleteArgs} args - Arguments to delete one CashBankTransfer.
     * @example
     * // Delete one CashBankTransfer
     * const CashBankTransfer = await prisma.cashBankTransfer.delete({
     *   where: {
     *     // ... filter to delete one CashBankTransfer
     *   }
     * })
     * 
     */
    delete<T extends CashBankTransferDeleteArgs>(args: SelectSubset<T, CashBankTransferDeleteArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one CashBankTransfer.
     * @param {CashBankTransferUpdateArgs} args - Arguments to update one CashBankTransfer.
     * @example
     * // Update one CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends CashBankTransferUpdateArgs>(args: SelectSubset<T, CashBankTransferUpdateArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more CashBankTransfers.
     * @param {CashBankTransferDeleteManyArgs} args - Arguments to filter CashBankTransfers to delete.
     * @example
     * // Delete a few CashBankTransfers
     * const { count } = await prisma.cashBankTransfer.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends CashBankTransferDeleteManyArgs>(args?: SelectSubset<T, CashBankTransferDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more CashBankTransfers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankTransferUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many CashBankTransfers
     * const cashBankTransfer = await prisma.cashBankTransfer.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends CashBankTransferUpdateManyArgs>(args: SelectSubset<T, CashBankTransferUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create or update one CashBankTransfer.
     * @param {CashBankTransferUpsertArgs} args - Arguments to update or create a CashBankTransfer.
     * @example
     * // Update or create a CashBankTransfer
     * const cashBankTransfer = await prisma.cashBankTransfer.upsert({
     *   create: {
     *     // ... data to create a CashBankTransfer
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the CashBankTransfer we want to update
     *   }
     * })
     */
    upsert<T extends CashBankTransferUpsertArgs>(args: SelectSubset<T, CashBankTransferUpsertArgs<ExtArgs>>): Prisma__CashBankTransferClient<$Result.GetResult<Prisma.$CashBankTransferPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of CashBankTransfers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankTransferCountArgs} args - Arguments to filter CashBankTransfers to count.
     * @example
     * // Count the number of CashBankTransfers
     * const count = await prisma.cashBankTransfer.count({
     *   where: {
     *     // ... the filter for the CashBankTransfers we want to count
     *   }
     * })
    **/
    count<T extends CashBankTransferCountArgs>(
      args?: Subset<T, CashBankTransferCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], CashBankTransferCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a CashBankTransfer.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankTransferAggregateArgs} 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 CashBankTransferAggregateArgs>(args: Subset<T, CashBankTransferAggregateArgs>): Prisma.PrismaPromise<GetCashBankTransferAggregateType<T>>

    /**
     * Group by CashBankTransfer.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {CashBankTransferGroupByArgs} 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 CashBankTransferGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: CashBankTransferGroupByArgs['orderBy'] }
        : { orderBy?: CashBankTransferGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, CashBankTransferGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCashBankTransferGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the CashBankTransfer model
   */
  readonly fields: CashBankTransferFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for CashBankTransfer.
   * 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__CashBankTransferClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    deletedByUser<T extends CashBankTransfer$deletedByUserArgs<ExtArgs> = {}>(args?: Subset<T, CashBankTransfer$deletedByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
    createdByUser<T extends CashBankTransfer$createdByUserArgs<ExtArgs> = {}>(args?: Subset<T, CashBankTransfer$createdByUserArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<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.
     * @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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the CashBankTransfer model
   */
  interface CashBankTransferFieldRefs {
    readonly id: FieldRef<"CashBankTransfer", 'BigInt'>
    readonly transferDate: FieldRef<"CashBankTransfer", 'DateTime'>
    readonly amount: FieldRef<"CashBankTransfer", 'Decimal'>
    readonly fromAccount: FieldRef<"CashBankTransfer", 'String'>
    readonly toAccount: FieldRef<"CashBankTransfer", 'String'>
    readonly referenceNo: FieldRef<"CashBankTransfer", 'String'>
    readonly remarks: FieldRef<"CashBankTransfer", 'String'>
    readonly deletedAt: FieldRef<"CashBankTransfer", 'DateTime'>
    readonly deletedBy: FieldRef<"CashBankTransfer", 'BigInt'>
    readonly createdAt: FieldRef<"CashBankTransfer", 'DateTime'>
    readonly updatedAt: FieldRef<"CashBankTransfer", 'DateTime'>
    readonly createdBy: FieldRef<"CashBankTransfer", 'BigInt'>
  }
    

  // Custom InputTypes
  /**
   * CashBankTransfer findUnique
   */
  export type CashBankTransferFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter, which CashBankTransfer to fetch.
     */
    where: CashBankTransferWhereUniqueInput
  }

  /**
   * CashBankTransfer findUniqueOrThrow
   */
  export type CashBankTransferFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter, which CashBankTransfer to fetch.
     */
    where: CashBankTransferWhereUniqueInput
  }

  /**
   * CashBankTransfer findFirst
   */
  export type CashBankTransferFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter, which CashBankTransfer to fetch.
     */
    where?: CashBankTransferWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankTransfers to fetch.
     */
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CashBankTransfers.
     */
    cursor?: CashBankTransferWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankTransfers 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` CashBankTransfers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankTransfers.
     */
    distinct?: CashBankTransferScalarFieldEnum | CashBankTransferScalarFieldEnum[]
  }

  /**
   * CashBankTransfer findFirstOrThrow
   */
  export type CashBankTransferFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter, which CashBankTransfer to fetch.
     */
    where?: CashBankTransferWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankTransfers to fetch.
     */
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for CashBankTransfers.
     */
    cursor?: CashBankTransferWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankTransfers 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` CashBankTransfers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankTransfers.
     */
    distinct?: CashBankTransferScalarFieldEnum | CashBankTransferScalarFieldEnum[]
  }

  /**
   * CashBankTransfer findMany
   */
  export type CashBankTransferFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter, which CashBankTransfers to fetch.
     */
    where?: CashBankTransferWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of CashBankTransfers to fetch.
     */
    orderBy?: CashBankTransferOrderByWithRelationInput | CashBankTransferOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing CashBankTransfers.
     */
    cursor?: CashBankTransferWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` CashBankTransfers 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` CashBankTransfers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of CashBankTransfers.
     */
    distinct?: CashBankTransferScalarFieldEnum | CashBankTransferScalarFieldEnum[]
  }

  /**
   * CashBankTransfer create
   */
  export type CashBankTransferCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * The data needed to create a CashBankTransfer.
     */
    data: XOR<CashBankTransferCreateInput, CashBankTransferUncheckedCreateInput>
  }

  /**
   * CashBankTransfer createMany
   */
  export type CashBankTransferCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many CashBankTransfers.
     */
    data: CashBankTransferCreateManyInput | CashBankTransferCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * CashBankTransfer update
   */
  export type CashBankTransferUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * The data needed to update a CashBankTransfer.
     */
    data: XOR<CashBankTransferUpdateInput, CashBankTransferUncheckedUpdateInput>
    /**
     * Choose, which CashBankTransfer to update.
     */
    where: CashBankTransferWhereUniqueInput
  }

  /**
   * CashBankTransfer updateMany
   */
  export type CashBankTransferUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update CashBankTransfers.
     */
    data: XOR<CashBankTransferUpdateManyMutationInput, CashBankTransferUncheckedUpdateManyInput>
    /**
     * Filter which CashBankTransfers to update
     */
    where?: CashBankTransferWhereInput
    /**
     * Limit how many CashBankTransfers to update.
     */
    limit?: number
  }

  /**
   * CashBankTransfer upsert
   */
  export type CashBankTransferUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * The filter to search for the CashBankTransfer to update in case it exists.
     */
    where: CashBankTransferWhereUniqueInput
    /**
     * In case the CashBankTransfer found by the `where` argument doesn't exist, create a new CashBankTransfer with this data.
     */
    create: XOR<CashBankTransferCreateInput, CashBankTransferUncheckedCreateInput>
    /**
     * In case the CashBankTransfer was found with the provided `where` argument, update it with this data.
     */
    update: XOR<CashBankTransferUpdateInput, CashBankTransferUncheckedUpdateInput>
  }

  /**
   * CashBankTransfer delete
   */
  export type CashBankTransferDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
    /**
     * Filter which CashBankTransfer to delete.
     */
    where: CashBankTransferWhereUniqueInput
  }

  /**
   * CashBankTransfer deleteMany
   */
  export type CashBankTransferDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which CashBankTransfers to delete
     */
    where?: CashBankTransferWhereInput
    /**
     * Limit how many CashBankTransfers to delete.
     */
    limit?: number
  }

  /**
   * CashBankTransfer.deletedByUser
   */
  export type CashBankTransfer$deletedByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * CashBankTransfer.createdByUser
   */
  export type CashBankTransfer$createdByUserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the User
     */
    select?: UserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the User
     */
    omit?: UserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserInclude<ExtArgs> | null
    where?: UserWhereInput
  }

  /**
   * CashBankTransfer without action
   */
  export type CashBankTransferDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the CashBankTransfer
     */
    select?: CashBankTransferSelect<ExtArgs> | null
    /**
     * Omit specific fields from the CashBankTransfer
     */
    omit?: CashBankTransferOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: CashBankTransferInclude<ExtArgs> | null
  }


  /**
   * Enums
   */

  export const TransactionIsolationLevel: {
    ReadUncommitted: 'ReadUncommitted',
    ReadCommitted: 'ReadCommitted',
    RepeatableRead: 'RepeatableRead',
    Serializable: 'Serializable'
  };

  export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]


  export const RoleScalarFieldEnum: {
    id: 'id',
    name: 'name',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum]


  export const UserScalarFieldEnum: {
    id: 'id',
    name: 'name',
    email: 'email',
    mobileNo: 'mobileNo',
    password: 'password',
    roleId: 'roleId',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    status: 'status',
    profile: 'profile'
  };

  export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]


  export const StateScalarFieldEnum: {
    id: 'id',
    name: 'name',
    tamilName: 'tamilName',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type StateScalarFieldEnum = (typeof StateScalarFieldEnum)[keyof typeof StateScalarFieldEnum]


  export const DistrictScalarFieldEnum: {
    id: 'id',
    stateId: 'stateId',
    name: 'name',
    tamilName: 'tamilName',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type DistrictScalarFieldEnum = (typeof DistrictScalarFieldEnum)[keyof typeof DistrictScalarFieldEnum]


  export const VegetableScalarFieldEnum: {
    id: 'id',
    name: 'name',
    tamilName: 'tamilName',
    hindiName: 'hindiName',
    kannadaName: 'kannadaName',
    malayalamName: 'malayalamName',
    teluguName: 'teluguName',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    hsnCode: 'hsnCode',
    isFlexible: 'isFlexible',
    createdBy: 'createdBy'
  };

  export type VegetableScalarFieldEnum = (typeof VegetableScalarFieldEnum)[keyof typeof VegetableScalarFieldEnum]


  export const CustomerScalarFieldEnum: {
    id: 'id',
    name: 'name',
    tamilName: 'tamilName',
    mobileNo: 'mobileNo',
    address: 'address',
    stateId: 'stateId',
    districtId: 'districtId',
    openingBalance: 'openingBalance',
    outstandingBalance: 'outstandingBalance',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]


  export const SupplierScalarFieldEnum: {
    id: 'id',
    name: 'name',
    tamilName: 'tamilName',
    mobileNo: 'mobileNo',
    address: 'address',
    stateId: 'stateId',
    districtId: 'districtId',
    openingBalance: 'openingBalance',
    outstandingBalance: 'outstandingBalance',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]


  export const SupplierPaymentScalarFieldEnum: {
    id: 'id',
    supplierId: 'supplierId',
    paymentDate: 'paymentDate',
    amount: 'amount',
    paymentMode: 'paymentMode',
    referenceNo: 'referenceNo',
    remarks: 'remarks',
    type: 'type',
    isWhatsappMessageSent: 'isWhatsappMessageSent',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type SupplierPaymentScalarFieldEnum = (typeof SupplierPaymentScalarFieldEnum)[keyof typeof SupplierPaymentScalarFieldEnum]


  export const UpiScalarFieldEnum: {
    id: 'id',
    upiId: 'upiId',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type UpiScalarFieldEnum = (typeof UpiScalarFieldEnum)[keyof typeof UpiScalarFieldEnum]


  export const PurchaseScalarFieldEnum: {
    id: 'id',
    purchaseDate: 'purchaseDate',
    billNo: 'billNo',
    supplierId: 'supplierId',
    cashSupplierName: 'cashSupplierName',
    vegetableId: 'vegetableId',
    lotNo: 'lotNo',
    purchaseType: 'purchaseType',
    status: 'status',
    unit: 'unit',
    rateType: 'rateType',
    bags: 'bags',
    weightPerBag: 'weightPerBag',
    quantity: 'quantity',
    ratePerUnit: 'ratePerUnit',
    freight: 'freight',
    extraFreight: 'extraFreight',
    associationFee: 'associationFee',
    unloadingFee: 'unloadingFee',
    miscellaneousFee: 'miscellaneousFee',
    totalFreight: 'totalFreight',
    transportFee: 'transportFee',
    loadingUnloadingFee: 'loadingUnloadingFee',
    otherCharges: 'otherCharges',
    thaiyalCharges: 'thaiyalCharges',
    extraCharges: 'extraCharges',
    goodsTotal: 'goodsTotal',
    surchargeTotal: 'surchargeTotal',
    costPerUnit: 'costPerUnit',
    grandTotal: 'grandTotal',
    dateOfDespatch: 'dateOfDespatch',
    arrivalDate: 'arrivalDate',
    placeOfDespatch: 'placeOfDespatch',
    placeOfArrival: 'placeOfArrival',
    truckNo: 'truckNo',
    agentName: 'agentName',
    advanceAmount: 'advanceAmount',
    balanceAmount: 'balanceAmount',
    remainingQuantity: 'remainingQuantity',
    remainingBags: 'remainingBags',
    remarks: 'remarks',
    closedAt: 'closedAt',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type PurchaseScalarFieldEnum = (typeof PurchaseScalarFieldEnum)[keyof typeof PurchaseScalarFieldEnum]


  export const ShopScalarFieldEnum: {
    id: 'id',
    shopName: 'shopName',
    shortName: 'shortName',
    address: 'address',
    mobile: 'mobile',
    mobile2: 'mobile2',
    mapUrl: 'mapUrl',
    godName1: 'godName1',
    godName2: 'godName2',
    godName3: 'godName3',
    logo: 'logo',
    godImage1: 'godImage1',
    godImage2: 'godImage2',
    authorizedSign: 'authorizedSign',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type ShopScalarFieldEnum = (typeof ShopScalarFieldEnum)[keyof typeof ShopScalarFieldEnum]


  export const SaleScalarFieldEnum: {
    id: 'id',
    invoiceNo: 'invoiceNo',
    customerId: 'customerId',
    walkInName: 'walkInName',
    walkInMobile: 'walkInMobile',
    invoiceDate: 'invoiceDate',
    subTotal: 'subTotal',
    discount: 'discount',
    freightCharge: 'freightCharge',
    grandTotal: 'grandTotal',
    receivedAmount: 'receivedAmount',
    cashAmount: 'cashAmount',
    upiAmount: 'upiAmount',
    bankAmount: 'bankAmount',
    balanceAmount: 'balanceAmount',
    paymentStatus: 'paymentStatus',
    remarks: 'remarks',
    images: 'images',
    invoiceDownloadToken: 'invoiceDownloadToken',
    isWhatsappMessageSent: 'isWhatsappMessageSent',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type SaleScalarFieldEnum = (typeof SaleScalarFieldEnum)[keyof typeof SaleScalarFieldEnum]


  export const SaleItemScalarFieldEnum: {
    id: 'id',
    saleId: 'saleId',
    purchaseId: 'purchaseId',
    saleUnit: 'saleUnit',
    quantity: 'quantity',
    bags: 'bags',
    costPerUnit: 'costPerUnit',
    sellingRate: 'sellingRate',
    total: 'total',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type SaleItemScalarFieldEnum = (typeof SaleItemScalarFieldEnum)[keyof typeof SaleItemScalarFieldEnum]


  export const CustomerReceiptScalarFieldEnum: {
    id: 'id',
    customerId: 'customerId',
    receiptDate: 'receiptDate',
    amount: 'amount',
    paymentMode: 'paymentMode',
    referenceNo: 'referenceNo',
    remarks: 'remarks',
    isWhatsappMessageSent: 'isWhatsappMessageSent',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type CustomerReceiptScalarFieldEnum = (typeof CustomerReceiptScalarFieldEnum)[keyof typeof CustomerReceiptScalarFieldEnum]


  export const ExpenseScalarFieldEnum: {
    id: 'id',
    expenseDate: 'expenseDate',
    category: 'category',
    amount: 'amount',
    paymentMode: 'paymentMode',
    remarks: 'remarks',
    purchaseId: 'purchaseId',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type ExpenseScalarFieldEnum = (typeof ExpenseScalarFieldEnum)[keyof typeof ExpenseScalarFieldEnum]


  export const ForgotPasswordScalarFieldEnum: {
    userId: 'userId',
    otp: 'otp',
    expiresAt: 'expiresAt',
    attempts: 'attempts',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type ForgotPasswordScalarFieldEnum = (typeof ForgotPasswordScalarFieldEnum)[keyof typeof ForgotPasswordScalarFieldEnum]


  export const StockSpoilageScalarFieldEnum: {
    id: 'id',
    purchaseId: 'purchaseId',
    spoilageDate: 'spoilageDate',
    quantity: 'quantity',
    reason: 'reason',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type StockSpoilageScalarFieldEnum = (typeof StockSpoilageScalarFieldEnum)[keyof typeof StockSpoilageScalarFieldEnum]


  export const SaleReturnScalarFieldEnum: {
    id: 'id',
    saleItemId: 'saleItemId',
    purchaseId: 'purchaseId',
    returnDate: 'returnDate',
    quantity: 'quantity',
    returnAmount: 'returnAmount',
    reason: 'reason',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type SaleReturnScalarFieldEnum = (typeof SaleReturnScalarFieldEnum)[keyof typeof SaleReturnScalarFieldEnum]


  export const ArrivalSettlementScalarFieldEnum: {
    id: 'id',
    purchaseId: 'purchaseId',
    settlementNo: 'settlementNo',
    settlementDate: 'settlementDate',
    totalWeightSold: 'totalWeightSold',
    grossSalesTotal: 'grossSalesTotal',
    commissionPercent: 'commissionPercent',
    commissionAmount: 'commissionAmount',
    freightDeducted: 'freightDeducted',
    extraFreightDeducted: 'extraFreightDeducted',
    associationDeducted: 'associationDeducted',
    unloadingDeducted: 'unloadingDeducted',
    miscDeducted: 'miscDeducted',
    totalDeductions: 'totalDeductions',
    advanceAdjusted: 'advanceAdjusted',
    netPayable: 'netPayable',
    paidAmount: 'paidAmount',
    balanceAmount: 'balanceAmount',
    status: 'status',
    paymentMode: 'paymentMode',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type ArrivalSettlementScalarFieldEnum = (typeof ArrivalSettlementScalarFieldEnum)[keyof typeof ArrivalSettlementScalarFieldEnum]


  export const ArrivalCustomPattiScalarFieldEnum: {
    id: 'id',
    purchaseId: 'purchaseId',
    pattiNo: 'pattiNo',
    settlementDate: 'settlementDate',
    items: 'items',
    totalWeightSold: 'totalWeightSold',
    grossSalesTotal: 'grossSalesTotal',
    commissionPercent: 'commissionPercent',
    commissionAmount: 'commissionAmount',
    freightDeducted: 'freightDeducted',
    extraFreightDeducted: 'extraFreightDeducted',
    associationDeducted: 'associationDeducted',
    unloadingDeducted: 'unloadingDeducted',
    miscDeducted: 'miscDeducted',
    totalDeductions: 'totalDeductions',
    advanceAdjusted: 'advanceAdjusted',
    netPayable: 'netPayable',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type ArrivalCustomPattiScalarFieldEnum = (typeof ArrivalCustomPattiScalarFieldEnum)[keyof typeof ArrivalCustomPattiScalarFieldEnum]


  export const QuotationScalarFieldEnum: {
    id: 'id',
    quotationNo: 'quotationNo',
    customerId: 'customerId',
    customerName: 'customerName',
    quotationDate: 'quotationDate',
    amount: 'amount',
    extraCharge: 'extraCharge',
    discount: 'discount',
    totalAmount: 'totalAmount',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type QuotationScalarFieldEnum = (typeof QuotationScalarFieldEnum)[keyof typeof QuotationScalarFieldEnum]


  export const QuotationItemScalarFieldEnum: {
    id: 'id',
    quotationId: 'quotationId',
    vegetableId: 'vegetableId',
    vegName: 'vegName',
    hsnCode: 'hsnCode',
    quantity: 'quantity',
    unit: 'unit',
    price: 'price',
    amount: 'amount',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type QuotationItemScalarFieldEnum = (typeof QuotationItemScalarFieldEnum)[keyof typeof QuotationItemScalarFieldEnum]


  export const PurchaseReturnScalarFieldEnum: {
    id: 'id',
    purchaseId: 'purchaseId',
    returnDate: 'returnDate',
    quantity: 'quantity',
    bags: 'bags',
    returnAmount: 'returnAmount',
    reason: 'reason',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type PurchaseReturnScalarFieldEnum = (typeof PurchaseReturnScalarFieldEnum)[keyof typeof PurchaseReturnScalarFieldEnum]


  export const RetailStockScalarFieldEnum: {
    id: 'id',
    purchaseId: 'purchaseId',
    lotNo: 'lotNo',
    allocatedUnit: 'allocatedUnit',
    allocatedQty: 'allocatedQty',
    quantity: 'quantity',
    bags: 'bags',
    remainingQuantity: 'remainingQuantity',
    remainingBags: 'remainingBags',
    costPerUnit: 'costPerUnit',
    allocationDate: 'allocationDate',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type RetailStockScalarFieldEnum = (typeof RetailStockScalarFieldEnum)[keyof typeof RetailStockScalarFieldEnum]


  export const RetailStockReturnScalarFieldEnum: {
    id: 'id',
    retailStockId: 'retailStockId',
    returnDate: 'returnDate',
    quantity: 'quantity',
    bags: 'bags',
    reason: 'reason',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type RetailStockReturnScalarFieldEnum = (typeof RetailStockReturnScalarFieldEnum)[keyof typeof RetailStockReturnScalarFieldEnum]


  export const RetailSaleScalarFieldEnum: {
    id: 'id',
    invoiceNo: 'invoiceNo',
    walkInName: 'walkInName',
    walkInMobile: 'walkInMobile',
    invoiceDate: 'invoiceDate',
    subTotal: 'subTotal',
    discount: 'discount',
    grandTotal: 'grandTotal',
    receivedAmount: 'receivedAmount',
    balanceAmount: 'balanceAmount',
    paymentMode: 'paymentMode',
    paymentStatus: 'paymentStatus',
    remarks: 'remarks',
    movedToWholesale: 'movedToWholesale',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type RetailSaleScalarFieldEnum = (typeof RetailSaleScalarFieldEnum)[keyof typeof RetailSaleScalarFieldEnum]


  export const RetailSaleItemScalarFieldEnum: {
    id: 'id',
    retailSaleId: 'retailSaleId',
    retailStockId: 'retailStockId',
    saleUnit: 'saleUnit',
    quantity: 'quantity',
    bags: 'bags',
    costPerUnit: 'costPerUnit',
    sellingRate: 'sellingRate',
    total: 'total',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type RetailSaleItemScalarFieldEnum = (typeof RetailSaleItemScalarFieldEnum)[keyof typeof RetailSaleItemScalarFieldEnum]


  export const RetailStockSpoilageScalarFieldEnum: {
    id: 'id',
    retailStockId: 'retailStockId',
    spoilageDate: 'spoilageDate',
    quantity: 'quantity',
    reason: 'reason',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type RetailStockSpoilageScalarFieldEnum = (typeof RetailStockSpoilageScalarFieldEnum)[keyof typeof RetailStockSpoilageScalarFieldEnum]


  export const BoxReturnScalarFieldEnum: {
    id: 'id',
    supplierId: 'supplierId',
    returnDate: 'returnDate',
    boxCount: 'boxCount',
    remarks: 'remarks',
    signature: 'signature',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type BoxReturnScalarFieldEnum = (typeof BoxReturnScalarFieldEnum)[keyof typeof BoxReturnScalarFieldEnum]


  export const EmployeeScalarFieldEnum: {
    id: 'id',
    employeeCode: 'employeeCode',
    name: 'name',
    mobile: 'mobile',
    designation: 'designation',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    deletedAt: 'deletedAt',
    createdBy: 'createdBy'
  };

  export type EmployeeScalarFieldEnum = (typeof EmployeeScalarFieldEnum)[keyof typeof EmployeeScalarFieldEnum]


  export const AttendanceScalarFieldEnum: {
    id: 'id',
    employeeId: 'employeeId',
    date: 'date',
    status: 'status',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type AttendanceScalarFieldEnum = (typeof AttendanceScalarFieldEnum)[keyof typeof AttendanceScalarFieldEnum]


  export const AuditLogScalarFieldEnum: {
    id: 'id',
    entityName: 'entityName',
    entityId: 'entityId',
    action: 'action',
    oldValues: 'oldValues',
    newValues: 'newValues',
    createdAt: 'createdAt',
    userId: 'userId'
  };

  export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum]


  export const FastBillingScalarFieldEnum: {
    id: 'id',
    billNo: 'billNo',
    billDate: 'billDate',
    customerName: 'customerName',
    totalAmount: 'totalAmount',
    remarks: 'remarks',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type FastBillingScalarFieldEnum = (typeof FastBillingScalarFieldEnum)[keyof typeof FastBillingScalarFieldEnum]


  export const FastBillingItemScalarFieldEnum: {
    id: 'id',
    fastBillingId: 'fastBillingId',
    vegetableName: 'vegetableName',
    quantity: 'quantity',
    unit: 'unit',
    rateType: 'rateType',
    numberOfBoxes: 'numberOfBoxes',
    numberOfThaar: 'numberOfThaar',
    numberOfPieces: 'numberOfPieces',
    ratePerUnit: 'ratePerUnit',
    extraCharges: 'extraCharges',
    totalAmount: 'totalAmount',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type FastBillingItemScalarFieldEnum = (typeof FastBillingItemScalarFieldEnum)[keyof typeof FastBillingItemScalarFieldEnum]


  export const CashBankSettingScalarFieldEnum: {
    id: 'id',
    openingCashInHand: 'openingCashInHand',
    openingCashInBank: 'openingCashInBank',
    openingDate: 'openingDate',
    remarks: 'remarks',
    isLocked: 'isLocked',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type CashBankSettingScalarFieldEnum = (typeof CashBankSettingScalarFieldEnum)[keyof typeof CashBankSettingScalarFieldEnum]


  export const CashBankTransferScalarFieldEnum: {
    id: 'id',
    transferDate: 'transferDate',
    amount: 'amount',
    fromAccount: 'fromAccount',
    toAccount: 'toAccount',
    referenceNo: 'referenceNo',
    remarks: 'remarks',
    deletedAt: 'deletedAt',
    deletedBy: 'deletedBy',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt',
    createdBy: 'createdBy'
  };

  export type CashBankTransferScalarFieldEnum = (typeof CashBankTransferScalarFieldEnum)[keyof typeof CashBankTransferScalarFieldEnum]


  export const SortOrder: {
    asc: 'asc',
    desc: 'desc'
  };

  export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]


  export const NullableJsonNullValueInput: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull
  };

  export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]


  export const JsonNullValueInput: {
    JsonNull: typeof JsonNull
  };

  export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]


  export const RoleOrderByRelevanceFieldEnum: {
    name: 'name'
  };

  export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum]


  export const NullsOrder: {
    first: 'first',
    last: 'last'
  };

  export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]


  export const UserOrderByRelevanceFieldEnum: {
    name: 'name',
    email: 'email',
    mobileNo: 'mobileNo',
    password: 'password',
    profile: 'profile'
  };

  export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum]


  export const StateOrderByRelevanceFieldEnum: {
    name: 'name',
    tamilName: 'tamilName'
  };

  export type StateOrderByRelevanceFieldEnum = (typeof StateOrderByRelevanceFieldEnum)[keyof typeof StateOrderByRelevanceFieldEnum]


  export const DistrictOrderByRelevanceFieldEnum: {
    name: 'name',
    tamilName: 'tamilName'
  };

  export type DistrictOrderByRelevanceFieldEnum = (typeof DistrictOrderByRelevanceFieldEnum)[keyof typeof DistrictOrderByRelevanceFieldEnum]


  export const VegetableOrderByRelevanceFieldEnum: {
    name: 'name',
    tamilName: 'tamilName',
    hindiName: 'hindiName',
    kannadaName: 'kannadaName',
    malayalamName: 'malayalamName',
    teluguName: 'teluguName',
    hsnCode: 'hsnCode'
  };

  export type VegetableOrderByRelevanceFieldEnum = (typeof VegetableOrderByRelevanceFieldEnum)[keyof typeof VegetableOrderByRelevanceFieldEnum]


  export const CustomerOrderByRelevanceFieldEnum: {
    name: 'name',
    tamilName: 'tamilName',
    mobileNo: 'mobileNo',
    address: 'address'
  };

  export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]


  export const SupplierOrderByRelevanceFieldEnum: {
    name: 'name',
    tamilName: 'tamilName',
    mobileNo: 'mobileNo',
    address: 'address'
  };

  export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]


  export const SupplierPaymentOrderByRelevanceFieldEnum: {
    referenceNo: 'referenceNo',
    remarks: 'remarks'
  };

  export type SupplierPaymentOrderByRelevanceFieldEnum = (typeof SupplierPaymentOrderByRelevanceFieldEnum)[keyof typeof SupplierPaymentOrderByRelevanceFieldEnum]


  export const UpiOrderByRelevanceFieldEnum: {
    upiId: 'upiId'
  };

  export type UpiOrderByRelevanceFieldEnum = (typeof UpiOrderByRelevanceFieldEnum)[keyof typeof UpiOrderByRelevanceFieldEnum]


  export const PurchaseOrderByRelevanceFieldEnum: {
    billNo: 'billNo',
    cashSupplierName: 'cashSupplierName',
    lotNo: 'lotNo',
    placeOfDespatch: 'placeOfDespatch',
    placeOfArrival: 'placeOfArrival',
    truckNo: 'truckNo',
    agentName: 'agentName',
    remarks: 'remarks'
  };

  export type PurchaseOrderByRelevanceFieldEnum = (typeof PurchaseOrderByRelevanceFieldEnum)[keyof typeof PurchaseOrderByRelevanceFieldEnum]


  export const ShopOrderByRelevanceFieldEnum: {
    shopName: 'shopName',
    shortName: 'shortName',
    address: 'address',
    mobile: 'mobile',
    mobile2: 'mobile2',
    mapUrl: 'mapUrl',
    godName1: 'godName1',
    godName2: 'godName2',
    godName3: 'godName3',
    logo: 'logo',
    godImage1: 'godImage1',
    godImage2: 'godImage2',
    authorizedSign: 'authorizedSign'
  };

  export type ShopOrderByRelevanceFieldEnum = (typeof ShopOrderByRelevanceFieldEnum)[keyof typeof ShopOrderByRelevanceFieldEnum]


  export const JsonNullValueFilter: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull,
    AnyNull: typeof AnyNull
  };

  export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]


  export const QueryMode: {
    default: 'default',
    insensitive: 'insensitive'
  };

  export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]


  export const SaleOrderByRelevanceFieldEnum: {
    invoiceNo: 'invoiceNo',
    walkInName: 'walkInName',
    walkInMobile: 'walkInMobile',
    remarks: 'remarks',
    invoiceDownloadToken: 'invoiceDownloadToken'
  };

  export type SaleOrderByRelevanceFieldEnum = (typeof SaleOrderByRelevanceFieldEnum)[keyof typeof SaleOrderByRelevanceFieldEnum]


  export const CustomerReceiptOrderByRelevanceFieldEnum: {
    referenceNo: 'referenceNo',
    remarks: 'remarks'
  };

  export type CustomerReceiptOrderByRelevanceFieldEnum = (typeof CustomerReceiptOrderByRelevanceFieldEnum)[keyof typeof CustomerReceiptOrderByRelevanceFieldEnum]


  export const ExpenseOrderByRelevanceFieldEnum: {
    category: 'category',
    remarks: 'remarks'
  };

  export type ExpenseOrderByRelevanceFieldEnum = (typeof ExpenseOrderByRelevanceFieldEnum)[keyof typeof ExpenseOrderByRelevanceFieldEnum]


  export const ForgotPasswordOrderByRelevanceFieldEnum: {
    otp: 'otp'
  };

  export type ForgotPasswordOrderByRelevanceFieldEnum = (typeof ForgotPasswordOrderByRelevanceFieldEnum)[keyof typeof ForgotPasswordOrderByRelevanceFieldEnum]


  export const StockSpoilageOrderByRelevanceFieldEnum: {
    reason: 'reason',
    remarks: 'remarks'
  };

  export type StockSpoilageOrderByRelevanceFieldEnum = (typeof StockSpoilageOrderByRelevanceFieldEnum)[keyof typeof StockSpoilageOrderByRelevanceFieldEnum]


  export const SaleReturnOrderByRelevanceFieldEnum: {
    reason: 'reason',
    remarks: 'remarks'
  };

  export type SaleReturnOrderByRelevanceFieldEnum = (typeof SaleReturnOrderByRelevanceFieldEnum)[keyof typeof SaleReturnOrderByRelevanceFieldEnum]


  export const ArrivalSettlementOrderByRelevanceFieldEnum: {
    settlementNo: 'settlementNo',
    remarks: 'remarks'
  };

  export type ArrivalSettlementOrderByRelevanceFieldEnum = (typeof ArrivalSettlementOrderByRelevanceFieldEnum)[keyof typeof ArrivalSettlementOrderByRelevanceFieldEnum]


  export const ArrivalCustomPattiOrderByRelevanceFieldEnum: {
    pattiNo: 'pattiNo',
    remarks: 'remarks'
  };

  export type ArrivalCustomPattiOrderByRelevanceFieldEnum = (typeof ArrivalCustomPattiOrderByRelevanceFieldEnum)[keyof typeof ArrivalCustomPattiOrderByRelevanceFieldEnum]


  export const QuotationOrderByRelevanceFieldEnum: {
    quotationNo: 'quotationNo',
    customerName: 'customerName'
  };

  export type QuotationOrderByRelevanceFieldEnum = (typeof QuotationOrderByRelevanceFieldEnum)[keyof typeof QuotationOrderByRelevanceFieldEnum]


  export const QuotationItemOrderByRelevanceFieldEnum: {
    vegName: 'vegName',
    hsnCode: 'hsnCode',
    unit: 'unit'
  };

  export type QuotationItemOrderByRelevanceFieldEnum = (typeof QuotationItemOrderByRelevanceFieldEnum)[keyof typeof QuotationItemOrderByRelevanceFieldEnum]


  export const PurchaseReturnOrderByRelevanceFieldEnum: {
    reason: 'reason',
    remarks: 'remarks'
  };

  export type PurchaseReturnOrderByRelevanceFieldEnum = (typeof PurchaseReturnOrderByRelevanceFieldEnum)[keyof typeof PurchaseReturnOrderByRelevanceFieldEnum]


  export const RetailStockOrderByRelevanceFieldEnum: {
    lotNo: 'lotNo',
    remarks: 'remarks'
  };

  export type RetailStockOrderByRelevanceFieldEnum = (typeof RetailStockOrderByRelevanceFieldEnum)[keyof typeof RetailStockOrderByRelevanceFieldEnum]


  export const RetailStockReturnOrderByRelevanceFieldEnum: {
    reason: 'reason',
    remarks: 'remarks'
  };

  export type RetailStockReturnOrderByRelevanceFieldEnum = (typeof RetailStockReturnOrderByRelevanceFieldEnum)[keyof typeof RetailStockReturnOrderByRelevanceFieldEnum]


  export const RetailSaleOrderByRelevanceFieldEnum: {
    invoiceNo: 'invoiceNo',
    walkInName: 'walkInName',
    walkInMobile: 'walkInMobile',
    remarks: 'remarks'
  };

  export type RetailSaleOrderByRelevanceFieldEnum = (typeof RetailSaleOrderByRelevanceFieldEnum)[keyof typeof RetailSaleOrderByRelevanceFieldEnum]


  export const RetailStockSpoilageOrderByRelevanceFieldEnum: {
    reason: 'reason',
    remarks: 'remarks'
  };

  export type RetailStockSpoilageOrderByRelevanceFieldEnum = (typeof RetailStockSpoilageOrderByRelevanceFieldEnum)[keyof typeof RetailStockSpoilageOrderByRelevanceFieldEnum]


  export const BoxReturnOrderByRelevanceFieldEnum: {
    remarks: 'remarks',
    signature: 'signature'
  };

  export type BoxReturnOrderByRelevanceFieldEnum = (typeof BoxReturnOrderByRelevanceFieldEnum)[keyof typeof BoxReturnOrderByRelevanceFieldEnum]


  export const EmployeeOrderByRelevanceFieldEnum: {
    employeeCode: 'employeeCode',
    name: 'name',
    mobile: 'mobile',
    designation: 'designation'
  };

  export type EmployeeOrderByRelevanceFieldEnum = (typeof EmployeeOrderByRelevanceFieldEnum)[keyof typeof EmployeeOrderByRelevanceFieldEnum]


  export const AttendanceOrderByRelevanceFieldEnum: {
    remarks: 'remarks'
  };

  export type AttendanceOrderByRelevanceFieldEnum = (typeof AttendanceOrderByRelevanceFieldEnum)[keyof typeof AttendanceOrderByRelevanceFieldEnum]


  export const AuditLogOrderByRelevanceFieldEnum: {
    entityName: 'entityName'
  };

  export type AuditLogOrderByRelevanceFieldEnum = (typeof AuditLogOrderByRelevanceFieldEnum)[keyof typeof AuditLogOrderByRelevanceFieldEnum]


  export const FastBillingOrderByRelevanceFieldEnum: {
    billNo: 'billNo',
    customerName: 'customerName',
    remarks: 'remarks'
  };

  export type FastBillingOrderByRelevanceFieldEnum = (typeof FastBillingOrderByRelevanceFieldEnum)[keyof typeof FastBillingOrderByRelevanceFieldEnum]


  export const FastBillingItemOrderByRelevanceFieldEnum: {
    vegetableName: 'vegetableName',
    unit: 'unit',
    rateType: 'rateType'
  };

  export type FastBillingItemOrderByRelevanceFieldEnum = (typeof FastBillingItemOrderByRelevanceFieldEnum)[keyof typeof FastBillingItemOrderByRelevanceFieldEnum]


  export const CashBankSettingOrderByRelevanceFieldEnum: {
    remarks: 'remarks'
  };

  export type CashBankSettingOrderByRelevanceFieldEnum = (typeof CashBankSettingOrderByRelevanceFieldEnum)[keyof typeof CashBankSettingOrderByRelevanceFieldEnum]


  export const CashBankTransferOrderByRelevanceFieldEnum: {
    fromAccount: 'fromAccount',
    toAccount: 'toAccount',
    referenceNo: 'referenceNo',
    remarks: 'remarks'
  };

  export type CashBankTransferOrderByRelevanceFieldEnum = (typeof CashBankTransferOrderByRelevanceFieldEnum)[keyof typeof CashBankTransferOrderByRelevanceFieldEnum]


  /**
   * Field references
   */


  /**
   * Reference to a field of type 'BigInt'
   */
  export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'>
    


  /**
   * Reference to a field of type 'String'
   */
  export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
    


  /**
   * Reference to a field of type 'DateTime'
   */
  export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
    


  /**
   * Reference to a field of type 'Boolean'
   */
  export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
    


  /**
   * Reference to a field of type 'Decimal'
   */
  export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
    


  /**
   * Reference to a field of type 'PaymentMode'
   */
  export type EnumPaymentModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PaymentMode'>
    


  /**
   * Reference to a field of type 'SupplierPaymentType'
   */
  export type EnumSupplierPaymentTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SupplierPaymentType'>
    


  /**
   * Reference to a field of type 'Int'
   */
  export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
    


  /**
   * Reference to a field of type 'PurchaseType'
   */
  export type EnumPurchaseTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PurchaseType'>
    


  /**
   * Reference to a field of type 'PurchaseStatus'
   */
  export type EnumPurchaseStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PurchaseStatus'>
    


  /**
   * Reference to a field of type 'PurchaseUnit'
   */
  export type EnumPurchaseUnitFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PurchaseUnit'>
    


  /**
   * Reference to a field of type 'RateType'
   */
  export type EnumRateTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'RateType'>
    


  /**
   * Reference to a field of type 'SalePaymentStatus'
   */
  export type EnumSalePaymentStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SalePaymentStatus'>
    


  /**
   * Reference to a field of type 'Json'
   */
  export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
    


  /**
   * Reference to a field of type 'QueryMode'
   */
  export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
    


  /**
   * Reference to a field of type 'SettlementStatus'
   */
  export type EnumSettlementStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SettlementStatus'>
    


  /**
   * Reference to a field of type 'AttendanceStatus'
   */
  export type EnumAttendanceStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AttendanceStatus'>
    


  /**
   * Reference to a field of type 'AuditAction'
   */
  export type EnumAuditActionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AuditAction'>
    


  /**
   * Reference to a field of type 'Float'
   */
  export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
    
  /**
   * Deep Input Types
   */


  export type RoleWhereInput = {
    AND?: RoleWhereInput | RoleWhereInput[]
    OR?: RoleWhereInput[]
    NOT?: RoleWhereInput | RoleWhereInput[]
    id?: BigIntFilter<"Role"> | bigint | number
    name?: StringFilter<"Role"> | string
    createdAt?: DateTimeFilter<"Role"> | Date | string
    updatedAt?: DateTimeFilter<"Role"> | Date | string
    users?: UserListRelationFilter
  }

  export type RoleOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    users?: UserOrderByRelationAggregateInput
    _relevance?: RoleOrderByRelevanceInput
  }

  export type RoleWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: RoleWhereInput | RoleWhereInput[]
    OR?: RoleWhereInput[]
    NOT?: RoleWhereInput | RoleWhereInput[]
    name?: StringFilter<"Role"> | string
    createdAt?: DateTimeFilter<"Role"> | Date | string
    updatedAt?: DateTimeFilter<"Role"> | Date | string
    users?: UserListRelationFilter
  }, "id">

  export type RoleOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: RoleCountOrderByAggregateInput
    _avg?: RoleAvgOrderByAggregateInput
    _max?: RoleMaxOrderByAggregateInput
    _min?: RoleMinOrderByAggregateInput
    _sum?: RoleSumOrderByAggregateInput
  }

  export type RoleScalarWhereWithAggregatesInput = {
    AND?: RoleScalarWhereWithAggregatesInput | RoleScalarWhereWithAggregatesInput[]
    OR?: RoleScalarWhereWithAggregatesInput[]
    NOT?: RoleScalarWhereWithAggregatesInput | RoleScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Role"> | bigint | number
    name?: StringWithAggregatesFilter<"Role"> | string
    createdAt?: DateTimeWithAggregatesFilter<"Role"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Role"> | Date | string
  }

  export type UserWhereInput = {
    AND?: UserWhereInput | UserWhereInput[]
    OR?: UserWhereInput[]
    NOT?: UserWhereInput | UserWhereInput[]
    id?: BigIntFilter<"User"> | bigint | number
    name?: StringFilter<"User"> | string
    email?: StringFilter<"User"> | string
    mobileNo?: StringNullableFilter<"User"> | string | null
    password?: StringFilter<"User"> | string
    roleId?: BigIntFilter<"User"> | bigint | number
    createdAt?: DateTimeFilter<"User"> | Date | string
    updatedAt?: DateTimeFilter<"User"> | Date | string
    status?: BoolFilter<"User"> | boolean
    profile?: StringNullableFilter<"User"> | string | null
    role?: XOR<RoleScalarRelationFilter, RoleWhereInput>
    forgotPassword?: XOR<ForgotPasswordNullableScalarRelationFilter, ForgotPasswordWhereInput> | null
    createdStates?: StateListRelationFilter
    createdDistricts?: DistrictListRelationFilter
    createdVegetables?: VegetableListRelationFilter
    createdCustomers?: CustomerListRelationFilter
    createdSuppliers?: SupplierListRelationFilter
    createdSupplierPayments?: SupplierPaymentListRelationFilter
    createdUpis?: UpiListRelationFilter
    createdPurchases?: PurchaseListRelationFilter
    createdShops?: ShopListRelationFilter
    createdSales?: SaleListRelationFilter
    createdSaleItems?: SaleItemListRelationFilter
    createdCustomerReceipts?: CustomerReceiptListRelationFilter
    createdExpenses?: ExpenseListRelationFilter
    createdStockSpoilages?: StockSpoilageListRelationFilter
    createdSaleReturns?: SaleReturnListRelationFilter
    createdQuotations?: QuotationListRelationFilter
    createdQuotationItems?: QuotationItemListRelationFilter
    createdPurchaseReturns?: PurchaseReturnListRelationFilter
    createdRetailStocks?: RetailStockListRelationFilter
    createdRetailSales?: RetailSaleListRelationFilter
    createdRetailSaleItems?: RetailSaleItemListRelationFilter
    createdRetailStockSpoilages?: RetailStockSpoilageListRelationFilter
    createdRetailStockReturns?: RetailStockReturnListRelationFilter
    createdBoxReturns?: BoxReturnListRelationFilter
    createdEmployees?: EmployeeListRelationFilter
    createdAttendances?: AttendanceListRelationFilter
    createdArrivalSettlements?: ArrivalSettlementListRelationFilter
    createdArrivalCustomPattis?: ArrivalCustomPattiListRelationFilter
    createdFastBillings?: FastBillingListRelationFilter
    createdFastBillingItems?: FastBillingItemListRelationFilter
    createdCashBankTransfers?: CashBankTransferListRelationFilter
    deletedCashBankTransfers?: CashBankTransferListRelationFilter
    auditLogs?: AuditLogListRelationFilter
  }

  export type UserOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    email?: SortOrder
    mobileNo?: SortOrderInput | SortOrder
    password?: SortOrder
    roleId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    status?: SortOrder
    profile?: SortOrderInput | SortOrder
    role?: RoleOrderByWithRelationInput
    forgotPassword?: ForgotPasswordOrderByWithRelationInput
    createdStates?: StateOrderByRelationAggregateInput
    createdDistricts?: DistrictOrderByRelationAggregateInput
    createdVegetables?: VegetableOrderByRelationAggregateInput
    createdCustomers?: CustomerOrderByRelationAggregateInput
    createdSuppliers?: SupplierOrderByRelationAggregateInput
    createdSupplierPayments?: SupplierPaymentOrderByRelationAggregateInput
    createdUpis?: UpiOrderByRelationAggregateInput
    createdPurchases?: PurchaseOrderByRelationAggregateInput
    createdShops?: ShopOrderByRelationAggregateInput
    createdSales?: SaleOrderByRelationAggregateInput
    createdSaleItems?: SaleItemOrderByRelationAggregateInput
    createdCustomerReceipts?: CustomerReceiptOrderByRelationAggregateInput
    createdExpenses?: ExpenseOrderByRelationAggregateInput
    createdStockSpoilages?: StockSpoilageOrderByRelationAggregateInput
    createdSaleReturns?: SaleReturnOrderByRelationAggregateInput
    createdQuotations?: QuotationOrderByRelationAggregateInput
    createdQuotationItems?: QuotationItemOrderByRelationAggregateInput
    createdPurchaseReturns?: PurchaseReturnOrderByRelationAggregateInput
    createdRetailStocks?: RetailStockOrderByRelationAggregateInput
    createdRetailSales?: RetailSaleOrderByRelationAggregateInput
    createdRetailSaleItems?: RetailSaleItemOrderByRelationAggregateInput
    createdRetailStockSpoilages?: RetailStockSpoilageOrderByRelationAggregateInput
    createdRetailStockReturns?: RetailStockReturnOrderByRelationAggregateInput
    createdBoxReturns?: BoxReturnOrderByRelationAggregateInput
    createdEmployees?: EmployeeOrderByRelationAggregateInput
    createdAttendances?: AttendanceOrderByRelationAggregateInput
    createdArrivalSettlements?: ArrivalSettlementOrderByRelationAggregateInput
    createdArrivalCustomPattis?: ArrivalCustomPattiOrderByRelationAggregateInput
    createdFastBillings?: FastBillingOrderByRelationAggregateInput
    createdFastBillingItems?: FastBillingItemOrderByRelationAggregateInput
    createdCashBankTransfers?: CashBankTransferOrderByRelationAggregateInput
    deletedCashBankTransfers?: CashBankTransferOrderByRelationAggregateInput
    auditLogs?: AuditLogOrderByRelationAggregateInput
    _relevance?: UserOrderByRelevanceInput
  }

  export type UserWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    email?: string
    mobileNo?: string
    AND?: UserWhereInput | UserWhereInput[]
    OR?: UserWhereInput[]
    NOT?: UserWhereInput | UserWhereInput[]
    name?: StringFilter<"User"> | string
    password?: StringFilter<"User"> | string
    roleId?: BigIntFilter<"User"> | bigint | number
    createdAt?: DateTimeFilter<"User"> | Date | string
    updatedAt?: DateTimeFilter<"User"> | Date | string
    status?: BoolFilter<"User"> | boolean
    profile?: StringNullableFilter<"User"> | string | null
    role?: XOR<RoleScalarRelationFilter, RoleWhereInput>
    forgotPassword?: XOR<ForgotPasswordNullableScalarRelationFilter, ForgotPasswordWhereInput> | null
    createdStates?: StateListRelationFilter
    createdDistricts?: DistrictListRelationFilter
    createdVegetables?: VegetableListRelationFilter
    createdCustomers?: CustomerListRelationFilter
    createdSuppliers?: SupplierListRelationFilter
    createdSupplierPayments?: SupplierPaymentListRelationFilter
    createdUpis?: UpiListRelationFilter
    createdPurchases?: PurchaseListRelationFilter
    createdShops?: ShopListRelationFilter
    createdSales?: SaleListRelationFilter
    createdSaleItems?: SaleItemListRelationFilter
    createdCustomerReceipts?: CustomerReceiptListRelationFilter
    createdExpenses?: ExpenseListRelationFilter
    createdStockSpoilages?: StockSpoilageListRelationFilter
    createdSaleReturns?: SaleReturnListRelationFilter
    createdQuotations?: QuotationListRelationFilter
    createdQuotationItems?: QuotationItemListRelationFilter
    createdPurchaseReturns?: PurchaseReturnListRelationFilter
    createdRetailStocks?: RetailStockListRelationFilter
    createdRetailSales?: RetailSaleListRelationFilter
    createdRetailSaleItems?: RetailSaleItemListRelationFilter
    createdRetailStockSpoilages?: RetailStockSpoilageListRelationFilter
    createdRetailStockReturns?: RetailStockReturnListRelationFilter
    createdBoxReturns?: BoxReturnListRelationFilter
    createdEmployees?: EmployeeListRelationFilter
    createdAttendances?: AttendanceListRelationFilter
    createdArrivalSettlements?: ArrivalSettlementListRelationFilter
    createdArrivalCustomPattis?: ArrivalCustomPattiListRelationFilter
    createdFastBillings?: FastBillingListRelationFilter
    createdFastBillingItems?: FastBillingItemListRelationFilter
    createdCashBankTransfers?: CashBankTransferListRelationFilter
    deletedCashBankTransfers?: CashBankTransferListRelationFilter
    auditLogs?: AuditLogListRelationFilter
  }, "id" | "email" | "mobileNo">

  export type UserOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    email?: SortOrder
    mobileNo?: SortOrderInput | SortOrder
    password?: SortOrder
    roleId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    status?: SortOrder
    profile?: SortOrderInput | SortOrder
    _count?: UserCountOrderByAggregateInput
    _avg?: UserAvgOrderByAggregateInput
    _max?: UserMaxOrderByAggregateInput
    _min?: UserMinOrderByAggregateInput
    _sum?: UserSumOrderByAggregateInput
  }

  export type UserScalarWhereWithAggregatesInput = {
    AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
    OR?: UserScalarWhereWithAggregatesInput[]
    NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"User"> | bigint | number
    name?: StringWithAggregatesFilter<"User"> | string
    email?: StringWithAggregatesFilter<"User"> | string
    mobileNo?: StringNullableWithAggregatesFilter<"User"> | string | null
    password?: StringWithAggregatesFilter<"User"> | string
    roleId?: BigIntWithAggregatesFilter<"User"> | bigint | number
    createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
    status?: BoolWithAggregatesFilter<"User"> | boolean
    profile?: StringNullableWithAggregatesFilter<"User"> | string | null
  }

  export type StateWhereInput = {
    AND?: StateWhereInput | StateWhereInput[]
    OR?: StateWhereInput[]
    NOT?: StateWhereInput | StateWhereInput[]
    id?: BigIntFilter<"State"> | bigint | number
    name?: StringFilter<"State"> | string
    tamilName?: StringNullableFilter<"State"> | string | null
    status?: BoolFilter<"State"> | boolean
    createdAt?: DateTimeFilter<"State"> | Date | string
    updatedAt?: DateTimeFilter<"State"> | Date | string
    createdBy?: BigIntNullableFilter<"State"> | bigint | number | null
    districts?: DistrictListRelationFilter
    customers?: CustomerListRelationFilter
    suppliers?: SupplierListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type StateOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    districts?: DistrictOrderByRelationAggregateInput
    customers?: CustomerOrderByRelationAggregateInput
    suppliers?: SupplierOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: StateOrderByRelevanceInput
  }

  export type StateWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    name?: string
    tamilName?: string
    AND?: StateWhereInput | StateWhereInput[]
    OR?: StateWhereInput[]
    NOT?: StateWhereInput | StateWhereInput[]
    status?: BoolFilter<"State"> | boolean
    createdAt?: DateTimeFilter<"State"> | Date | string
    updatedAt?: DateTimeFilter<"State"> | Date | string
    createdBy?: BigIntNullableFilter<"State"> | bigint | number | null
    districts?: DistrictListRelationFilter
    customers?: CustomerListRelationFilter
    suppliers?: SupplierListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "name" | "tamilName">

  export type StateOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: StateCountOrderByAggregateInput
    _avg?: StateAvgOrderByAggregateInput
    _max?: StateMaxOrderByAggregateInput
    _min?: StateMinOrderByAggregateInput
    _sum?: StateSumOrderByAggregateInput
  }

  export type StateScalarWhereWithAggregatesInput = {
    AND?: StateScalarWhereWithAggregatesInput | StateScalarWhereWithAggregatesInput[]
    OR?: StateScalarWhereWithAggregatesInput[]
    NOT?: StateScalarWhereWithAggregatesInput | StateScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"State"> | bigint | number
    name?: StringWithAggregatesFilter<"State"> | string
    tamilName?: StringNullableWithAggregatesFilter<"State"> | string | null
    status?: BoolWithAggregatesFilter<"State"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"State"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"State"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"State"> | bigint | number | null
  }

  export type DistrictWhereInput = {
    AND?: DistrictWhereInput | DistrictWhereInput[]
    OR?: DistrictWhereInput[]
    NOT?: DistrictWhereInput | DistrictWhereInput[]
    id?: BigIntFilter<"District"> | bigint | number
    stateId?: BigIntFilter<"District"> | bigint | number
    name?: StringFilter<"District"> | string
    tamilName?: StringNullableFilter<"District"> | string | null
    status?: BoolFilter<"District"> | boolean
    createdAt?: DateTimeFilter<"District"> | Date | string
    updatedAt?: DateTimeFilter<"District"> | Date | string
    createdBy?: BigIntNullableFilter<"District"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    customers?: CustomerListRelationFilter
    suppliers?: SupplierListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type DistrictOrderByWithRelationInput = {
    id?: SortOrder
    stateId?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    state?: StateOrderByWithRelationInput
    customers?: CustomerOrderByRelationAggregateInput
    suppliers?: SupplierOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: DistrictOrderByRelevanceInput
  }

  export type DistrictWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    name?: string
    tamilName?: string
    AND?: DistrictWhereInput | DistrictWhereInput[]
    OR?: DistrictWhereInput[]
    NOT?: DistrictWhereInput | DistrictWhereInput[]
    stateId?: BigIntFilter<"District"> | bigint | number
    status?: BoolFilter<"District"> | boolean
    createdAt?: DateTimeFilter<"District"> | Date | string
    updatedAt?: DateTimeFilter<"District"> | Date | string
    createdBy?: BigIntNullableFilter<"District"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    customers?: CustomerListRelationFilter
    suppliers?: SupplierListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "name" | "tamilName">

  export type DistrictOrderByWithAggregationInput = {
    id?: SortOrder
    stateId?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: DistrictCountOrderByAggregateInput
    _avg?: DistrictAvgOrderByAggregateInput
    _max?: DistrictMaxOrderByAggregateInput
    _min?: DistrictMinOrderByAggregateInput
    _sum?: DistrictSumOrderByAggregateInput
  }

  export type DistrictScalarWhereWithAggregatesInput = {
    AND?: DistrictScalarWhereWithAggregatesInput | DistrictScalarWhereWithAggregatesInput[]
    OR?: DistrictScalarWhereWithAggregatesInput[]
    NOT?: DistrictScalarWhereWithAggregatesInput | DistrictScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"District"> | bigint | number
    stateId?: BigIntWithAggregatesFilter<"District"> | bigint | number
    name?: StringWithAggregatesFilter<"District"> | string
    tamilName?: StringNullableWithAggregatesFilter<"District"> | string | null
    status?: BoolWithAggregatesFilter<"District"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"District"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"District"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"District"> | bigint | number | null
  }

  export type VegetableWhereInput = {
    AND?: VegetableWhereInput | VegetableWhereInput[]
    OR?: VegetableWhereInput[]
    NOT?: VegetableWhereInput | VegetableWhereInput[]
    id?: BigIntFilter<"Vegetable"> | bigint | number
    name?: StringFilter<"Vegetable"> | string
    tamilName?: StringNullableFilter<"Vegetable"> | string | null
    hindiName?: StringNullableFilter<"Vegetable"> | string | null
    kannadaName?: StringNullableFilter<"Vegetable"> | string | null
    malayalamName?: StringNullableFilter<"Vegetable"> | string | null
    teluguName?: StringNullableFilter<"Vegetable"> | string | null
    status?: BoolFilter<"Vegetable"> | boolean
    createdAt?: DateTimeFilter<"Vegetable"> | Date | string
    updatedAt?: DateTimeFilter<"Vegetable"> | Date | string
    hsnCode?: StringNullableFilter<"Vegetable"> | string | null
    isFlexible?: BoolFilter<"Vegetable"> | boolean
    createdBy?: BigIntNullableFilter<"Vegetable"> | bigint | number | null
    purchases?: PurchaseListRelationFilter
    quotationItems?: QuotationItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type VegetableOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    hindiName?: SortOrderInput | SortOrder
    kannadaName?: SortOrderInput | SortOrder
    malayalamName?: SortOrderInput | SortOrder
    teluguName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    hsnCode?: SortOrderInput | SortOrder
    isFlexible?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchases?: PurchaseOrderByRelationAggregateInput
    quotationItems?: QuotationItemOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: VegetableOrderByRelevanceInput
  }

  export type VegetableWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    name?: string
    tamilName?: string
    hindiName?: string
    kannadaName?: string
    malayalamName?: string
    teluguName?: string
    AND?: VegetableWhereInput | VegetableWhereInput[]
    OR?: VegetableWhereInput[]
    NOT?: VegetableWhereInput | VegetableWhereInput[]
    status?: BoolFilter<"Vegetable"> | boolean
    createdAt?: DateTimeFilter<"Vegetable"> | Date | string
    updatedAt?: DateTimeFilter<"Vegetable"> | Date | string
    hsnCode?: StringNullableFilter<"Vegetable"> | string | null
    isFlexible?: BoolFilter<"Vegetable"> | boolean
    createdBy?: BigIntNullableFilter<"Vegetable"> | bigint | number | null
    purchases?: PurchaseListRelationFilter
    quotationItems?: QuotationItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "name" | "tamilName" | "hindiName" | "kannadaName" | "malayalamName" | "teluguName">

  export type VegetableOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    hindiName?: SortOrderInput | SortOrder
    kannadaName?: SortOrderInput | SortOrder
    malayalamName?: SortOrderInput | SortOrder
    teluguName?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    hsnCode?: SortOrderInput | SortOrder
    isFlexible?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: VegetableCountOrderByAggregateInput
    _avg?: VegetableAvgOrderByAggregateInput
    _max?: VegetableMaxOrderByAggregateInput
    _min?: VegetableMinOrderByAggregateInput
    _sum?: VegetableSumOrderByAggregateInput
  }

  export type VegetableScalarWhereWithAggregatesInput = {
    AND?: VegetableScalarWhereWithAggregatesInput | VegetableScalarWhereWithAggregatesInput[]
    OR?: VegetableScalarWhereWithAggregatesInput[]
    NOT?: VegetableScalarWhereWithAggregatesInput | VegetableScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Vegetable"> | bigint | number
    name?: StringWithAggregatesFilter<"Vegetable"> | string
    tamilName?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    hindiName?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    kannadaName?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    malayalamName?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    teluguName?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    status?: BoolWithAggregatesFilter<"Vegetable"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Vegetable"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Vegetable"> | Date | string
    hsnCode?: StringNullableWithAggregatesFilter<"Vegetable"> | string | null
    isFlexible?: BoolWithAggregatesFilter<"Vegetable"> | boolean
    createdBy?: BigIntNullableWithAggregatesFilter<"Vegetable"> | bigint | number | null
  }

  export type CustomerWhereInput = {
    AND?: CustomerWhereInput | CustomerWhereInput[]
    OR?: CustomerWhereInput[]
    NOT?: CustomerWhereInput | CustomerWhereInput[]
    id?: BigIntFilter<"Customer"> | bigint | number
    name?: StringFilter<"Customer"> | string
    tamilName?: StringNullableFilter<"Customer"> | string | null
    mobileNo?: StringFilter<"Customer"> | string
    address?: StringNullableFilter<"Customer"> | string | null
    stateId?: BigIntFilter<"Customer"> | bigint | number
    districtId?: BigIntFilter<"Customer"> | bigint | number
    openingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Customer"> | boolean
    createdAt?: DateTimeFilter<"Customer"> | Date | string
    updatedAt?: DateTimeFilter<"Customer"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Customer"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    district?: XOR<DistrictScalarRelationFilter, DistrictWhereInput>
    sales?: SaleListRelationFilter
    customerReceipts?: CustomerReceiptListRelationFilter
    quotations?: QuotationListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type CustomerOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    mobileNo?: SortOrder
    address?: SortOrderInput | SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    state?: StateOrderByWithRelationInput
    district?: DistrictOrderByWithRelationInput
    sales?: SaleOrderByRelationAggregateInput
    customerReceipts?: CustomerReceiptOrderByRelationAggregateInput
    quotations?: QuotationOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: CustomerOrderByRelevanceInput
  }

  export type CustomerWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: CustomerWhereInput | CustomerWhereInput[]
    OR?: CustomerWhereInput[]
    NOT?: CustomerWhereInput | CustomerWhereInput[]
    name?: StringFilter<"Customer"> | string
    tamilName?: StringNullableFilter<"Customer"> | string | null
    mobileNo?: StringFilter<"Customer"> | string
    address?: StringNullableFilter<"Customer"> | string | null
    stateId?: BigIntFilter<"Customer"> | bigint | number
    districtId?: BigIntFilter<"Customer"> | bigint | number
    openingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Customer"> | boolean
    createdAt?: DateTimeFilter<"Customer"> | Date | string
    updatedAt?: DateTimeFilter<"Customer"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Customer"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    district?: XOR<DistrictScalarRelationFilter, DistrictWhereInput>
    sales?: SaleListRelationFilter
    customerReceipts?: CustomerReceiptListRelationFilter
    quotations?: QuotationListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type CustomerOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    mobileNo?: SortOrder
    address?: SortOrderInput | SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: CustomerCountOrderByAggregateInput
    _avg?: CustomerAvgOrderByAggregateInput
    _max?: CustomerMaxOrderByAggregateInput
    _min?: CustomerMinOrderByAggregateInput
    _sum?: CustomerSumOrderByAggregateInput
  }

  export type CustomerScalarWhereWithAggregatesInput = {
    AND?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[]
    OR?: CustomerScalarWhereWithAggregatesInput[]
    NOT?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Customer"> | bigint | number
    name?: StringWithAggregatesFilter<"Customer"> | string
    tamilName?: StringNullableWithAggregatesFilter<"Customer"> | string | null
    mobileNo?: StringWithAggregatesFilter<"Customer"> | string
    address?: StringNullableWithAggregatesFilter<"Customer"> | string | null
    stateId?: BigIntWithAggregatesFilter<"Customer"> | bigint | number
    districtId?: BigIntWithAggregatesFilter<"Customer"> | bigint | number
    openingBalance?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    status?: BoolWithAggregatesFilter<"Customer"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"Customer"> | bigint | number | null
  }

  export type SupplierWhereInput = {
    AND?: SupplierWhereInput | SupplierWhereInput[]
    OR?: SupplierWhereInput[]
    NOT?: SupplierWhereInput | SupplierWhereInput[]
    id?: BigIntFilter<"Supplier"> | bigint | number
    name?: StringFilter<"Supplier"> | string
    tamilName?: StringNullableFilter<"Supplier"> | string | null
    mobileNo?: StringFilter<"Supplier"> | string
    address?: StringNullableFilter<"Supplier"> | string | null
    stateId?: BigIntFilter<"Supplier"> | bigint | number
    districtId?: BigIntFilter<"Supplier"> | bigint | number
    openingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Supplier"> | boolean
    createdAt?: DateTimeFilter<"Supplier"> | Date | string
    updatedAt?: DateTimeFilter<"Supplier"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Supplier"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Supplier"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    district?: XOR<DistrictScalarRelationFilter, DistrictWhereInput>
    purchases?: PurchaseListRelationFilter
    supplierPayments?: SupplierPaymentListRelationFilter
    boxReturns?: BoxReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type SupplierOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    mobileNo?: SortOrder
    address?: SortOrderInput | SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    state?: StateOrderByWithRelationInput
    district?: DistrictOrderByWithRelationInput
    purchases?: PurchaseOrderByRelationAggregateInput
    supplierPayments?: SupplierPaymentOrderByRelationAggregateInput
    boxReturns?: BoxReturnOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: SupplierOrderByRelevanceInput
  }

  export type SupplierWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: SupplierWhereInput | SupplierWhereInput[]
    OR?: SupplierWhereInput[]
    NOT?: SupplierWhereInput | SupplierWhereInput[]
    name?: StringFilter<"Supplier"> | string
    tamilName?: StringNullableFilter<"Supplier"> | string | null
    mobileNo?: StringFilter<"Supplier"> | string
    address?: StringNullableFilter<"Supplier"> | string | null
    stateId?: BigIntFilter<"Supplier"> | bigint | number
    districtId?: BigIntFilter<"Supplier"> | bigint | number
    openingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Supplier"> | boolean
    createdAt?: DateTimeFilter<"Supplier"> | Date | string
    updatedAt?: DateTimeFilter<"Supplier"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Supplier"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Supplier"> | bigint | number | null
    state?: XOR<StateScalarRelationFilter, StateWhereInput>
    district?: XOR<DistrictScalarRelationFilter, DistrictWhereInput>
    purchases?: PurchaseListRelationFilter
    supplierPayments?: SupplierPaymentListRelationFilter
    boxReturns?: BoxReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type SupplierOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrderInput | SortOrder
    mobileNo?: SortOrder
    address?: SortOrderInput | SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: SupplierCountOrderByAggregateInput
    _avg?: SupplierAvgOrderByAggregateInput
    _max?: SupplierMaxOrderByAggregateInput
    _min?: SupplierMinOrderByAggregateInput
    _sum?: SupplierSumOrderByAggregateInput
  }

  export type SupplierScalarWhereWithAggregatesInput = {
    AND?: SupplierScalarWhereWithAggregatesInput | SupplierScalarWhereWithAggregatesInput[]
    OR?: SupplierScalarWhereWithAggregatesInput[]
    NOT?: SupplierScalarWhereWithAggregatesInput | SupplierScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Supplier"> | bigint | number
    name?: StringWithAggregatesFilter<"Supplier"> | string
    tamilName?: StringNullableWithAggregatesFilter<"Supplier"> | string | null
    mobileNo?: StringWithAggregatesFilter<"Supplier"> | string
    address?: StringNullableWithAggregatesFilter<"Supplier"> | string | null
    stateId?: BigIntWithAggregatesFilter<"Supplier"> | bigint | number
    districtId?: BigIntWithAggregatesFilter<"Supplier"> | bigint | number
    openingBalance?: DecimalWithAggregatesFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalWithAggregatesFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    status?: BoolWithAggregatesFilter<"Supplier"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Supplier"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Supplier"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"Supplier"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"Supplier"> | bigint | number | null
  }

  export type SupplierPaymentWhereInput = {
    AND?: SupplierPaymentWhereInput | SupplierPaymentWhereInput[]
    OR?: SupplierPaymentWhereInput[]
    NOT?: SupplierPaymentWhereInput | SupplierPaymentWhereInput[]
    id?: BigIntFilter<"SupplierPayment"> | bigint | number
    supplierId?: BigIntFilter<"SupplierPayment"> | bigint | number
    paymentDate?: DateTimeFilter<"SupplierPayment"> | Date | string
    amount?: DecimalFilter<"SupplierPayment"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"SupplierPayment"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"SupplierPayment"> | string | null
    remarks?: StringNullableFilter<"SupplierPayment"> | string | null
    type?: EnumSupplierPaymentTypeFilter<"SupplierPayment"> | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFilter<"SupplierPayment"> | boolean
    createdAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    updatedAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    deletedAt?: DateTimeNullableFilter<"SupplierPayment"> | Date | string | null
    createdBy?: BigIntNullableFilter<"SupplierPayment"> | bigint | number | null
    supplier?: XOR<SupplierScalarRelationFilter, SupplierWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type SupplierPaymentOrderByWithRelationInput = {
    id?: SortOrder
    supplierId?: SortOrder
    paymentDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    type?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    supplier?: SupplierOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: SupplierPaymentOrderByRelevanceInput
  }

  export type SupplierPaymentWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: SupplierPaymentWhereInput | SupplierPaymentWhereInput[]
    OR?: SupplierPaymentWhereInput[]
    NOT?: SupplierPaymentWhereInput | SupplierPaymentWhereInput[]
    supplierId?: BigIntFilter<"SupplierPayment"> | bigint | number
    paymentDate?: DateTimeFilter<"SupplierPayment"> | Date | string
    amount?: DecimalFilter<"SupplierPayment"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"SupplierPayment"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"SupplierPayment"> | string | null
    remarks?: StringNullableFilter<"SupplierPayment"> | string | null
    type?: EnumSupplierPaymentTypeFilter<"SupplierPayment"> | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFilter<"SupplierPayment"> | boolean
    createdAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    updatedAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    deletedAt?: DateTimeNullableFilter<"SupplierPayment"> | Date | string | null
    createdBy?: BigIntNullableFilter<"SupplierPayment"> | bigint | number | null
    supplier?: XOR<SupplierScalarRelationFilter, SupplierWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type SupplierPaymentOrderByWithAggregationInput = {
    id?: SortOrder
    supplierId?: SortOrder
    paymentDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    type?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: SupplierPaymentCountOrderByAggregateInput
    _avg?: SupplierPaymentAvgOrderByAggregateInput
    _max?: SupplierPaymentMaxOrderByAggregateInput
    _min?: SupplierPaymentMinOrderByAggregateInput
    _sum?: SupplierPaymentSumOrderByAggregateInput
  }

  export type SupplierPaymentScalarWhereWithAggregatesInput = {
    AND?: SupplierPaymentScalarWhereWithAggregatesInput | SupplierPaymentScalarWhereWithAggregatesInput[]
    OR?: SupplierPaymentScalarWhereWithAggregatesInput[]
    NOT?: SupplierPaymentScalarWhereWithAggregatesInput | SupplierPaymentScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"SupplierPayment"> | bigint | number
    supplierId?: BigIntWithAggregatesFilter<"SupplierPayment"> | bigint | number
    paymentDate?: DateTimeWithAggregatesFilter<"SupplierPayment"> | Date | string
    amount?: DecimalWithAggregatesFilter<"SupplierPayment"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeWithAggregatesFilter<"SupplierPayment"> | $Enums.PaymentMode
    referenceNo?: StringNullableWithAggregatesFilter<"SupplierPayment"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"SupplierPayment"> | string | null
    type?: EnumSupplierPaymentTypeWithAggregatesFilter<"SupplierPayment"> | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolWithAggregatesFilter<"SupplierPayment"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"SupplierPayment"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"SupplierPayment"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"SupplierPayment"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"SupplierPayment"> | bigint | number | null
  }

  export type UpiWhereInput = {
    AND?: UpiWhereInput | UpiWhereInput[]
    OR?: UpiWhereInput[]
    NOT?: UpiWhereInput | UpiWhereInput[]
    id?: IntFilter<"Upi"> | number
    upiId?: StringFilter<"Upi"> | string
    createdAt?: DateTimeFilter<"Upi"> | Date | string
    updatedAt?: DateTimeFilter<"Upi"> | Date | string
    createdBy?: BigIntNullableFilter<"Upi"> | bigint | number | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type UpiOrderByWithRelationInput = {
    id?: SortOrder
    upiId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: UpiOrderByRelevanceInput
  }

  export type UpiWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    upiId?: string
    AND?: UpiWhereInput | UpiWhereInput[]
    OR?: UpiWhereInput[]
    NOT?: UpiWhereInput | UpiWhereInput[]
    createdAt?: DateTimeFilter<"Upi"> | Date | string
    updatedAt?: DateTimeFilter<"Upi"> | Date | string
    createdBy?: BigIntNullableFilter<"Upi"> | bigint | number | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "upiId">

  export type UpiOrderByWithAggregationInput = {
    id?: SortOrder
    upiId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: UpiCountOrderByAggregateInput
    _avg?: UpiAvgOrderByAggregateInput
    _max?: UpiMaxOrderByAggregateInput
    _min?: UpiMinOrderByAggregateInput
    _sum?: UpiSumOrderByAggregateInput
  }

  export type UpiScalarWhereWithAggregatesInput = {
    AND?: UpiScalarWhereWithAggregatesInput | UpiScalarWhereWithAggregatesInput[]
    OR?: UpiScalarWhereWithAggregatesInput[]
    NOT?: UpiScalarWhereWithAggregatesInput | UpiScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Upi"> | number
    upiId?: StringWithAggregatesFilter<"Upi"> | string
    createdAt?: DateTimeWithAggregatesFilter<"Upi"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Upi"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"Upi"> | bigint | number | null
  }

  export type PurchaseWhereInput = {
    AND?: PurchaseWhereInput | PurchaseWhereInput[]
    OR?: PurchaseWhereInput[]
    NOT?: PurchaseWhereInput | PurchaseWhereInput[]
    id?: BigIntFilter<"Purchase"> | bigint | number
    purchaseDate?: DateTimeFilter<"Purchase"> | Date | string
    billNo?: StringNullableFilter<"Purchase"> | string | null
    supplierId?: BigIntNullableFilter<"Purchase"> | bigint | number | null
    cashSupplierName?: StringNullableFilter<"Purchase"> | string | null
    vegetableId?: BigIntFilter<"Purchase"> | bigint | number
    lotNo?: StringFilter<"Purchase"> | string
    purchaseType?: EnumPurchaseTypeFilter<"Purchase"> | $Enums.PurchaseType
    status?: EnumPurchaseStatusFilter<"Purchase"> | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFilter<"Purchase"> | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFilter<"Purchase"> | $Enums.RateType
    bags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    weightPerBag?: DecimalNullableFilter<"Purchase"> | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    freight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    arrivalDate?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    placeOfDespatch?: StringNullableFilter<"Purchase"> | string | null
    placeOfArrival?: StringNullableFilter<"Purchase"> | string | null
    truckNo?: StringNullableFilter<"Purchase"> | string | null
    agentName?: StringNullableFilter<"Purchase"> | string | null
    advanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"Purchase"> | string | null
    closedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdAt?: DateTimeFilter<"Purchase"> | Date | string
    updatedAt?: DateTimeFilter<"Purchase"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Purchase"> | bigint | number | null
    supplier?: XOR<SupplierNullableScalarRelationFilter, SupplierWhereInput> | null
    vegetable?: XOR<VegetableScalarRelationFilter, VegetableWhereInput>
    arrivalSettlement?: XOR<ArrivalSettlementNullableScalarRelationFilter, ArrivalSettlementWhereInput> | null
    arrivalCustomPatti?: XOR<ArrivalCustomPattiNullableScalarRelationFilter, ArrivalCustomPattiWhereInput> | null
    saleItems?: SaleItemListRelationFilter
    stockSpoilages?: StockSpoilageListRelationFilter
    saleReturns?: SaleReturnListRelationFilter
    purchaseReturns?: PurchaseReturnListRelationFilter
    retailStocks?: RetailStockListRelationFilter
    expenses?: ExpenseListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type PurchaseOrderByWithRelationInput = {
    id?: SortOrder
    purchaseDate?: SortOrder
    billNo?: SortOrderInput | SortOrder
    supplierId?: SortOrderInput | SortOrder
    cashSupplierName?: SortOrderInput | SortOrder
    vegetableId?: SortOrder
    lotNo?: SortOrder
    purchaseType?: SortOrder
    status?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrderInput | SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    dateOfDespatch?: SortOrderInput | SortOrder
    arrivalDate?: SortOrderInput | SortOrder
    placeOfDespatch?: SortOrderInput | SortOrder
    placeOfArrival?: SortOrderInput | SortOrder
    truckNo?: SortOrderInput | SortOrder
    agentName?: SortOrderInput | SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    remarks?: SortOrderInput | SortOrder
    closedAt?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    supplier?: SupplierOrderByWithRelationInput
    vegetable?: VegetableOrderByWithRelationInput
    arrivalSettlement?: ArrivalSettlementOrderByWithRelationInput
    arrivalCustomPatti?: ArrivalCustomPattiOrderByWithRelationInput
    saleItems?: SaleItemOrderByRelationAggregateInput
    stockSpoilages?: StockSpoilageOrderByRelationAggregateInput
    saleReturns?: SaleReturnOrderByRelationAggregateInput
    purchaseReturns?: PurchaseReturnOrderByRelationAggregateInput
    retailStocks?: RetailStockOrderByRelationAggregateInput
    expenses?: ExpenseOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: PurchaseOrderByRelevanceInput
  }

  export type PurchaseWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: PurchaseWhereInput | PurchaseWhereInput[]
    OR?: PurchaseWhereInput[]
    NOT?: PurchaseWhereInput | PurchaseWhereInput[]
    purchaseDate?: DateTimeFilter<"Purchase"> | Date | string
    billNo?: StringNullableFilter<"Purchase"> | string | null
    supplierId?: BigIntNullableFilter<"Purchase"> | bigint | number | null
    cashSupplierName?: StringNullableFilter<"Purchase"> | string | null
    vegetableId?: BigIntFilter<"Purchase"> | bigint | number
    lotNo?: StringFilter<"Purchase"> | string
    purchaseType?: EnumPurchaseTypeFilter<"Purchase"> | $Enums.PurchaseType
    status?: EnumPurchaseStatusFilter<"Purchase"> | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFilter<"Purchase"> | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFilter<"Purchase"> | $Enums.RateType
    bags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    weightPerBag?: DecimalNullableFilter<"Purchase"> | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    freight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    arrivalDate?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    placeOfDespatch?: StringNullableFilter<"Purchase"> | string | null
    placeOfArrival?: StringNullableFilter<"Purchase"> | string | null
    truckNo?: StringNullableFilter<"Purchase"> | string | null
    agentName?: StringNullableFilter<"Purchase"> | string | null
    advanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"Purchase"> | string | null
    closedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdAt?: DateTimeFilter<"Purchase"> | Date | string
    updatedAt?: DateTimeFilter<"Purchase"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Purchase"> | bigint | number | null
    supplier?: XOR<SupplierNullableScalarRelationFilter, SupplierWhereInput> | null
    vegetable?: XOR<VegetableScalarRelationFilter, VegetableWhereInput>
    arrivalSettlement?: XOR<ArrivalSettlementNullableScalarRelationFilter, ArrivalSettlementWhereInput> | null
    arrivalCustomPatti?: XOR<ArrivalCustomPattiNullableScalarRelationFilter, ArrivalCustomPattiWhereInput> | null
    saleItems?: SaleItemListRelationFilter
    stockSpoilages?: StockSpoilageListRelationFilter
    saleReturns?: SaleReturnListRelationFilter
    purchaseReturns?: PurchaseReturnListRelationFilter
    retailStocks?: RetailStockListRelationFilter
    expenses?: ExpenseListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type PurchaseOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseDate?: SortOrder
    billNo?: SortOrderInput | SortOrder
    supplierId?: SortOrderInput | SortOrder
    cashSupplierName?: SortOrderInput | SortOrder
    vegetableId?: SortOrder
    lotNo?: SortOrder
    purchaseType?: SortOrder
    status?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrderInput | SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    dateOfDespatch?: SortOrderInput | SortOrder
    arrivalDate?: SortOrderInput | SortOrder
    placeOfDespatch?: SortOrderInput | SortOrder
    placeOfArrival?: SortOrderInput | SortOrder
    truckNo?: SortOrderInput | SortOrder
    agentName?: SortOrderInput | SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    remarks?: SortOrderInput | SortOrder
    closedAt?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: PurchaseCountOrderByAggregateInput
    _avg?: PurchaseAvgOrderByAggregateInput
    _max?: PurchaseMaxOrderByAggregateInput
    _min?: PurchaseMinOrderByAggregateInput
    _sum?: PurchaseSumOrderByAggregateInput
  }

  export type PurchaseScalarWhereWithAggregatesInput = {
    AND?: PurchaseScalarWhereWithAggregatesInput | PurchaseScalarWhereWithAggregatesInput[]
    OR?: PurchaseScalarWhereWithAggregatesInput[]
    NOT?: PurchaseScalarWhereWithAggregatesInput | PurchaseScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Purchase"> | bigint | number
    purchaseDate?: DateTimeWithAggregatesFilter<"Purchase"> | Date | string
    billNo?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    supplierId?: BigIntNullableWithAggregatesFilter<"Purchase"> | bigint | number | null
    cashSupplierName?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    vegetableId?: BigIntWithAggregatesFilter<"Purchase"> | bigint | number
    lotNo?: StringWithAggregatesFilter<"Purchase"> | string
    purchaseType?: EnumPurchaseTypeWithAggregatesFilter<"Purchase"> | $Enums.PurchaseType
    status?: EnumPurchaseStatusWithAggregatesFilter<"Purchase"> | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitWithAggregatesFilter<"Purchase"> | $Enums.PurchaseUnit
    rateType?: EnumRateTypeWithAggregatesFilter<"Purchase"> | $Enums.RateType
    bags?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    weightPerBag?: DecimalNullableWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    freight?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: DateTimeNullableWithAggregatesFilter<"Purchase"> | Date | string | null
    arrivalDate?: DateTimeNullableWithAggregatesFilter<"Purchase"> | Date | string | null
    placeOfDespatch?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    placeOfArrival?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    truckNo?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    agentName?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    advanceAmount?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalWithAggregatesFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableWithAggregatesFilter<"Purchase"> | string | null
    closedAt?: DateTimeNullableWithAggregatesFilter<"Purchase"> | Date | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Purchase"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Purchase"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"Purchase"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"Purchase"> | bigint | number | null
  }

  export type ShopWhereInput = {
    AND?: ShopWhereInput | ShopWhereInput[]
    OR?: ShopWhereInput[]
    NOT?: ShopWhereInput | ShopWhereInput[]
    id?: IntFilter<"Shop"> | number
    shopName?: StringFilter<"Shop"> | string
    shortName?: StringNullableFilter<"Shop"> | string | null
    address?: StringFilter<"Shop"> | string
    mobile?: StringFilter<"Shop"> | string
    mobile2?: StringNullableFilter<"Shop"> | string | null
    mapUrl?: StringNullableFilter<"Shop"> | string | null
    godName1?: StringNullableFilter<"Shop"> | string | null
    godName2?: StringNullableFilter<"Shop"> | string | null
    godName3?: StringNullableFilter<"Shop"> | string | null
    logo?: StringNullableFilter<"Shop"> | string | null
    godImage1?: StringNullableFilter<"Shop"> | string | null
    godImage2?: StringNullableFilter<"Shop"> | string | null
    authorizedSign?: StringNullableFilter<"Shop"> | string | null
    createdAt?: DateTimeFilter<"Shop"> | Date | string
    updatedAt?: DateTimeFilter<"Shop"> | Date | string
    createdBy?: BigIntNullableFilter<"Shop"> | bigint | number | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type ShopOrderByWithRelationInput = {
    id?: SortOrder
    shopName?: SortOrder
    shortName?: SortOrderInput | SortOrder
    address?: SortOrder
    mobile?: SortOrder
    mobile2?: SortOrderInput | SortOrder
    mapUrl?: SortOrderInput | SortOrder
    godName1?: SortOrderInput | SortOrder
    godName2?: SortOrderInput | SortOrder
    godName3?: SortOrderInput | SortOrder
    logo?: SortOrderInput | SortOrder
    godImage1?: SortOrderInput | SortOrder
    godImage2?: SortOrderInput | SortOrder
    authorizedSign?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: ShopOrderByRelevanceInput
  }

  export type ShopWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: ShopWhereInput | ShopWhereInput[]
    OR?: ShopWhereInput[]
    NOT?: ShopWhereInput | ShopWhereInput[]
    shopName?: StringFilter<"Shop"> | string
    shortName?: StringNullableFilter<"Shop"> | string | null
    address?: StringFilter<"Shop"> | string
    mobile?: StringFilter<"Shop"> | string
    mobile2?: StringNullableFilter<"Shop"> | string | null
    mapUrl?: StringNullableFilter<"Shop"> | string | null
    godName1?: StringNullableFilter<"Shop"> | string | null
    godName2?: StringNullableFilter<"Shop"> | string | null
    godName3?: StringNullableFilter<"Shop"> | string | null
    logo?: StringNullableFilter<"Shop"> | string | null
    godImage1?: StringNullableFilter<"Shop"> | string | null
    godImage2?: StringNullableFilter<"Shop"> | string | null
    authorizedSign?: StringNullableFilter<"Shop"> | string | null
    createdAt?: DateTimeFilter<"Shop"> | Date | string
    updatedAt?: DateTimeFilter<"Shop"> | Date | string
    createdBy?: BigIntNullableFilter<"Shop"> | bigint | number | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type ShopOrderByWithAggregationInput = {
    id?: SortOrder
    shopName?: SortOrder
    shortName?: SortOrderInput | SortOrder
    address?: SortOrder
    mobile?: SortOrder
    mobile2?: SortOrderInput | SortOrder
    mapUrl?: SortOrderInput | SortOrder
    godName1?: SortOrderInput | SortOrder
    godName2?: SortOrderInput | SortOrder
    godName3?: SortOrderInput | SortOrder
    logo?: SortOrderInput | SortOrder
    godImage1?: SortOrderInput | SortOrder
    godImage2?: SortOrderInput | SortOrder
    authorizedSign?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: ShopCountOrderByAggregateInput
    _avg?: ShopAvgOrderByAggregateInput
    _max?: ShopMaxOrderByAggregateInput
    _min?: ShopMinOrderByAggregateInput
    _sum?: ShopSumOrderByAggregateInput
  }

  export type ShopScalarWhereWithAggregatesInput = {
    AND?: ShopScalarWhereWithAggregatesInput | ShopScalarWhereWithAggregatesInput[]
    OR?: ShopScalarWhereWithAggregatesInput[]
    NOT?: ShopScalarWhereWithAggregatesInput | ShopScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Shop"> | number
    shopName?: StringWithAggregatesFilter<"Shop"> | string
    shortName?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    address?: StringWithAggregatesFilter<"Shop"> | string
    mobile?: StringWithAggregatesFilter<"Shop"> | string
    mobile2?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    mapUrl?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    godName1?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    godName2?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    godName3?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    logo?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    godImage1?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    godImage2?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    authorizedSign?: StringNullableWithAggregatesFilter<"Shop"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Shop"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Shop"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"Shop"> | bigint | number | null
  }

  export type SaleWhereInput = {
    AND?: SaleWhereInput | SaleWhereInput[]
    OR?: SaleWhereInput[]
    NOT?: SaleWhereInput | SaleWhereInput[]
    id?: BigIntFilter<"Sale"> | bigint | number
    invoiceNo?: StringFilter<"Sale"> | string
    customerId?: BigIntNullableFilter<"Sale"> | bigint | number | null
    walkInName?: StringNullableFilter<"Sale"> | string | null
    walkInMobile?: StringNullableFilter<"Sale"> | string | null
    invoiceDate?: DateTimeFilter<"Sale"> | Date | string
    subTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFilter<"Sale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"Sale"> | string | null
    images?: JsonNullableFilter<"Sale">
    invoiceDownloadToken?: StringFilter<"Sale"> | string
    isWhatsappMessageSent?: BoolFilter<"Sale"> | boolean
    createdAt?: DateTimeFilter<"Sale"> | Date | string
    updatedAt?: DateTimeFilter<"Sale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Sale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Sale"> | bigint | number | null
    customer?: XOR<CustomerNullableScalarRelationFilter, CustomerWhereInput> | null
    items?: SaleItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type SaleOrderByWithRelationInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    customerId?: SortOrderInput | SortOrder
    walkInName?: SortOrderInput | SortOrder
    walkInMobile?: SortOrderInput | SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrderInput | SortOrder
    images?: SortOrderInput | SortOrder
    invoiceDownloadToken?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    customer?: CustomerOrderByWithRelationInput
    items?: SaleItemOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: SaleOrderByRelevanceInput
  }

  export type SaleWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    invoiceNo?: string
    invoiceDownloadToken?: string
    AND?: SaleWhereInput | SaleWhereInput[]
    OR?: SaleWhereInput[]
    NOT?: SaleWhereInput | SaleWhereInput[]
    customerId?: BigIntNullableFilter<"Sale"> | bigint | number | null
    walkInName?: StringNullableFilter<"Sale"> | string | null
    walkInMobile?: StringNullableFilter<"Sale"> | string | null
    invoiceDate?: DateTimeFilter<"Sale"> | Date | string
    subTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFilter<"Sale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"Sale"> | string | null
    images?: JsonNullableFilter<"Sale">
    isWhatsappMessageSent?: BoolFilter<"Sale"> | boolean
    createdAt?: DateTimeFilter<"Sale"> | Date | string
    updatedAt?: DateTimeFilter<"Sale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Sale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Sale"> | bigint | number | null
    customer?: XOR<CustomerNullableScalarRelationFilter, CustomerWhereInput> | null
    items?: SaleItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "invoiceNo" | "invoiceDownloadToken">

  export type SaleOrderByWithAggregationInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    customerId?: SortOrderInput | SortOrder
    walkInName?: SortOrderInput | SortOrder
    walkInMobile?: SortOrderInput | SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrderInput | SortOrder
    images?: SortOrderInput | SortOrder
    invoiceDownloadToken?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: SaleCountOrderByAggregateInput
    _avg?: SaleAvgOrderByAggregateInput
    _max?: SaleMaxOrderByAggregateInput
    _min?: SaleMinOrderByAggregateInput
    _sum?: SaleSumOrderByAggregateInput
  }

  export type SaleScalarWhereWithAggregatesInput = {
    AND?: SaleScalarWhereWithAggregatesInput | SaleScalarWhereWithAggregatesInput[]
    OR?: SaleScalarWhereWithAggregatesInput[]
    NOT?: SaleScalarWhereWithAggregatesInput | SaleScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Sale"> | bigint | number
    invoiceNo?: StringWithAggregatesFilter<"Sale"> | string
    customerId?: BigIntNullableWithAggregatesFilter<"Sale"> | bigint | number | null
    walkInName?: StringNullableWithAggregatesFilter<"Sale"> | string | null
    walkInMobile?: StringNullableWithAggregatesFilter<"Sale"> | string | null
    invoiceDate?: DateTimeWithAggregatesFilter<"Sale"> | Date | string
    subTotal?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalWithAggregatesFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusWithAggregatesFilter<"Sale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableWithAggregatesFilter<"Sale"> | string | null
    images?: JsonNullableWithAggregatesFilter<"Sale">
    invoiceDownloadToken?: StringWithAggregatesFilter<"Sale"> | string
    isWhatsappMessageSent?: BoolWithAggregatesFilter<"Sale"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Sale"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Sale"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"Sale"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"Sale"> | bigint | number | null
  }

  export type SaleItemWhereInput = {
    AND?: SaleItemWhereInput | SaleItemWhereInput[]
    OR?: SaleItemWhereInput[]
    NOT?: SaleItemWhereInput | SaleItemWhereInput[]
    id?: BigIntFilter<"SaleItem"> | bigint | number
    saleId?: BigIntFilter<"SaleItem"> | bigint | number
    purchaseId?: BigIntFilter<"SaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"SaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"SaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"SaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleItem"> | bigint | number | null
    sale?: XOR<SaleScalarRelationFilter, SaleWhereInput>
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    saleReturns?: SaleReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type SaleItemOrderByWithRelationInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    sale?: SaleOrderByWithRelationInput
    purchase?: PurchaseOrderByWithRelationInput
    saleReturns?: SaleReturnOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
  }

  export type SaleItemWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: SaleItemWhereInput | SaleItemWhereInput[]
    OR?: SaleItemWhereInput[]
    NOT?: SaleItemWhereInput | SaleItemWhereInput[]
    saleId?: BigIntFilter<"SaleItem"> | bigint | number
    purchaseId?: BigIntFilter<"SaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"SaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"SaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"SaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleItem"> | bigint | number | null
    sale?: XOR<SaleScalarRelationFilter, SaleWhereInput>
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    saleReturns?: SaleReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type SaleItemOrderByWithAggregationInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: SaleItemCountOrderByAggregateInput
    _avg?: SaleItemAvgOrderByAggregateInput
    _max?: SaleItemMaxOrderByAggregateInput
    _min?: SaleItemMinOrderByAggregateInput
    _sum?: SaleItemSumOrderByAggregateInput
  }

  export type SaleItemScalarWhereWithAggregatesInput = {
    AND?: SaleItemScalarWhereWithAggregatesInput | SaleItemScalarWhereWithAggregatesInput[]
    OR?: SaleItemScalarWhereWithAggregatesInput[]
    NOT?: SaleItemScalarWhereWithAggregatesInput | SaleItemScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"SaleItem"> | bigint | number
    saleId?: BigIntWithAggregatesFilter<"SaleItem"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"SaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitWithAggregatesFilter<"SaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalWithAggregatesFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableWithAggregatesFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalWithAggregatesFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalWithAggregatesFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalWithAggregatesFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeWithAggregatesFilter<"SaleItem"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"SaleItem"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"SaleItem"> | bigint | number | null
  }

  export type CustomerReceiptWhereInput = {
    AND?: CustomerReceiptWhereInput | CustomerReceiptWhereInput[]
    OR?: CustomerReceiptWhereInput[]
    NOT?: CustomerReceiptWhereInput | CustomerReceiptWhereInput[]
    id?: BigIntFilter<"CustomerReceipt"> | bigint | number
    customerId?: BigIntFilter<"CustomerReceipt"> | bigint | number
    receiptDate?: DateTimeFilter<"CustomerReceipt"> | Date | string
    amount?: DecimalFilter<"CustomerReceipt"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"CustomerReceipt"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"CustomerReceipt"> | string | null
    remarks?: StringNullableFilter<"CustomerReceipt"> | string | null
    isWhatsappMessageSent?: BoolFilter<"CustomerReceipt"> | boolean
    createdAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    updatedAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    deletedAt?: DateTimeNullableFilter<"CustomerReceipt"> | Date | string | null
    createdBy?: BigIntNullableFilter<"CustomerReceipt"> | bigint | number | null
    customer?: XOR<CustomerScalarRelationFilter, CustomerWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type CustomerReceiptOrderByWithRelationInput = {
    id?: SortOrder
    customerId?: SortOrder
    receiptDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    customer?: CustomerOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: CustomerReceiptOrderByRelevanceInput
  }

  export type CustomerReceiptWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: CustomerReceiptWhereInput | CustomerReceiptWhereInput[]
    OR?: CustomerReceiptWhereInput[]
    NOT?: CustomerReceiptWhereInput | CustomerReceiptWhereInput[]
    customerId?: BigIntFilter<"CustomerReceipt"> | bigint | number
    receiptDate?: DateTimeFilter<"CustomerReceipt"> | Date | string
    amount?: DecimalFilter<"CustomerReceipt"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"CustomerReceipt"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"CustomerReceipt"> | string | null
    remarks?: StringNullableFilter<"CustomerReceipt"> | string | null
    isWhatsappMessageSent?: BoolFilter<"CustomerReceipt"> | boolean
    createdAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    updatedAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    deletedAt?: DateTimeNullableFilter<"CustomerReceipt"> | Date | string | null
    createdBy?: BigIntNullableFilter<"CustomerReceipt"> | bigint | number | null
    customer?: XOR<CustomerScalarRelationFilter, CustomerWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type CustomerReceiptOrderByWithAggregationInput = {
    id?: SortOrder
    customerId?: SortOrder
    receiptDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: CustomerReceiptCountOrderByAggregateInput
    _avg?: CustomerReceiptAvgOrderByAggregateInput
    _max?: CustomerReceiptMaxOrderByAggregateInput
    _min?: CustomerReceiptMinOrderByAggregateInput
    _sum?: CustomerReceiptSumOrderByAggregateInput
  }

  export type CustomerReceiptScalarWhereWithAggregatesInput = {
    AND?: CustomerReceiptScalarWhereWithAggregatesInput | CustomerReceiptScalarWhereWithAggregatesInput[]
    OR?: CustomerReceiptScalarWhereWithAggregatesInput[]
    NOT?: CustomerReceiptScalarWhereWithAggregatesInput | CustomerReceiptScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"CustomerReceipt"> | bigint | number
    customerId?: BigIntWithAggregatesFilter<"CustomerReceipt"> | bigint | number
    receiptDate?: DateTimeWithAggregatesFilter<"CustomerReceipt"> | Date | string
    amount?: DecimalWithAggregatesFilter<"CustomerReceipt"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeWithAggregatesFilter<"CustomerReceipt"> | $Enums.PaymentMode
    referenceNo?: StringNullableWithAggregatesFilter<"CustomerReceipt"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"CustomerReceipt"> | string | null
    isWhatsappMessageSent?: BoolWithAggregatesFilter<"CustomerReceipt"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"CustomerReceipt"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"CustomerReceipt"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"CustomerReceipt"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"CustomerReceipt"> | bigint | number | null
  }

  export type ExpenseWhereInput = {
    AND?: ExpenseWhereInput | ExpenseWhereInput[]
    OR?: ExpenseWhereInput[]
    NOT?: ExpenseWhereInput | ExpenseWhereInput[]
    id?: IntFilter<"Expense"> | number
    expenseDate?: DateTimeFilter<"Expense"> | Date | string
    category?: StringFilter<"Expense"> | string
    amount?: DecimalFilter<"Expense"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"Expense"> | $Enums.PaymentMode
    remarks?: StringNullableFilter<"Expense"> | string | null
    purchaseId?: BigIntNullableFilter<"Expense"> | bigint | number | null
    createdAt?: DateTimeFilter<"Expense"> | Date | string
    updatedAt?: DateTimeFilter<"Expense"> | Date | string
    createdBy?: BigIntNullableFilter<"Expense"> | bigint | number | null
    purchase?: XOR<PurchaseNullableScalarRelationFilter, PurchaseWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type ExpenseOrderByWithRelationInput = {
    id?: SortOrder
    expenseDate?: SortOrder
    category?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrderInput | SortOrder
    purchaseId?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: ExpenseOrderByRelevanceInput
  }

  export type ExpenseWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: ExpenseWhereInput | ExpenseWhereInput[]
    OR?: ExpenseWhereInput[]
    NOT?: ExpenseWhereInput | ExpenseWhereInput[]
    expenseDate?: DateTimeFilter<"Expense"> | Date | string
    category?: StringFilter<"Expense"> | string
    amount?: DecimalFilter<"Expense"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"Expense"> | $Enums.PaymentMode
    remarks?: StringNullableFilter<"Expense"> | string | null
    purchaseId?: BigIntNullableFilter<"Expense"> | bigint | number | null
    createdAt?: DateTimeFilter<"Expense"> | Date | string
    updatedAt?: DateTimeFilter<"Expense"> | Date | string
    createdBy?: BigIntNullableFilter<"Expense"> | bigint | number | null
    purchase?: XOR<PurchaseNullableScalarRelationFilter, PurchaseWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type ExpenseOrderByWithAggregationInput = {
    id?: SortOrder
    expenseDate?: SortOrder
    category?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrderInput | SortOrder
    purchaseId?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: ExpenseCountOrderByAggregateInput
    _avg?: ExpenseAvgOrderByAggregateInput
    _max?: ExpenseMaxOrderByAggregateInput
    _min?: ExpenseMinOrderByAggregateInput
    _sum?: ExpenseSumOrderByAggregateInput
  }

  export type ExpenseScalarWhereWithAggregatesInput = {
    AND?: ExpenseScalarWhereWithAggregatesInput | ExpenseScalarWhereWithAggregatesInput[]
    OR?: ExpenseScalarWhereWithAggregatesInput[]
    NOT?: ExpenseScalarWhereWithAggregatesInput | ExpenseScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Expense"> | number
    expenseDate?: DateTimeWithAggregatesFilter<"Expense"> | Date | string
    category?: StringWithAggregatesFilter<"Expense"> | string
    amount?: DecimalWithAggregatesFilter<"Expense"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeWithAggregatesFilter<"Expense"> | $Enums.PaymentMode
    remarks?: StringNullableWithAggregatesFilter<"Expense"> | string | null
    purchaseId?: BigIntNullableWithAggregatesFilter<"Expense"> | bigint | number | null
    createdAt?: DateTimeWithAggregatesFilter<"Expense"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Expense"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"Expense"> | bigint | number | null
  }

  export type ForgotPasswordWhereInput = {
    AND?: ForgotPasswordWhereInput | ForgotPasswordWhereInput[]
    OR?: ForgotPasswordWhereInput[]
    NOT?: ForgotPasswordWhereInput | ForgotPasswordWhereInput[]
    userId?: BigIntFilter<"ForgotPassword"> | bigint | number
    otp?: StringFilter<"ForgotPassword"> | string
    expiresAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    attempts?: IntFilter<"ForgotPassword"> | number
    createdAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    updatedAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    user?: XOR<UserScalarRelationFilter, UserWhereInput>
  }

  export type ForgotPasswordOrderByWithRelationInput = {
    userId?: SortOrder
    otp?: SortOrder
    expiresAt?: SortOrder
    attempts?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    user?: UserOrderByWithRelationInput
    _relevance?: ForgotPasswordOrderByRelevanceInput
  }

  export type ForgotPasswordWhereUniqueInput = Prisma.AtLeast<{
    userId?: bigint | number
    AND?: ForgotPasswordWhereInput | ForgotPasswordWhereInput[]
    OR?: ForgotPasswordWhereInput[]
    NOT?: ForgotPasswordWhereInput | ForgotPasswordWhereInput[]
    otp?: StringFilter<"ForgotPassword"> | string
    expiresAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    attempts?: IntFilter<"ForgotPassword"> | number
    createdAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    updatedAt?: DateTimeFilter<"ForgotPassword"> | Date | string
    user?: XOR<UserScalarRelationFilter, UserWhereInput>
  }, "userId">

  export type ForgotPasswordOrderByWithAggregationInput = {
    userId?: SortOrder
    otp?: SortOrder
    expiresAt?: SortOrder
    attempts?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: ForgotPasswordCountOrderByAggregateInput
    _avg?: ForgotPasswordAvgOrderByAggregateInput
    _max?: ForgotPasswordMaxOrderByAggregateInput
    _min?: ForgotPasswordMinOrderByAggregateInput
    _sum?: ForgotPasswordSumOrderByAggregateInput
  }

  export type ForgotPasswordScalarWhereWithAggregatesInput = {
    AND?: ForgotPasswordScalarWhereWithAggregatesInput | ForgotPasswordScalarWhereWithAggregatesInput[]
    OR?: ForgotPasswordScalarWhereWithAggregatesInput[]
    NOT?: ForgotPasswordScalarWhereWithAggregatesInput | ForgotPasswordScalarWhereWithAggregatesInput[]
    userId?: BigIntWithAggregatesFilter<"ForgotPassword"> | bigint | number
    otp?: StringWithAggregatesFilter<"ForgotPassword"> | string
    expiresAt?: DateTimeWithAggregatesFilter<"ForgotPassword"> | Date | string
    attempts?: IntWithAggregatesFilter<"ForgotPassword"> | number
    createdAt?: DateTimeWithAggregatesFilter<"ForgotPassword"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"ForgotPassword"> | Date | string
  }

  export type StockSpoilageWhereInput = {
    AND?: StockSpoilageWhereInput | StockSpoilageWhereInput[]
    OR?: StockSpoilageWhereInput[]
    NOT?: StockSpoilageWhereInput | StockSpoilageWhereInput[]
    id?: BigIntFilter<"StockSpoilage"> | bigint | number
    purchaseId?: BigIntFilter<"StockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"StockSpoilage"> | Date | string
    quantity?: DecimalFilter<"StockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"StockSpoilage"> | string | null
    remarks?: StringNullableFilter<"StockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"StockSpoilage"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type StockSpoilageOrderByWithRelationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: StockSpoilageOrderByRelevanceInput
  }

  export type StockSpoilageWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: StockSpoilageWhereInput | StockSpoilageWhereInput[]
    OR?: StockSpoilageWhereInput[]
    NOT?: StockSpoilageWhereInput | StockSpoilageWhereInput[]
    purchaseId?: BigIntFilter<"StockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"StockSpoilage"> | Date | string
    quantity?: DecimalFilter<"StockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"StockSpoilage"> | string | null
    remarks?: StringNullableFilter<"StockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"StockSpoilage"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type StockSpoilageOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: StockSpoilageCountOrderByAggregateInput
    _avg?: StockSpoilageAvgOrderByAggregateInput
    _max?: StockSpoilageMaxOrderByAggregateInput
    _min?: StockSpoilageMinOrderByAggregateInput
    _sum?: StockSpoilageSumOrderByAggregateInput
  }

  export type StockSpoilageScalarWhereWithAggregatesInput = {
    AND?: StockSpoilageScalarWhereWithAggregatesInput | StockSpoilageScalarWhereWithAggregatesInput[]
    OR?: StockSpoilageScalarWhereWithAggregatesInput[]
    NOT?: StockSpoilageScalarWhereWithAggregatesInput | StockSpoilageScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"StockSpoilage"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"StockSpoilage"> | bigint | number
    spoilageDate?: DateTimeWithAggregatesFilter<"StockSpoilage"> | Date | string
    quantity?: DecimalWithAggregatesFilter<"StockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableWithAggregatesFilter<"StockSpoilage"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"StockSpoilage"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"StockSpoilage"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"StockSpoilage"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"StockSpoilage"> | bigint | number | null
  }

  export type SaleReturnWhereInput = {
    AND?: SaleReturnWhereInput | SaleReturnWhereInput[]
    OR?: SaleReturnWhereInput[]
    NOT?: SaleReturnWhereInput | SaleReturnWhereInput[]
    id?: BigIntFilter<"SaleReturn"> | bigint | number
    saleItemId?: BigIntFilter<"SaleReturn"> | bigint | number
    purchaseId?: BigIntFilter<"SaleReturn"> | bigint | number
    returnDate?: DateTimeFilter<"SaleReturn"> | Date | string
    quantity?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"SaleReturn"> | string | null
    remarks?: StringNullableFilter<"SaleReturn"> | string | null
    createdAt?: DateTimeFilter<"SaleReturn"> | Date | string
    updatedAt?: DateTimeFilter<"SaleReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleReturn"> | bigint | number | null
    saleItem?: XOR<SaleItemScalarRelationFilter, SaleItemWhereInput>
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type SaleReturnOrderByWithRelationInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    saleItem?: SaleItemOrderByWithRelationInput
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: SaleReturnOrderByRelevanceInput
  }

  export type SaleReturnWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: SaleReturnWhereInput | SaleReturnWhereInput[]
    OR?: SaleReturnWhereInput[]
    NOT?: SaleReturnWhereInput | SaleReturnWhereInput[]
    saleItemId?: BigIntFilter<"SaleReturn"> | bigint | number
    purchaseId?: BigIntFilter<"SaleReturn"> | bigint | number
    returnDate?: DateTimeFilter<"SaleReturn"> | Date | string
    quantity?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"SaleReturn"> | string | null
    remarks?: StringNullableFilter<"SaleReturn"> | string | null
    createdAt?: DateTimeFilter<"SaleReturn"> | Date | string
    updatedAt?: DateTimeFilter<"SaleReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleReturn"> | bigint | number | null
    saleItem?: XOR<SaleItemScalarRelationFilter, SaleItemWhereInput>
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type SaleReturnOrderByWithAggregationInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: SaleReturnCountOrderByAggregateInput
    _avg?: SaleReturnAvgOrderByAggregateInput
    _max?: SaleReturnMaxOrderByAggregateInput
    _min?: SaleReturnMinOrderByAggregateInput
    _sum?: SaleReturnSumOrderByAggregateInput
  }

  export type SaleReturnScalarWhereWithAggregatesInput = {
    AND?: SaleReturnScalarWhereWithAggregatesInput | SaleReturnScalarWhereWithAggregatesInput[]
    OR?: SaleReturnScalarWhereWithAggregatesInput[]
    NOT?: SaleReturnScalarWhereWithAggregatesInput | SaleReturnScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"SaleReturn"> | bigint | number
    saleItemId?: BigIntWithAggregatesFilter<"SaleReturn"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"SaleReturn"> | bigint | number
    returnDate?: DateTimeWithAggregatesFilter<"SaleReturn"> | Date | string
    quantity?: DecimalWithAggregatesFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalWithAggregatesFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableWithAggregatesFilter<"SaleReturn"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"SaleReturn"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"SaleReturn"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"SaleReturn"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"SaleReturn"> | bigint | number | null
  }

  export type ArrivalSettlementWhereInput = {
    AND?: ArrivalSettlementWhereInput | ArrivalSettlementWhereInput[]
    OR?: ArrivalSettlementWhereInput[]
    NOT?: ArrivalSettlementWhereInput | ArrivalSettlementWhereInput[]
    id?: BigIntFilter<"ArrivalSettlement"> | bigint | number
    purchaseId?: BigIntFilter<"ArrivalSettlement"> | bigint | number
    settlementNo?: StringFilter<"ArrivalSettlement"> | string
    settlementDate?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    totalWeightSold?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFilter<"ArrivalSettlement"> | $Enums.SettlementStatus
    paymentMode?: EnumPaymentModeNullableFilter<"ArrivalSettlement"> | $Enums.PaymentMode | null
    remarks?: StringNullableFilter<"ArrivalSettlement"> | string | null
    createdAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalSettlement"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type ArrivalSettlementOrderByWithRelationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    settlementNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    status?: SortOrder
    paymentMode?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: ArrivalSettlementOrderByRelevanceInput
  }

  export type ArrivalSettlementWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    purchaseId?: bigint | number
    settlementNo?: string
    AND?: ArrivalSettlementWhereInput | ArrivalSettlementWhereInput[]
    OR?: ArrivalSettlementWhereInput[]
    NOT?: ArrivalSettlementWhereInput | ArrivalSettlementWhereInput[]
    settlementDate?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    totalWeightSold?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFilter<"ArrivalSettlement"> | $Enums.SettlementStatus
    paymentMode?: EnumPaymentModeNullableFilter<"ArrivalSettlement"> | $Enums.PaymentMode | null
    remarks?: StringNullableFilter<"ArrivalSettlement"> | string | null
    createdAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalSettlement"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "purchaseId" | "settlementNo">

  export type ArrivalSettlementOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    settlementNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    status?: SortOrder
    paymentMode?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: ArrivalSettlementCountOrderByAggregateInput
    _avg?: ArrivalSettlementAvgOrderByAggregateInput
    _max?: ArrivalSettlementMaxOrderByAggregateInput
    _min?: ArrivalSettlementMinOrderByAggregateInput
    _sum?: ArrivalSettlementSumOrderByAggregateInput
  }

  export type ArrivalSettlementScalarWhereWithAggregatesInput = {
    AND?: ArrivalSettlementScalarWhereWithAggregatesInput | ArrivalSettlementScalarWhereWithAggregatesInput[]
    OR?: ArrivalSettlementScalarWhereWithAggregatesInput[]
    NOT?: ArrivalSettlementScalarWhereWithAggregatesInput | ArrivalSettlementScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"ArrivalSettlement"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"ArrivalSettlement"> | bigint | number
    settlementNo?: StringWithAggregatesFilter<"ArrivalSettlement"> | string
    settlementDate?: DateTimeWithAggregatesFilter<"ArrivalSettlement"> | Date | string
    totalWeightSold?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalWithAggregatesFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusWithAggregatesFilter<"ArrivalSettlement"> | $Enums.SettlementStatus
    paymentMode?: EnumPaymentModeNullableWithAggregatesFilter<"ArrivalSettlement"> | $Enums.PaymentMode | null
    remarks?: StringNullableWithAggregatesFilter<"ArrivalSettlement"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"ArrivalSettlement"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"ArrivalSettlement"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"ArrivalSettlement"> | bigint | number | null
  }

  export type ArrivalCustomPattiWhereInput = {
    AND?: ArrivalCustomPattiWhereInput | ArrivalCustomPattiWhereInput[]
    OR?: ArrivalCustomPattiWhereInput[]
    NOT?: ArrivalCustomPattiWhereInput | ArrivalCustomPattiWhereInput[]
    id?: BigIntFilter<"ArrivalCustomPatti"> | bigint | number
    purchaseId?: BigIntFilter<"ArrivalCustomPatti"> | bigint | number
    pattiNo?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    settlementDate?: DateTimeNullableFilter<"ArrivalCustomPatti"> | Date | string | null
    items?: JsonFilter<"ArrivalCustomPatti">
    totalWeightSold?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    createdAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalCustomPatti"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type ArrivalCustomPattiOrderByWithRelationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    pattiNo?: SortOrderInput | SortOrder
    settlementDate?: SortOrderInput | SortOrder
    items?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: ArrivalCustomPattiOrderByRelevanceInput
  }

  export type ArrivalCustomPattiWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    purchaseId?: bigint | number
    AND?: ArrivalCustomPattiWhereInput | ArrivalCustomPattiWhereInput[]
    OR?: ArrivalCustomPattiWhereInput[]
    NOT?: ArrivalCustomPattiWhereInput | ArrivalCustomPattiWhereInput[]
    pattiNo?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    settlementDate?: DateTimeNullableFilter<"ArrivalCustomPatti"> | Date | string | null
    items?: JsonFilter<"ArrivalCustomPatti">
    totalWeightSold?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    createdAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalCustomPatti"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "purchaseId">

  export type ArrivalCustomPattiOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    pattiNo?: SortOrderInput | SortOrder
    settlementDate?: SortOrderInput | SortOrder
    items?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: ArrivalCustomPattiCountOrderByAggregateInput
    _avg?: ArrivalCustomPattiAvgOrderByAggregateInput
    _max?: ArrivalCustomPattiMaxOrderByAggregateInput
    _min?: ArrivalCustomPattiMinOrderByAggregateInput
    _sum?: ArrivalCustomPattiSumOrderByAggregateInput
  }

  export type ArrivalCustomPattiScalarWhereWithAggregatesInput = {
    AND?: ArrivalCustomPattiScalarWhereWithAggregatesInput | ArrivalCustomPattiScalarWhereWithAggregatesInput[]
    OR?: ArrivalCustomPattiScalarWhereWithAggregatesInput[]
    NOT?: ArrivalCustomPattiScalarWhereWithAggregatesInput | ArrivalCustomPattiScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"ArrivalCustomPatti"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"ArrivalCustomPatti"> | bigint | number
    pattiNo?: StringNullableWithAggregatesFilter<"ArrivalCustomPatti"> | string | null
    settlementDate?: DateTimeNullableWithAggregatesFilter<"ArrivalCustomPatti"> | Date | string | null
    items?: JsonWithAggregatesFilter<"ArrivalCustomPatti">
    totalWeightSold?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalWithAggregatesFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableWithAggregatesFilter<"ArrivalCustomPatti"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"ArrivalCustomPatti"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"ArrivalCustomPatti"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"ArrivalCustomPatti"> | bigint | number | null
  }

  export type QuotationWhereInput = {
    AND?: QuotationWhereInput | QuotationWhereInput[]
    OR?: QuotationWhereInput[]
    NOT?: QuotationWhereInput | QuotationWhereInput[]
    id?: BigIntFilter<"Quotation"> | bigint | number
    quotationNo?: StringFilter<"Quotation"> | string
    customerId?: BigIntNullableFilter<"Quotation"> | bigint | number | null
    customerName?: StringFilter<"Quotation"> | string
    quotationDate?: DateTimeFilter<"Quotation"> | Date | string
    amount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"Quotation"> | Date | string
    updatedAt?: DateTimeFilter<"Quotation"> | Date | string
    createdBy?: BigIntNullableFilter<"Quotation"> | bigint | number | null
    customer?: XOR<CustomerNullableScalarRelationFilter, CustomerWhereInput> | null
    items?: QuotationItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type QuotationOrderByWithRelationInput = {
    id?: SortOrder
    quotationNo?: SortOrder
    customerId?: SortOrderInput | SortOrder
    customerName?: SortOrder
    quotationDate?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    customer?: CustomerOrderByWithRelationInput
    items?: QuotationItemOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: QuotationOrderByRelevanceInput
  }

  export type QuotationWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    quotationNo?: string
    AND?: QuotationWhereInput | QuotationWhereInput[]
    OR?: QuotationWhereInput[]
    NOT?: QuotationWhereInput | QuotationWhereInput[]
    customerId?: BigIntNullableFilter<"Quotation"> | bigint | number | null
    customerName?: StringFilter<"Quotation"> | string
    quotationDate?: DateTimeFilter<"Quotation"> | Date | string
    amount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"Quotation"> | Date | string
    updatedAt?: DateTimeFilter<"Quotation"> | Date | string
    createdBy?: BigIntNullableFilter<"Quotation"> | bigint | number | null
    customer?: XOR<CustomerNullableScalarRelationFilter, CustomerWhereInput> | null
    items?: QuotationItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "quotationNo">

  export type QuotationOrderByWithAggregationInput = {
    id?: SortOrder
    quotationNo?: SortOrder
    customerId?: SortOrderInput | SortOrder
    customerName?: SortOrder
    quotationDate?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: QuotationCountOrderByAggregateInput
    _avg?: QuotationAvgOrderByAggregateInput
    _max?: QuotationMaxOrderByAggregateInput
    _min?: QuotationMinOrderByAggregateInput
    _sum?: QuotationSumOrderByAggregateInput
  }

  export type QuotationScalarWhereWithAggregatesInput = {
    AND?: QuotationScalarWhereWithAggregatesInput | QuotationScalarWhereWithAggregatesInput[]
    OR?: QuotationScalarWhereWithAggregatesInput[]
    NOT?: QuotationScalarWhereWithAggregatesInput | QuotationScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Quotation"> | bigint | number
    quotationNo?: StringWithAggregatesFilter<"Quotation"> | string
    customerId?: BigIntNullableWithAggregatesFilter<"Quotation"> | bigint | number | null
    customerName?: StringWithAggregatesFilter<"Quotation"> | string
    quotationDate?: DateTimeWithAggregatesFilter<"Quotation"> | Date | string
    amount?: DecimalWithAggregatesFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalWithAggregatesFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalWithAggregatesFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalWithAggregatesFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeWithAggregatesFilter<"Quotation"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Quotation"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"Quotation"> | bigint | number | null
  }

  export type QuotationItemWhereInput = {
    AND?: QuotationItemWhereInput | QuotationItemWhereInput[]
    OR?: QuotationItemWhereInput[]
    NOT?: QuotationItemWhereInput | QuotationItemWhereInput[]
    id?: BigIntFilter<"QuotationItem"> | bigint | number
    quotationId?: BigIntFilter<"QuotationItem"> | bigint | number
    vegetableId?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
    vegName?: StringFilter<"QuotationItem"> | string
    hsnCode?: StringNullableFilter<"QuotationItem"> | string | null
    quantity?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    unit?: StringFilter<"QuotationItem"> | string
    price?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    amount?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"QuotationItem"> | Date | string
    updatedAt?: DateTimeFilter<"QuotationItem"> | Date | string
    createdBy?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
    quotation?: XOR<QuotationScalarRelationFilter, QuotationWhereInput>
    vegetable?: XOR<VegetableNullableScalarRelationFilter, VegetableWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type QuotationItemOrderByWithRelationInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrderInput | SortOrder
    vegName?: SortOrder
    hsnCode?: SortOrderInput | SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    quotation?: QuotationOrderByWithRelationInput
    vegetable?: VegetableOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: QuotationItemOrderByRelevanceInput
  }

  export type QuotationItemWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: QuotationItemWhereInput | QuotationItemWhereInput[]
    OR?: QuotationItemWhereInput[]
    NOT?: QuotationItemWhereInput | QuotationItemWhereInput[]
    quotationId?: BigIntFilter<"QuotationItem"> | bigint | number
    vegetableId?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
    vegName?: StringFilter<"QuotationItem"> | string
    hsnCode?: StringNullableFilter<"QuotationItem"> | string | null
    quantity?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    unit?: StringFilter<"QuotationItem"> | string
    price?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    amount?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"QuotationItem"> | Date | string
    updatedAt?: DateTimeFilter<"QuotationItem"> | Date | string
    createdBy?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
    quotation?: XOR<QuotationScalarRelationFilter, QuotationWhereInput>
    vegetable?: XOR<VegetableNullableScalarRelationFilter, VegetableWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type QuotationItemOrderByWithAggregationInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrderInput | SortOrder
    vegName?: SortOrder
    hsnCode?: SortOrderInput | SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: QuotationItemCountOrderByAggregateInput
    _avg?: QuotationItemAvgOrderByAggregateInput
    _max?: QuotationItemMaxOrderByAggregateInput
    _min?: QuotationItemMinOrderByAggregateInput
    _sum?: QuotationItemSumOrderByAggregateInput
  }

  export type QuotationItemScalarWhereWithAggregatesInput = {
    AND?: QuotationItemScalarWhereWithAggregatesInput | QuotationItemScalarWhereWithAggregatesInput[]
    OR?: QuotationItemScalarWhereWithAggregatesInput[]
    NOT?: QuotationItemScalarWhereWithAggregatesInput | QuotationItemScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"QuotationItem"> | bigint | number
    quotationId?: BigIntWithAggregatesFilter<"QuotationItem"> | bigint | number
    vegetableId?: BigIntNullableWithAggregatesFilter<"QuotationItem"> | bigint | number | null
    vegName?: StringWithAggregatesFilter<"QuotationItem"> | string
    hsnCode?: StringNullableWithAggregatesFilter<"QuotationItem"> | string | null
    quantity?: DecimalWithAggregatesFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    unit?: StringWithAggregatesFilter<"QuotationItem"> | string
    price?: DecimalWithAggregatesFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    amount?: DecimalWithAggregatesFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeWithAggregatesFilter<"QuotationItem"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"QuotationItem"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"QuotationItem"> | bigint | number | null
  }

  export type PurchaseReturnWhereInput = {
    AND?: PurchaseReturnWhereInput | PurchaseReturnWhereInput[]
    OR?: PurchaseReturnWhereInput[]
    NOT?: PurchaseReturnWhereInput | PurchaseReturnWhereInput[]
    id?: BigIntFilter<"PurchaseReturn"> | bigint | number
    purchaseId?: BigIntFilter<"PurchaseReturn"> | bigint | number
    returnDate?: DateTimeFilter<"PurchaseReturn"> | Date | string
    quantity?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"PurchaseReturn"> | string | null
    remarks?: StringNullableFilter<"PurchaseReturn"> | string | null
    createdAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    updatedAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"PurchaseReturn"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type PurchaseReturnOrderByWithRelationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    returnAmount?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: PurchaseReturnOrderByRelevanceInput
  }

  export type PurchaseReturnWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: PurchaseReturnWhereInput | PurchaseReturnWhereInput[]
    OR?: PurchaseReturnWhereInput[]
    NOT?: PurchaseReturnWhereInput | PurchaseReturnWhereInput[]
    purchaseId?: BigIntFilter<"PurchaseReturn"> | bigint | number
    returnDate?: DateTimeFilter<"PurchaseReturn"> | Date | string
    quantity?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"PurchaseReturn"> | string | null
    remarks?: StringNullableFilter<"PurchaseReturn"> | string | null
    createdAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    updatedAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"PurchaseReturn"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type PurchaseReturnOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    returnAmount?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: PurchaseReturnCountOrderByAggregateInput
    _avg?: PurchaseReturnAvgOrderByAggregateInput
    _max?: PurchaseReturnMaxOrderByAggregateInput
    _min?: PurchaseReturnMinOrderByAggregateInput
    _sum?: PurchaseReturnSumOrderByAggregateInput
  }

  export type PurchaseReturnScalarWhereWithAggregatesInput = {
    AND?: PurchaseReturnScalarWhereWithAggregatesInput | PurchaseReturnScalarWhereWithAggregatesInput[]
    OR?: PurchaseReturnScalarWhereWithAggregatesInput[]
    NOT?: PurchaseReturnScalarWhereWithAggregatesInput | PurchaseReturnScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"PurchaseReturn"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"PurchaseReturn"> | bigint | number
    returnDate?: DateTimeWithAggregatesFilter<"PurchaseReturn"> | Date | string
    quantity?: DecimalWithAggregatesFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableWithAggregatesFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalWithAggregatesFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableWithAggregatesFilter<"PurchaseReturn"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"PurchaseReturn"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"PurchaseReturn"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"PurchaseReturn"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"PurchaseReturn"> | bigint | number | null
  }

  export type RetailStockWhereInput = {
    AND?: RetailStockWhereInput | RetailStockWhereInput[]
    OR?: RetailStockWhereInput[]
    NOT?: RetailStockWhereInput | RetailStockWhereInput[]
    id?: BigIntFilter<"RetailStock"> | bigint | number
    purchaseId?: BigIntFilter<"RetailStock"> | bigint | number
    lotNo?: StringFilter<"RetailStock"> | string
    allocatedUnit?: EnumPurchaseUnitFilter<"RetailStock"> | $Enums.PurchaseUnit
    allocatedQty?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFilter<"RetailStock"> | Date | string
    remarks?: StringNullableFilter<"RetailStock"> | string | null
    createdAt?: DateTimeFilter<"RetailStock"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStock"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailStock"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailStock"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    retailSaleItems?: RetailSaleItemListRelationFilter
    retailStockSpoilages?: RetailStockSpoilageListRelationFilter
    retailStockReturns?: RetailStockReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type RetailStockOrderByWithRelationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    lotNo?: SortOrder
    allocatedUnit?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    allocationDate?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    purchase?: PurchaseOrderByWithRelationInput
    retailSaleItems?: RetailSaleItemOrderByRelationAggregateInput
    retailStockSpoilages?: RetailStockSpoilageOrderByRelationAggregateInput
    retailStockReturns?: RetailStockReturnOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: RetailStockOrderByRelevanceInput
  }

  export type RetailStockWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: RetailStockWhereInput | RetailStockWhereInput[]
    OR?: RetailStockWhereInput[]
    NOT?: RetailStockWhereInput | RetailStockWhereInput[]
    purchaseId?: BigIntFilter<"RetailStock"> | bigint | number
    lotNo?: StringFilter<"RetailStock"> | string
    allocatedUnit?: EnumPurchaseUnitFilter<"RetailStock"> | $Enums.PurchaseUnit
    allocatedQty?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFilter<"RetailStock"> | Date | string
    remarks?: StringNullableFilter<"RetailStock"> | string | null
    createdAt?: DateTimeFilter<"RetailStock"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStock"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailStock"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailStock"> | bigint | number | null
    purchase?: XOR<PurchaseScalarRelationFilter, PurchaseWhereInput>
    retailSaleItems?: RetailSaleItemListRelationFilter
    retailStockSpoilages?: RetailStockSpoilageListRelationFilter
    retailStockReturns?: RetailStockReturnListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type RetailStockOrderByWithAggregationInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    lotNo?: SortOrder
    allocatedUnit?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    allocationDate?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: RetailStockCountOrderByAggregateInput
    _avg?: RetailStockAvgOrderByAggregateInput
    _max?: RetailStockMaxOrderByAggregateInput
    _min?: RetailStockMinOrderByAggregateInput
    _sum?: RetailStockSumOrderByAggregateInput
  }

  export type RetailStockScalarWhereWithAggregatesInput = {
    AND?: RetailStockScalarWhereWithAggregatesInput | RetailStockScalarWhereWithAggregatesInput[]
    OR?: RetailStockScalarWhereWithAggregatesInput[]
    NOT?: RetailStockScalarWhereWithAggregatesInput | RetailStockScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"RetailStock"> | bigint | number
    purchaseId?: BigIntWithAggregatesFilter<"RetailStock"> | bigint | number
    lotNo?: StringWithAggregatesFilter<"RetailStock"> | string
    allocatedUnit?: EnumPurchaseUnitWithAggregatesFilter<"RetailStock"> | $Enums.PurchaseUnit
    allocatedQty?: DecimalWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    quantity?: DecimalWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalNullableWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalWithAggregatesFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeWithAggregatesFilter<"RetailStock"> | Date | string
    remarks?: StringNullableWithAggregatesFilter<"RetailStock"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"RetailStock"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"RetailStock"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"RetailStock"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"RetailStock"> | bigint | number | null
  }

  export type RetailStockReturnWhereInput = {
    AND?: RetailStockReturnWhereInput | RetailStockReturnWhereInput[]
    OR?: RetailStockReturnWhereInput[]
    NOT?: RetailStockReturnWhereInput | RetailStockReturnWhereInput[]
    id?: BigIntFilter<"RetailStockReturn"> | bigint | number
    retailStockId?: BigIntFilter<"RetailStockReturn"> | bigint | number
    returnDate?: DateTimeFilter<"RetailStockReturn"> | Date | string
    quantity?: DecimalFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string | null
    reason?: StringNullableFilter<"RetailStockReturn"> | string | null
    remarks?: StringNullableFilter<"RetailStockReturn"> | string | null
    createdAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockReturn"> | bigint | number | null
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type RetailStockReturnOrderByWithRelationInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    retailStock?: RetailStockOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: RetailStockReturnOrderByRelevanceInput
  }

  export type RetailStockReturnWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: RetailStockReturnWhereInput | RetailStockReturnWhereInput[]
    OR?: RetailStockReturnWhereInput[]
    NOT?: RetailStockReturnWhereInput | RetailStockReturnWhereInput[]
    retailStockId?: BigIntFilter<"RetailStockReturn"> | bigint | number
    returnDate?: DateTimeFilter<"RetailStockReturn"> | Date | string
    quantity?: DecimalFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string | null
    reason?: StringNullableFilter<"RetailStockReturn"> | string | null
    remarks?: StringNullableFilter<"RetailStockReturn"> | string | null
    createdAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockReturn"> | bigint | number | null
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type RetailStockReturnOrderByWithAggregationInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: RetailStockReturnCountOrderByAggregateInput
    _avg?: RetailStockReturnAvgOrderByAggregateInput
    _max?: RetailStockReturnMaxOrderByAggregateInput
    _min?: RetailStockReturnMinOrderByAggregateInput
    _sum?: RetailStockReturnSumOrderByAggregateInput
  }

  export type RetailStockReturnScalarWhereWithAggregatesInput = {
    AND?: RetailStockReturnScalarWhereWithAggregatesInput | RetailStockReturnScalarWhereWithAggregatesInput[]
    OR?: RetailStockReturnScalarWhereWithAggregatesInput[]
    NOT?: RetailStockReturnScalarWhereWithAggregatesInput | RetailStockReturnScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"RetailStockReturn"> | bigint | number
    retailStockId?: BigIntWithAggregatesFilter<"RetailStockReturn"> | bigint | number
    returnDate?: DateTimeWithAggregatesFilter<"RetailStockReturn"> | Date | string
    quantity?: DecimalWithAggregatesFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableWithAggregatesFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string | null
    reason?: StringNullableWithAggregatesFilter<"RetailStockReturn"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"RetailStockReturn"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"RetailStockReturn"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"RetailStockReturn"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"RetailStockReturn"> | bigint | number | null
  }

  export type RetailSaleWhereInput = {
    AND?: RetailSaleWhereInput | RetailSaleWhereInput[]
    OR?: RetailSaleWhereInput[]
    NOT?: RetailSaleWhereInput | RetailSaleWhereInput[]
    id?: BigIntFilter<"RetailSale"> | bigint | number
    invoiceNo?: StringFilter<"RetailSale"> | string
    walkInName?: StringNullableFilter<"RetailSale"> | string | null
    walkInMobile?: StringNullableFilter<"RetailSale"> | string | null
    invoiceDate?: DateTimeFilter<"RetailSale"> | Date | string
    subTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeNullableFilter<"RetailSale"> | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFilter<"RetailSale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"RetailSale"> | string | null
    movedToWholesale?: BoolFilter<"RetailSale"> | boolean
    createdAt?: DateTimeFilter<"RetailSale"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailSale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailSale"> | bigint | number | null
    items?: RetailSaleItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type RetailSaleOrderByWithRelationInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    walkInName?: SortOrderInput | SortOrder
    walkInMobile?: SortOrderInput | SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentMode?: SortOrderInput | SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrderInput | SortOrder
    movedToWholesale?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    items?: RetailSaleItemOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: RetailSaleOrderByRelevanceInput
  }

  export type RetailSaleWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    invoiceNo?: string
    AND?: RetailSaleWhereInput | RetailSaleWhereInput[]
    OR?: RetailSaleWhereInput[]
    NOT?: RetailSaleWhereInput | RetailSaleWhereInput[]
    walkInName?: StringNullableFilter<"RetailSale"> | string | null
    walkInMobile?: StringNullableFilter<"RetailSale"> | string | null
    invoiceDate?: DateTimeFilter<"RetailSale"> | Date | string
    subTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeNullableFilter<"RetailSale"> | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFilter<"RetailSale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"RetailSale"> | string | null
    movedToWholesale?: BoolFilter<"RetailSale"> | boolean
    createdAt?: DateTimeFilter<"RetailSale"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailSale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailSale"> | bigint | number | null
    items?: RetailSaleItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "invoiceNo">

  export type RetailSaleOrderByWithAggregationInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    walkInName?: SortOrderInput | SortOrder
    walkInMobile?: SortOrderInput | SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentMode?: SortOrderInput | SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrderInput | SortOrder
    movedToWholesale?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: RetailSaleCountOrderByAggregateInput
    _avg?: RetailSaleAvgOrderByAggregateInput
    _max?: RetailSaleMaxOrderByAggregateInput
    _min?: RetailSaleMinOrderByAggregateInput
    _sum?: RetailSaleSumOrderByAggregateInput
  }

  export type RetailSaleScalarWhereWithAggregatesInput = {
    AND?: RetailSaleScalarWhereWithAggregatesInput | RetailSaleScalarWhereWithAggregatesInput[]
    OR?: RetailSaleScalarWhereWithAggregatesInput[]
    NOT?: RetailSaleScalarWhereWithAggregatesInput | RetailSaleScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"RetailSale"> | bigint | number
    invoiceNo?: StringWithAggregatesFilter<"RetailSale"> | string
    walkInName?: StringNullableWithAggregatesFilter<"RetailSale"> | string | null
    walkInMobile?: StringNullableWithAggregatesFilter<"RetailSale"> | string | null
    invoiceDate?: DateTimeWithAggregatesFilter<"RetailSale"> | Date | string
    subTotal?: DecimalWithAggregatesFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalWithAggregatesFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalWithAggregatesFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalWithAggregatesFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalWithAggregatesFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeNullableWithAggregatesFilter<"RetailSale"> | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusWithAggregatesFilter<"RetailSale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableWithAggregatesFilter<"RetailSale"> | string | null
    movedToWholesale?: BoolWithAggregatesFilter<"RetailSale"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"RetailSale"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"RetailSale"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"RetailSale"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"RetailSale"> | bigint | number | null
  }

  export type RetailSaleItemWhereInput = {
    AND?: RetailSaleItemWhereInput | RetailSaleItemWhereInput[]
    OR?: RetailSaleItemWhereInput[]
    NOT?: RetailSaleItemWhereInput | RetailSaleItemWhereInput[]
    id?: BigIntFilter<"RetailSaleItem"> | bigint | number
    retailSaleId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    retailStockId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"RetailSaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailSaleItem"> | bigint | number | null
    retailSale?: XOR<RetailSaleScalarRelationFilter, RetailSaleWhereInput>
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type RetailSaleItemOrderByWithRelationInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    retailSale?: RetailSaleOrderByWithRelationInput
    retailStock?: RetailStockOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
  }

  export type RetailSaleItemWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: RetailSaleItemWhereInput | RetailSaleItemWhereInput[]
    OR?: RetailSaleItemWhereInput[]
    NOT?: RetailSaleItemWhereInput | RetailSaleItemWhereInput[]
    retailSaleId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    retailStockId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"RetailSaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailSaleItem"> | bigint | number | null
    retailSale?: XOR<RetailSaleScalarRelationFilter, RetailSaleWhereInput>
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type RetailSaleItemOrderByWithAggregationInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrderInput | SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: RetailSaleItemCountOrderByAggregateInput
    _avg?: RetailSaleItemAvgOrderByAggregateInput
    _max?: RetailSaleItemMaxOrderByAggregateInput
    _min?: RetailSaleItemMinOrderByAggregateInput
    _sum?: RetailSaleItemSumOrderByAggregateInput
  }

  export type RetailSaleItemScalarWhereWithAggregatesInput = {
    AND?: RetailSaleItemScalarWhereWithAggregatesInput | RetailSaleItemScalarWhereWithAggregatesInput[]
    OR?: RetailSaleItemScalarWhereWithAggregatesInput[]
    NOT?: RetailSaleItemScalarWhereWithAggregatesInput | RetailSaleItemScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"RetailSaleItem"> | bigint | number
    retailSaleId?: BigIntWithAggregatesFilter<"RetailSaleItem"> | bigint | number
    retailStockId?: BigIntWithAggregatesFilter<"RetailSaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitWithAggregatesFilter<"RetailSaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalWithAggregatesFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableWithAggregatesFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalWithAggregatesFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalWithAggregatesFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalWithAggregatesFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeWithAggregatesFilter<"RetailSaleItem"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"RetailSaleItem"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"RetailSaleItem"> | bigint | number | null
  }

  export type RetailStockSpoilageWhereInput = {
    AND?: RetailStockSpoilageWhereInput | RetailStockSpoilageWhereInput[]
    OR?: RetailStockSpoilageWhereInput[]
    NOT?: RetailStockSpoilageWhereInput | RetailStockSpoilageWhereInput[]
    id?: BigIntFilter<"RetailStockSpoilage"> | bigint | number
    retailStockId?: BigIntFilter<"RetailStockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    quantity?: DecimalFilter<"RetailStockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    remarks?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockSpoilage"> | bigint | number | null
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type RetailStockSpoilageOrderByWithRelationInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    retailStock?: RetailStockOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: RetailStockSpoilageOrderByRelevanceInput
  }

  export type RetailStockSpoilageWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: RetailStockSpoilageWhereInput | RetailStockSpoilageWhereInput[]
    OR?: RetailStockSpoilageWhereInput[]
    NOT?: RetailStockSpoilageWhereInput | RetailStockSpoilageWhereInput[]
    retailStockId?: BigIntFilter<"RetailStockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    quantity?: DecimalFilter<"RetailStockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    remarks?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockSpoilage"> | bigint | number | null
    retailStock?: XOR<RetailStockScalarRelationFilter, RetailStockWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type RetailStockSpoilageOrderByWithAggregationInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: RetailStockSpoilageCountOrderByAggregateInput
    _avg?: RetailStockSpoilageAvgOrderByAggregateInput
    _max?: RetailStockSpoilageMaxOrderByAggregateInput
    _min?: RetailStockSpoilageMinOrderByAggregateInput
    _sum?: RetailStockSpoilageSumOrderByAggregateInput
  }

  export type RetailStockSpoilageScalarWhereWithAggregatesInput = {
    AND?: RetailStockSpoilageScalarWhereWithAggregatesInput | RetailStockSpoilageScalarWhereWithAggregatesInput[]
    OR?: RetailStockSpoilageScalarWhereWithAggregatesInput[]
    NOT?: RetailStockSpoilageScalarWhereWithAggregatesInput | RetailStockSpoilageScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"RetailStockSpoilage"> | bigint | number
    retailStockId?: BigIntWithAggregatesFilter<"RetailStockSpoilage"> | bigint | number
    spoilageDate?: DateTimeWithAggregatesFilter<"RetailStockSpoilage"> | Date | string
    quantity?: DecimalWithAggregatesFilter<"RetailStockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableWithAggregatesFilter<"RetailStockSpoilage"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"RetailStockSpoilage"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"RetailStockSpoilage"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"RetailStockSpoilage"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"RetailStockSpoilage"> | bigint | number | null
  }

  export type BoxReturnWhereInput = {
    AND?: BoxReturnWhereInput | BoxReturnWhereInput[]
    OR?: BoxReturnWhereInput[]
    NOT?: BoxReturnWhereInput | BoxReturnWhereInput[]
    id?: BigIntFilter<"BoxReturn"> | bigint | number
    supplierId?: BigIntFilter<"BoxReturn"> | bigint | number
    returnDate?: DateTimeFilter<"BoxReturn"> | Date | string
    boxCount?: DecimalFilter<"BoxReturn"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"BoxReturn"> | string | null
    signature?: StringNullableFilter<"BoxReturn"> | string | null
    createdAt?: DateTimeFilter<"BoxReturn"> | Date | string
    updatedAt?: DateTimeFilter<"BoxReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"BoxReturn"> | bigint | number | null
    supplier?: XOR<SupplierScalarRelationFilter, SupplierWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type BoxReturnOrderByWithRelationInput = {
    id?: SortOrder
    supplierId?: SortOrder
    returnDate?: SortOrder
    boxCount?: SortOrder
    remarks?: SortOrderInput | SortOrder
    signature?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    supplier?: SupplierOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: BoxReturnOrderByRelevanceInput
  }

  export type BoxReturnWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: BoxReturnWhereInput | BoxReturnWhereInput[]
    OR?: BoxReturnWhereInput[]
    NOT?: BoxReturnWhereInput | BoxReturnWhereInput[]
    supplierId?: BigIntFilter<"BoxReturn"> | bigint | number
    returnDate?: DateTimeFilter<"BoxReturn"> | Date | string
    boxCount?: DecimalFilter<"BoxReturn"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"BoxReturn"> | string | null
    signature?: StringNullableFilter<"BoxReturn"> | string | null
    createdAt?: DateTimeFilter<"BoxReturn"> | Date | string
    updatedAt?: DateTimeFilter<"BoxReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"BoxReturn"> | bigint | number | null
    supplier?: XOR<SupplierScalarRelationFilter, SupplierWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type BoxReturnOrderByWithAggregationInput = {
    id?: SortOrder
    supplierId?: SortOrder
    returnDate?: SortOrder
    boxCount?: SortOrder
    remarks?: SortOrderInput | SortOrder
    signature?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: BoxReturnCountOrderByAggregateInput
    _avg?: BoxReturnAvgOrderByAggregateInput
    _max?: BoxReturnMaxOrderByAggregateInput
    _min?: BoxReturnMinOrderByAggregateInput
    _sum?: BoxReturnSumOrderByAggregateInput
  }

  export type BoxReturnScalarWhereWithAggregatesInput = {
    AND?: BoxReturnScalarWhereWithAggregatesInput | BoxReturnScalarWhereWithAggregatesInput[]
    OR?: BoxReturnScalarWhereWithAggregatesInput[]
    NOT?: BoxReturnScalarWhereWithAggregatesInput | BoxReturnScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"BoxReturn"> | bigint | number
    supplierId?: BigIntWithAggregatesFilter<"BoxReturn"> | bigint | number
    returnDate?: DateTimeWithAggregatesFilter<"BoxReturn"> | Date | string
    boxCount?: DecimalWithAggregatesFilter<"BoxReturn"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableWithAggregatesFilter<"BoxReturn"> | string | null
    signature?: StringNullableWithAggregatesFilter<"BoxReturn"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"BoxReturn"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"BoxReturn"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"BoxReturn"> | bigint | number | null
  }

  export type EmployeeWhereInput = {
    AND?: EmployeeWhereInput | EmployeeWhereInput[]
    OR?: EmployeeWhereInput[]
    NOT?: EmployeeWhereInput | EmployeeWhereInput[]
    id?: BigIntFilter<"Employee"> | bigint | number
    employeeCode?: StringFilter<"Employee"> | string
    name?: StringFilter<"Employee"> | string
    mobile?: StringNullableFilter<"Employee"> | string | null
    designation?: StringNullableFilter<"Employee"> | string | null
    status?: BoolFilter<"Employee"> | boolean
    createdAt?: DateTimeFilter<"Employee"> | Date | string
    updatedAt?: DateTimeFilter<"Employee"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Employee"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Employee"> | bigint | number | null
    attendances?: AttendanceListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type EmployeeOrderByWithRelationInput = {
    id?: SortOrder
    employeeCode?: SortOrder
    name?: SortOrder
    mobile?: SortOrderInput | SortOrder
    designation?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    attendances?: AttendanceOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: EmployeeOrderByRelevanceInput
  }

  export type EmployeeWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    employeeCode?: string
    AND?: EmployeeWhereInput | EmployeeWhereInput[]
    OR?: EmployeeWhereInput[]
    NOT?: EmployeeWhereInput | EmployeeWhereInput[]
    name?: StringFilter<"Employee"> | string
    mobile?: StringNullableFilter<"Employee"> | string | null
    designation?: StringNullableFilter<"Employee"> | string | null
    status?: BoolFilter<"Employee"> | boolean
    createdAt?: DateTimeFilter<"Employee"> | Date | string
    updatedAt?: DateTimeFilter<"Employee"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Employee"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Employee"> | bigint | number | null
    attendances?: AttendanceListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "employeeCode">

  export type EmployeeOrderByWithAggregationInput = {
    id?: SortOrder
    employeeCode?: SortOrder
    name?: SortOrder
    mobile?: SortOrderInput | SortOrder
    designation?: SortOrderInput | SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrderInput | SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: EmployeeCountOrderByAggregateInput
    _avg?: EmployeeAvgOrderByAggregateInput
    _max?: EmployeeMaxOrderByAggregateInput
    _min?: EmployeeMinOrderByAggregateInput
    _sum?: EmployeeSumOrderByAggregateInput
  }

  export type EmployeeScalarWhereWithAggregatesInput = {
    AND?: EmployeeScalarWhereWithAggregatesInput | EmployeeScalarWhereWithAggregatesInput[]
    OR?: EmployeeScalarWhereWithAggregatesInput[]
    NOT?: EmployeeScalarWhereWithAggregatesInput | EmployeeScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Employee"> | bigint | number
    employeeCode?: StringWithAggregatesFilter<"Employee"> | string
    name?: StringWithAggregatesFilter<"Employee"> | string
    mobile?: StringNullableWithAggregatesFilter<"Employee"> | string | null
    designation?: StringNullableWithAggregatesFilter<"Employee"> | string | null
    status?: BoolWithAggregatesFilter<"Employee"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Employee"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Employee"> | Date | string
    deletedAt?: DateTimeNullableWithAggregatesFilter<"Employee"> | Date | string | null
    createdBy?: BigIntNullableWithAggregatesFilter<"Employee"> | bigint | number | null
  }

  export type AttendanceWhereInput = {
    AND?: AttendanceWhereInput | AttendanceWhereInput[]
    OR?: AttendanceWhereInput[]
    NOT?: AttendanceWhereInput | AttendanceWhereInput[]
    id?: BigIntFilter<"Attendance"> | bigint | number
    employeeId?: BigIntFilter<"Attendance"> | bigint | number
    date?: DateTimeFilter<"Attendance"> | Date | string
    status?: EnumAttendanceStatusFilter<"Attendance"> | $Enums.AttendanceStatus
    remarks?: StringNullableFilter<"Attendance"> | string | null
    createdAt?: DateTimeFilter<"Attendance"> | Date | string
    updatedAt?: DateTimeFilter<"Attendance"> | Date | string
    createdBy?: BigIntNullableFilter<"Attendance"> | bigint | number | null
    employee?: XOR<EmployeeScalarRelationFilter, EmployeeWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type AttendanceOrderByWithRelationInput = {
    id?: SortOrder
    employeeId?: SortOrder
    date?: SortOrder
    status?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    employee?: EmployeeOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: AttendanceOrderByRelevanceInput
  }

  export type AttendanceWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    employeeId_date?: AttendanceEmployeeIdDateCompoundUniqueInput
    AND?: AttendanceWhereInput | AttendanceWhereInput[]
    OR?: AttendanceWhereInput[]
    NOT?: AttendanceWhereInput | AttendanceWhereInput[]
    employeeId?: BigIntFilter<"Attendance"> | bigint | number
    date?: DateTimeFilter<"Attendance"> | Date | string
    status?: EnumAttendanceStatusFilter<"Attendance"> | $Enums.AttendanceStatus
    remarks?: StringNullableFilter<"Attendance"> | string | null
    createdAt?: DateTimeFilter<"Attendance"> | Date | string
    updatedAt?: DateTimeFilter<"Attendance"> | Date | string
    createdBy?: BigIntNullableFilter<"Attendance"> | bigint | number | null
    employee?: XOR<EmployeeScalarRelationFilter, EmployeeWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "employeeId_date">

  export type AttendanceOrderByWithAggregationInput = {
    id?: SortOrder
    employeeId?: SortOrder
    date?: SortOrder
    status?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: AttendanceCountOrderByAggregateInput
    _avg?: AttendanceAvgOrderByAggregateInput
    _max?: AttendanceMaxOrderByAggregateInput
    _min?: AttendanceMinOrderByAggregateInput
    _sum?: AttendanceSumOrderByAggregateInput
  }

  export type AttendanceScalarWhereWithAggregatesInput = {
    AND?: AttendanceScalarWhereWithAggregatesInput | AttendanceScalarWhereWithAggregatesInput[]
    OR?: AttendanceScalarWhereWithAggregatesInput[]
    NOT?: AttendanceScalarWhereWithAggregatesInput | AttendanceScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"Attendance"> | bigint | number
    employeeId?: BigIntWithAggregatesFilter<"Attendance"> | bigint | number
    date?: DateTimeWithAggregatesFilter<"Attendance"> | Date | string
    status?: EnumAttendanceStatusWithAggregatesFilter<"Attendance"> | $Enums.AttendanceStatus
    remarks?: StringNullableWithAggregatesFilter<"Attendance"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Attendance"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Attendance"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"Attendance"> | bigint | number | null
  }

  export type AuditLogWhereInput = {
    AND?: AuditLogWhereInput | AuditLogWhereInput[]
    OR?: AuditLogWhereInput[]
    NOT?: AuditLogWhereInput | AuditLogWhereInput[]
    id?: BigIntFilter<"AuditLog"> | bigint | number
    entityName?: StringFilter<"AuditLog"> | string
    entityId?: BigIntFilter<"AuditLog"> | bigint | number
    action?: EnumAuditActionFilter<"AuditLog"> | $Enums.AuditAction
    oldValues?: JsonFilter<"AuditLog">
    newValues?: JsonNullableFilter<"AuditLog">
    createdAt?: DateTimeFilter<"AuditLog"> | Date | string
    userId?: BigIntNullableFilter<"AuditLog"> | bigint | number | null
    user?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type AuditLogOrderByWithRelationInput = {
    id?: SortOrder
    entityName?: SortOrder
    entityId?: SortOrder
    action?: SortOrder
    oldValues?: SortOrder
    newValues?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    userId?: SortOrderInput | SortOrder
    user?: UserOrderByWithRelationInput
    _relevance?: AuditLogOrderByRelevanceInput
  }

  export type AuditLogWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: AuditLogWhereInput | AuditLogWhereInput[]
    OR?: AuditLogWhereInput[]
    NOT?: AuditLogWhereInput | AuditLogWhereInput[]
    entityName?: StringFilter<"AuditLog"> | string
    entityId?: BigIntFilter<"AuditLog"> | bigint | number
    action?: EnumAuditActionFilter<"AuditLog"> | $Enums.AuditAction
    oldValues?: JsonFilter<"AuditLog">
    newValues?: JsonNullableFilter<"AuditLog">
    createdAt?: DateTimeFilter<"AuditLog"> | Date | string
    userId?: BigIntNullableFilter<"AuditLog"> | bigint | number | null
    user?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type AuditLogOrderByWithAggregationInput = {
    id?: SortOrder
    entityName?: SortOrder
    entityId?: SortOrder
    action?: SortOrder
    oldValues?: SortOrder
    newValues?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    userId?: SortOrderInput | SortOrder
    _count?: AuditLogCountOrderByAggregateInput
    _avg?: AuditLogAvgOrderByAggregateInput
    _max?: AuditLogMaxOrderByAggregateInput
    _min?: AuditLogMinOrderByAggregateInput
    _sum?: AuditLogSumOrderByAggregateInput
  }

  export type AuditLogScalarWhereWithAggregatesInput = {
    AND?: AuditLogScalarWhereWithAggregatesInput | AuditLogScalarWhereWithAggregatesInput[]
    OR?: AuditLogScalarWhereWithAggregatesInput[]
    NOT?: AuditLogScalarWhereWithAggregatesInput | AuditLogScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"AuditLog"> | bigint | number
    entityName?: StringWithAggregatesFilter<"AuditLog"> | string
    entityId?: BigIntWithAggregatesFilter<"AuditLog"> | bigint | number
    action?: EnumAuditActionWithAggregatesFilter<"AuditLog"> | $Enums.AuditAction
    oldValues?: JsonWithAggregatesFilter<"AuditLog">
    newValues?: JsonNullableWithAggregatesFilter<"AuditLog">
    createdAt?: DateTimeWithAggregatesFilter<"AuditLog"> | Date | string
    userId?: BigIntNullableWithAggregatesFilter<"AuditLog"> | bigint | number | null
  }

  export type FastBillingWhereInput = {
    AND?: FastBillingWhereInput | FastBillingWhereInput[]
    OR?: FastBillingWhereInput[]
    NOT?: FastBillingWhereInput | FastBillingWhereInput[]
    id?: BigIntFilter<"FastBilling"> | bigint | number
    billNo?: StringFilter<"FastBilling"> | string
    billDate?: DateTimeFilter<"FastBilling"> | Date | string
    customerName?: StringFilter<"FastBilling"> | string
    totalAmount?: DecimalFilter<"FastBilling"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"FastBilling"> | string | null
    createdAt?: DateTimeFilter<"FastBilling"> | Date | string
    updatedAt?: DateTimeFilter<"FastBilling"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBilling"> | bigint | number | null
    items?: FastBillingItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type FastBillingOrderByWithRelationInput = {
    id?: SortOrder
    billNo?: SortOrder
    billDate?: SortOrder
    customerName?: SortOrder
    totalAmount?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    items?: FastBillingItemOrderByRelationAggregateInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: FastBillingOrderByRelevanceInput
  }

  export type FastBillingWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    billNo?: string
    AND?: FastBillingWhereInput | FastBillingWhereInput[]
    OR?: FastBillingWhereInput[]
    NOT?: FastBillingWhereInput | FastBillingWhereInput[]
    billDate?: DateTimeFilter<"FastBilling"> | Date | string
    customerName?: StringFilter<"FastBilling"> | string
    totalAmount?: DecimalFilter<"FastBilling"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"FastBilling"> | string | null
    createdAt?: DateTimeFilter<"FastBilling"> | Date | string
    updatedAt?: DateTimeFilter<"FastBilling"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBilling"> | bigint | number | null
    items?: FastBillingItemListRelationFilter
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id" | "billNo">

  export type FastBillingOrderByWithAggregationInput = {
    id?: SortOrder
    billNo?: SortOrder
    billDate?: SortOrder
    customerName?: SortOrder
    totalAmount?: SortOrder
    remarks?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: FastBillingCountOrderByAggregateInput
    _avg?: FastBillingAvgOrderByAggregateInput
    _max?: FastBillingMaxOrderByAggregateInput
    _min?: FastBillingMinOrderByAggregateInput
    _sum?: FastBillingSumOrderByAggregateInput
  }

  export type FastBillingScalarWhereWithAggregatesInput = {
    AND?: FastBillingScalarWhereWithAggregatesInput | FastBillingScalarWhereWithAggregatesInput[]
    OR?: FastBillingScalarWhereWithAggregatesInput[]
    NOT?: FastBillingScalarWhereWithAggregatesInput | FastBillingScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"FastBilling"> | bigint | number
    billNo?: StringWithAggregatesFilter<"FastBilling"> | string
    billDate?: DateTimeWithAggregatesFilter<"FastBilling"> | Date | string
    customerName?: StringWithAggregatesFilter<"FastBilling"> | string
    totalAmount?: DecimalWithAggregatesFilter<"FastBilling"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableWithAggregatesFilter<"FastBilling"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"FastBilling"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"FastBilling"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"FastBilling"> | bigint | number | null
  }

  export type FastBillingItemWhereInput = {
    AND?: FastBillingItemWhereInput | FastBillingItemWhereInput[]
    OR?: FastBillingItemWhereInput[]
    NOT?: FastBillingItemWhereInput | FastBillingItemWhereInput[]
    id?: BigIntFilter<"FastBillingItem"> | bigint | number
    fastBillingId?: BigIntFilter<"FastBillingItem"> | bigint | number
    vegetableName?: StringFilter<"FastBillingItem"> | string
    quantity?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    unit?: StringFilter<"FastBillingItem"> | string
    rateType?: StringNullableFilter<"FastBillingItem"> | string | null
    numberOfBoxes?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    updatedAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBillingItem"> | bigint | number | null
    fastBilling?: XOR<FastBillingScalarRelationFilter, FastBillingWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type FastBillingItemOrderByWithRelationInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    vegetableName?: SortOrder
    quantity?: SortOrderInput | SortOrder
    unit?: SortOrder
    rateType?: SortOrderInput | SortOrder
    numberOfBoxes?: SortOrderInput | SortOrder
    numberOfThaar?: SortOrderInput | SortOrder
    numberOfPieces?: SortOrderInput | SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrderInput | SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    fastBilling?: FastBillingOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: FastBillingItemOrderByRelevanceInput
  }

  export type FastBillingItemWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: FastBillingItemWhereInput | FastBillingItemWhereInput[]
    OR?: FastBillingItemWhereInput[]
    NOT?: FastBillingItemWhereInput | FastBillingItemWhereInput[]
    fastBillingId?: BigIntFilter<"FastBillingItem"> | bigint | number
    vegetableName?: StringFilter<"FastBillingItem"> | string
    quantity?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    unit?: StringFilter<"FastBillingItem"> | string
    rateType?: StringNullableFilter<"FastBillingItem"> | string | null
    numberOfBoxes?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    updatedAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBillingItem"> | bigint | number | null
    fastBilling?: XOR<FastBillingScalarRelationFilter, FastBillingWhereInput>
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type FastBillingItemOrderByWithAggregationInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    vegetableName?: SortOrder
    quantity?: SortOrderInput | SortOrder
    unit?: SortOrder
    rateType?: SortOrderInput | SortOrder
    numberOfBoxes?: SortOrderInput | SortOrder
    numberOfThaar?: SortOrderInput | SortOrder
    numberOfPieces?: SortOrderInput | SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrderInput | SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: FastBillingItemCountOrderByAggregateInput
    _avg?: FastBillingItemAvgOrderByAggregateInput
    _max?: FastBillingItemMaxOrderByAggregateInput
    _min?: FastBillingItemMinOrderByAggregateInput
    _sum?: FastBillingItemSumOrderByAggregateInput
  }

  export type FastBillingItemScalarWhereWithAggregatesInput = {
    AND?: FastBillingItemScalarWhereWithAggregatesInput | FastBillingItemScalarWhereWithAggregatesInput[]
    OR?: FastBillingItemScalarWhereWithAggregatesInput[]
    NOT?: FastBillingItemScalarWhereWithAggregatesInput | FastBillingItemScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"FastBillingItem"> | bigint | number
    fastBillingId?: BigIntWithAggregatesFilter<"FastBillingItem"> | bigint | number
    vegetableName?: StringWithAggregatesFilter<"FastBillingItem"> | string
    quantity?: DecimalNullableWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    unit?: StringWithAggregatesFilter<"FastBillingItem"> | string
    rateType?: StringNullableWithAggregatesFilter<"FastBillingItem"> | string | null
    numberOfBoxes?: DecimalNullableWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: DecimalNullableWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: DecimalNullableWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalNullableWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalWithAggregatesFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeWithAggregatesFilter<"FastBillingItem"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"FastBillingItem"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"FastBillingItem"> | bigint | number | null
  }

  export type CashBankSettingWhereInput = {
    AND?: CashBankSettingWhereInput | CashBankSettingWhereInput[]
    OR?: CashBankSettingWhereInput[]
    NOT?: CashBankSettingWhereInput | CashBankSettingWhereInput[]
    id?: BigIntFilter<"CashBankSetting"> | bigint | number
    openingCashInHand?: DecimalFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFilter<"CashBankSetting"> | Date | string
    remarks?: StringNullableFilter<"CashBankSetting"> | string | null
    isLocked?: BoolFilter<"CashBankSetting"> | boolean
    createdAt?: DateTimeFilter<"CashBankSetting"> | Date | string
    updatedAt?: DateTimeFilter<"CashBankSetting"> | Date | string
  }

  export type CashBankSettingOrderByWithRelationInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
    openingDate?: SortOrder
    remarks?: SortOrderInput | SortOrder
    isLocked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _relevance?: CashBankSettingOrderByRelevanceInput
  }

  export type CashBankSettingWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: CashBankSettingWhereInput | CashBankSettingWhereInput[]
    OR?: CashBankSettingWhereInput[]
    NOT?: CashBankSettingWhereInput | CashBankSettingWhereInput[]
    openingCashInHand?: DecimalFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFilter<"CashBankSetting"> | Date | string
    remarks?: StringNullableFilter<"CashBankSetting"> | string | null
    isLocked?: BoolFilter<"CashBankSetting"> | boolean
    createdAt?: DateTimeFilter<"CashBankSetting"> | Date | string
    updatedAt?: DateTimeFilter<"CashBankSetting"> | Date | string
  }, "id">

  export type CashBankSettingOrderByWithAggregationInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
    openingDate?: SortOrder
    remarks?: SortOrderInput | SortOrder
    isLocked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: CashBankSettingCountOrderByAggregateInput
    _avg?: CashBankSettingAvgOrderByAggregateInput
    _max?: CashBankSettingMaxOrderByAggregateInput
    _min?: CashBankSettingMinOrderByAggregateInput
    _sum?: CashBankSettingSumOrderByAggregateInput
  }

  export type CashBankSettingScalarWhereWithAggregatesInput = {
    AND?: CashBankSettingScalarWhereWithAggregatesInput | CashBankSettingScalarWhereWithAggregatesInput[]
    OR?: CashBankSettingScalarWhereWithAggregatesInput[]
    NOT?: CashBankSettingScalarWhereWithAggregatesInput | CashBankSettingScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"CashBankSetting"> | bigint | number
    openingCashInHand?: DecimalWithAggregatesFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalWithAggregatesFilter<"CashBankSetting"> | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeWithAggregatesFilter<"CashBankSetting"> | Date | string
    remarks?: StringNullableWithAggregatesFilter<"CashBankSetting"> | string | null
    isLocked?: BoolWithAggregatesFilter<"CashBankSetting"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"CashBankSetting"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"CashBankSetting"> | Date | string
  }

  export type CashBankTransferWhereInput = {
    AND?: CashBankTransferWhereInput | CashBankTransferWhereInput[]
    OR?: CashBankTransferWhereInput[]
    NOT?: CashBankTransferWhereInput | CashBankTransferWhereInput[]
    id?: BigIntFilter<"CashBankTransfer"> | bigint | number
    transferDate?: DateTimeFilter<"CashBankTransfer"> | Date | string
    amount?: DecimalFilter<"CashBankTransfer"> | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFilter<"CashBankTransfer"> | string
    toAccount?: StringFilter<"CashBankTransfer"> | string
    referenceNo?: StringNullableFilter<"CashBankTransfer"> | string | null
    remarks?: StringNullableFilter<"CashBankTransfer"> | string | null
    deletedAt?: DateTimeNullableFilter<"CashBankTransfer"> | Date | string | null
    deletedBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
    createdAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    updatedAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    createdBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
    deletedByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }

  export type CashBankTransferOrderByWithRelationInput = {
    id?: SortOrder
    transferDate?: SortOrder
    amount?: SortOrder
    fromAccount?: SortOrder
    toAccount?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    deletedAt?: SortOrderInput | SortOrder
    deletedBy?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    deletedByUser?: UserOrderByWithRelationInput
    createdByUser?: UserOrderByWithRelationInput
    _relevance?: CashBankTransferOrderByRelevanceInput
  }

  export type CashBankTransferWhereUniqueInput = Prisma.AtLeast<{
    id?: bigint | number
    AND?: CashBankTransferWhereInput | CashBankTransferWhereInput[]
    OR?: CashBankTransferWhereInput[]
    NOT?: CashBankTransferWhereInput | CashBankTransferWhereInput[]
    transferDate?: DateTimeFilter<"CashBankTransfer"> | Date | string
    amount?: DecimalFilter<"CashBankTransfer"> | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFilter<"CashBankTransfer"> | string
    toAccount?: StringFilter<"CashBankTransfer"> | string
    referenceNo?: StringNullableFilter<"CashBankTransfer"> | string | null
    remarks?: StringNullableFilter<"CashBankTransfer"> | string | null
    deletedAt?: DateTimeNullableFilter<"CashBankTransfer"> | Date | string | null
    deletedBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
    createdAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    updatedAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    createdBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
    deletedByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
    createdByUser?: XOR<UserNullableScalarRelationFilter, UserWhereInput> | null
  }, "id">

  export type CashBankTransferOrderByWithAggregationInput = {
    id?: SortOrder
    transferDate?: SortOrder
    amount?: SortOrder
    fromAccount?: SortOrder
    toAccount?: SortOrder
    referenceNo?: SortOrderInput | SortOrder
    remarks?: SortOrderInput | SortOrder
    deletedAt?: SortOrderInput | SortOrder
    deletedBy?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrderInput | SortOrder
    _count?: CashBankTransferCountOrderByAggregateInput
    _avg?: CashBankTransferAvgOrderByAggregateInput
    _max?: CashBankTransferMaxOrderByAggregateInput
    _min?: CashBankTransferMinOrderByAggregateInput
    _sum?: CashBankTransferSumOrderByAggregateInput
  }

  export type CashBankTransferScalarWhereWithAggregatesInput = {
    AND?: CashBankTransferScalarWhereWithAggregatesInput | CashBankTransferScalarWhereWithAggregatesInput[]
    OR?: CashBankTransferScalarWhereWithAggregatesInput[]
    NOT?: CashBankTransferScalarWhereWithAggregatesInput | CashBankTransferScalarWhereWithAggregatesInput[]
    id?: BigIntWithAggregatesFilter<"CashBankTransfer"> | bigint | number
    transferDate?: DateTimeWithAggregatesFilter<"CashBankTransfer"> | Date | string
    amount?: DecimalWithAggregatesFilter<"CashBankTransfer"> | Decimal | DecimalJsLike | number | string
    fromAccount?: StringWithAggregatesFilter<"CashBankTransfer"> | string
    toAccount?: StringWithAggregatesFilter<"CashBankTransfer"> | string
    referenceNo?: StringNullableWithAggregatesFilter<"CashBankTransfer"> | string | null
    remarks?: StringNullableWithAggregatesFilter<"CashBankTransfer"> | string | null
    deletedAt?: DateTimeNullableWithAggregatesFilter<"CashBankTransfer"> | Date | string | null
    deletedBy?: BigIntNullableWithAggregatesFilter<"CashBankTransfer"> | bigint | number | null
    createdAt?: DateTimeWithAggregatesFilter<"CashBankTransfer"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"CashBankTransfer"> | Date | string
    createdBy?: BigIntNullableWithAggregatesFilter<"CashBankTransfer"> | bigint | number | null
  }

  export type RoleCreateInput = {
    id?: bigint | number
    name: string
    createdAt?: Date | string
    updatedAt?: Date | string
    users?: UserCreateNestedManyWithoutRoleInput
  }

  export type RoleUncheckedCreateInput = {
    id?: bigint | number
    name: string
    createdAt?: Date | string
    updatedAt?: Date | string
    users?: UserUncheckedCreateNestedManyWithoutRoleInput
  }

  export type RoleUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    users?: UserUpdateManyWithoutRoleNestedInput
  }

  export type RoleUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    users?: UserUncheckedUpdateManyWithoutRoleNestedInput
  }

  export type RoleCreateManyInput = {
    id?: bigint | number
    name: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RoleUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RoleUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserCreateInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateManyInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
  }

  export type UserUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type UserUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type StateCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    districts?: DistrictCreateNestedManyWithoutStateInput
    customers?: CustomerCreateNestedManyWithoutStateInput
    suppliers?: SupplierCreateNestedManyWithoutStateInput
    createdByUser?: UserCreateNestedOneWithoutCreatedStatesInput
  }

  export type StateUncheckedCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    districts?: DistrictUncheckedCreateNestedManyWithoutStateInput
    customers?: CustomerUncheckedCreateNestedManyWithoutStateInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutStateInput
  }

  export type StateUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    districts?: DistrictUpdateManyWithoutStateNestedInput
    customers?: CustomerUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUpdateManyWithoutStateNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedStatesNestedInput
  }

  export type StateUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    districts?: DistrictUncheckedUpdateManyWithoutStateNestedInput
    customers?: CustomerUncheckedUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutStateNestedInput
  }

  export type StateCreateManyInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type StateUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StateUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type DistrictCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    state: StateCreateNestedOneWithoutDistrictsInput
    customers?: CustomerCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierCreateNestedManyWithoutDistrictInput
    createdByUser?: UserCreateNestedOneWithoutCreatedDistrictsInput
  }

  export type DistrictUncheckedCreateInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    customers?: CustomerUncheckedCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutDistrictInput
  }

  export type DistrictUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    state?: StateUpdateOneRequiredWithoutDistrictsNestedInput
    customers?: CustomerUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUpdateManyWithoutDistrictNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedDistrictsNestedInput
  }

  export type DistrictUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customers?: CustomerUncheckedUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutDistrictNestedInput
  }

  export type DistrictCreateManyInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type DistrictUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DistrictUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type VegetableCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    purchases?: PurchaseCreateNestedManyWithoutVegetableInput
    quotationItems?: QuotationItemCreateNestedManyWithoutVegetableInput
    createdByUser?: UserCreateNestedOneWithoutCreatedVegetablesInput
  }

  export type VegetableUncheckedCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutVegetableInput
    quotationItems?: QuotationItemUncheckedCreateNestedManyWithoutVegetableInput
  }

  export type VegetableUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    purchases?: PurchaseUpdateManyWithoutVegetableNestedInput
    quotationItems?: QuotationItemUpdateManyWithoutVegetableNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedVegetablesNestedInput
  }

  export type VegetableUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutVegetableNestedInput
    quotationItems?: QuotationItemUncheckedUpdateManyWithoutVegetableNestedInput
  }

  export type VegetableCreateManyInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    createdBy?: bigint | number | null
  }

  export type VegetableUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
  }

  export type VegetableUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    district: DistrictCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type CustomerCreateManyInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type CustomerUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    district: DistrictCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type SupplierCreateManyInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SupplierUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierPaymentCreateInput = {
    id?: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier: SupplierCreateNestedOneWithoutSupplierPaymentsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSupplierPaymentsInput
  }

  export type SupplierPaymentUncheckedCreateInput = {
    id?: bigint | number
    supplierId: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierPaymentUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneRequiredWithoutSupplierPaymentsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSupplierPaymentsNestedInput
  }

  export type SupplierPaymentUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierPaymentCreateManyInput = {
    id?: bigint | number
    supplierId: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierPaymentUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SupplierPaymentUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type UpiCreateInput = {
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedUpisInput
  }

  export type UpiUncheckedCreateInput = {
    id?: number
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type UpiUpdateInput = {
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedUpisNestedInput
  }

  export type UpiUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type UpiCreateManyInput = {
    id?: number
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type UpiUpdateManyMutationInput = {
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UpiUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseCreateInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type PurchaseCreateManyInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type PurchaseUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type PurchaseUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ShopCreateInput = {
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedShopsInput
  }

  export type ShopUncheckedCreateInput = {
    id?: number
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ShopUpdateInput = {
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedShopsNestedInput
  }

  export type ShopUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ShopCreateManyInput = {
    id?: number
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ShopUpdateManyMutationInput = {
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ShopUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleCreateInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    customer?: CustomerCreateNestedOneWithoutSalesInput
    items?: SaleItemCreateNestedManyWithoutSaleInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSalesInput
  }

  export type SaleUncheckedCreateInput = {
    id?: bigint | number
    invoiceNo: string
    customerId?: bigint | number | null
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    items?: SaleItemUncheckedCreateNestedManyWithoutSaleInput
  }

  export type SaleUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    customer?: CustomerUpdateOneWithoutSalesNestedInput
    items?: SaleItemUpdateManyWithoutSaleNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSalesNestedInput
  }

  export type SaleUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: SaleItemUncheckedUpdateManyWithoutSaleNestedInput
  }

  export type SaleCreateManyInput = {
    id?: bigint | number
    invoiceNo: string
    customerId?: bigint | number | null
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SaleUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SaleUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleItemCreateInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    sale: SaleCreateNestedOneWithoutItemsInput
    purchase: PurchaseCreateNestedOneWithoutSaleItemsInput
    saleReturns?: SaleReturnCreateNestedManyWithoutSaleItemInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleItemsInput
  }

  export type SaleItemUncheckedCreateInput = {
    id?: bigint | number
    saleId: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutSaleItemInput
  }

  export type SaleItemUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    sale?: SaleUpdateOneRequiredWithoutItemsNestedInput
    purchase?: PurchaseUpdateOneRequiredWithoutSaleItemsNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutSaleItemNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleItemsNestedInput
  }

  export type SaleItemUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutSaleItemNestedInput
  }

  export type SaleItemCreateManyInput = {
    id?: bigint | number
    saleId: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleItemUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type SaleItemUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerReceiptCreateInput = {
    id?: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    customer: CustomerCreateNestedOneWithoutCustomerReceiptsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomerReceiptsInput
  }

  export type CustomerReceiptUncheckedCreateInput = {
    id?: bigint | number
    customerId: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerReceiptUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    customer?: CustomerUpdateOneRequiredWithoutCustomerReceiptsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomerReceiptsNestedInput
  }

  export type CustomerReceiptUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    customerId?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerReceiptCreateManyInput = {
    id?: bigint | number
    customerId: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerReceiptUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type CustomerReceiptUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    customerId?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ExpenseCreateInput = {
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase?: PurchaseCreateNestedOneWithoutExpensesInput
    createdByUser?: UserCreateNestedOneWithoutCreatedExpensesInput
  }

  export type ExpenseUncheckedCreateInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    purchaseId?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ExpenseUpdateInput = {
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneWithoutExpensesNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedExpensesNestedInput
  }

  export type ExpenseUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    purchaseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ExpenseCreateManyInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    purchaseId?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ExpenseUpdateManyMutationInput = {
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ExpenseUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    purchaseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ForgotPasswordCreateInput = {
    otp: string
    expiresAt: Date | string
    attempts?: number
    createdAt?: Date | string
    updatedAt?: Date | string
    user: UserCreateNestedOneWithoutForgotPasswordInput
  }

  export type ForgotPasswordUncheckedCreateInput = {
    userId: bigint | number
    otp: string
    expiresAt: Date | string
    attempts?: number
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ForgotPasswordUpdateInput = {
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    user?: UserUpdateOneRequiredWithoutForgotPasswordNestedInput
  }

  export type ForgotPasswordUncheckedUpdateInput = {
    userId?: BigIntFieldUpdateOperationsInput | bigint | number
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ForgotPasswordCreateManyInput = {
    userId: bigint | number
    otp: string
    expiresAt: Date | string
    attempts?: number
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ForgotPasswordUpdateManyMutationInput = {
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ForgotPasswordUncheckedUpdateManyInput = {
    userId?: BigIntFieldUpdateOperationsInput | bigint | number
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StockSpoilageCreateInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutStockSpoilagesInput
    createdByUser?: UserCreateNestedOneWithoutCreatedStockSpoilagesInput
  }

  export type StockSpoilageUncheckedCreateInput = {
    id?: bigint | number
    purchaseId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type StockSpoilageUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutStockSpoilagesNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedStockSpoilagesNestedInput
  }

  export type StockSpoilageUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type StockSpoilageCreateManyInput = {
    id?: bigint | number
    purchaseId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type StockSpoilageUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StockSpoilageUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnCreateInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    saleItem: SaleItemCreateNestedOneWithoutSaleReturnsInput
    purchase: PurchaseCreateNestedOneWithoutSaleReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleReturnsInput
  }

  export type SaleReturnUncheckedCreateInput = {
    id?: bigint | number
    saleItemId: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    saleItem?: SaleItemUpdateOneRequiredWithoutSaleReturnsNestedInput
    purchase?: PurchaseUpdateOneRequiredWithoutSaleReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleReturnsNestedInput
  }

  export type SaleReturnUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnCreateManyInput = {
    id?: bigint | number
    saleItemId: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type SaleReturnUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ArrivalSettlementCreateInput = {
    id?: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutArrivalSettlementInput
    createdByUser?: UserCreateNestedOneWithoutCreatedArrivalSettlementsInput
  }

  export type ArrivalSettlementUncheckedCreateInput = {
    id?: bigint | number
    purchaseId: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalSettlementUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutArrivalSettlementNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedArrivalSettlementsNestedInput
  }

  export type ArrivalSettlementUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ArrivalSettlementCreateManyInput = {
    id?: bigint | number
    purchaseId: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalSettlementUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalSettlementUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ArrivalCustomPattiCreateInput = {
    id?: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutArrivalCustomPattiInput
    createdByUser?: UserCreateNestedOneWithoutCreatedArrivalCustomPattisInput
  }

  export type ArrivalCustomPattiUncheckedCreateInput = {
    id?: bigint | number
    purchaseId: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalCustomPattiUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutArrivalCustomPattiNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedArrivalCustomPattisNestedInput
  }

  export type ArrivalCustomPattiUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ArrivalCustomPattiCreateManyInput = {
    id?: bigint | number
    purchaseId: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalCustomPattiUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalCustomPattiUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationCreateInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    customer?: CustomerCreateNestedOneWithoutQuotationsInput
    items?: QuotationItemCreateNestedManyWithoutQuotationInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationsInput
  }

  export type QuotationUncheckedCreateInput = {
    id?: bigint | number
    quotationNo: string
    customerId?: bigint | number | null
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    items?: QuotationItemUncheckedCreateNestedManyWithoutQuotationInput
  }

  export type QuotationUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customer?: CustomerUpdateOneWithoutQuotationsNestedInput
    items?: QuotationItemUpdateManyWithoutQuotationNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationsNestedInput
  }

  export type QuotationUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: QuotationItemUncheckedUpdateManyWithoutQuotationNestedInput
  }

  export type QuotationCreateManyInput = {
    id?: bigint | number
    quotationNo: string
    customerId?: bigint | number | null
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type QuotationUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemCreateInput = {
    id?: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    quotation: QuotationCreateNestedOneWithoutItemsInput
    vegetable?: VegetableCreateNestedOneWithoutQuotationItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationItemsInput
  }

  export type QuotationItemUncheckedCreateInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationItemUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    quotation?: QuotationUpdateOneRequiredWithoutItemsNestedInput
    vegetable?: VegetableUpdateOneWithoutQuotationItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationItemsNestedInput
  }

  export type QuotationItemUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemCreateManyInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationItemUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type QuotationItemUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseReturnCreateInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutPurchaseReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchaseReturnsInput
  }

  export type PurchaseReturnUncheckedCreateInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseReturnUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutPurchaseReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchaseReturnsNestedInput
  }

  export type PurchaseReturnUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseReturnCreateManyInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseReturnUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type PurchaseReturnUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockCreateInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchase: PurchaseCreateNestedOneWithoutRetailStocksInput
    retailSaleItems?: RetailSaleItemCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnCreateNestedManyWithoutRetailStockInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStocksInput
  }

  export type RetailStockUncheckedCreateInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchase?: PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput
    retailSaleItems?: RetailSaleItemUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUpdateManyWithoutRetailStockNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStocksNestedInput
  }

  export type RetailStockUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type RetailStockCreateManyInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type RetailStockUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type RetailStockUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockReturnCreateInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    retailStock: RetailStockCreateNestedOneWithoutRetailStockReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStockReturnsInput
  }

  export type RetailStockReturnUncheckedCreateInput = {
    id?: bigint | number
    retailStockId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockReturnUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailStockReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStockReturnsNestedInput
  }

  export type RetailStockReturnUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockReturnCreateManyInput = {
    id?: bigint | number
    retailStockId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockReturnUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockReturnUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleCreateInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    items?: RetailSaleItemCreateNestedManyWithoutRetailSaleInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailSalesInput
  }

  export type RetailSaleUncheckedCreateInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    items?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailSaleInput
  }

  export type RetailSaleUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: RetailSaleItemUpdateManyWithoutRetailSaleNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailSalesNestedInput
  }

  export type RetailSaleUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: RetailSaleItemUncheckedUpdateManyWithoutRetailSaleNestedInput
  }

  export type RetailSaleCreateManyInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type RetailSaleUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type RetailSaleUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemCreateInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    retailSale: RetailSaleCreateNestedOneWithoutItemsInput
    retailStock: RetailStockCreateNestedOneWithoutRetailSaleItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailSaleItemsInput
  }

  export type RetailSaleItemUncheckedCreateInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailSale?: RetailSaleUpdateOneRequiredWithoutItemsNestedInput
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailSaleItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailSaleItemsNestedInput
  }

  export type RetailSaleItemUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemCreateManyInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailSaleItemUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockSpoilageCreateInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    retailStock: RetailStockCreateNestedOneWithoutRetailStockSpoilagesInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStockSpoilagesInput
  }

  export type RetailStockSpoilageUncheckedCreateInput = {
    id?: bigint | number
    retailStockId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockSpoilageUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailStockSpoilagesNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStockSpoilagesNestedInput
  }

  export type RetailStockSpoilageUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockSpoilageCreateManyInput = {
    id?: bigint | number
    retailStockId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockSpoilageUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockSpoilageUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type BoxReturnCreateInput = {
    id?: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    supplier: SupplierCreateNestedOneWithoutBoxReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedBoxReturnsInput
  }

  export type BoxReturnUncheckedCreateInput = {
    id?: bigint | number
    supplierId: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type BoxReturnUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    supplier?: SupplierUpdateOneRequiredWithoutBoxReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedBoxReturnsNestedInput
  }

  export type BoxReturnUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type BoxReturnCreateManyInput = {
    id?: bigint | number
    supplierId: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type BoxReturnUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type BoxReturnUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type EmployeeCreateInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    attendances?: AttendanceCreateNestedManyWithoutEmployeeInput
    createdByUser?: UserCreateNestedOneWithoutCreatedEmployeesInput
  }

  export type EmployeeUncheckedCreateInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    attendances?: AttendanceUncheckedCreateNestedManyWithoutEmployeeInput
  }

  export type EmployeeUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    attendances?: AttendanceUpdateManyWithoutEmployeeNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedEmployeesNestedInput
  }

  export type EmployeeUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    attendances?: AttendanceUncheckedUpdateManyWithoutEmployeeNestedInput
  }

  export type EmployeeCreateManyInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type EmployeeUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type EmployeeUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AttendanceCreateInput = {
    id?: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    employee: EmployeeCreateNestedOneWithoutAttendancesInput
    createdByUser?: UserCreateNestedOneWithoutCreatedAttendancesInput
  }

  export type AttendanceUncheckedCreateInput = {
    id?: bigint | number
    employeeId: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type AttendanceUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    employee?: EmployeeUpdateOneRequiredWithoutAttendancesNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedAttendancesNestedInput
  }

  export type AttendanceUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeId?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AttendanceCreateManyInput = {
    id?: bigint | number
    employeeId: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type AttendanceUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type AttendanceUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeId?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AuditLogCreateInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    user?: UserCreateNestedOneWithoutAuditLogsInput
  }

  export type AuditLogUncheckedCreateInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    userId?: bigint | number | null
  }

  export type AuditLogUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    user?: UserUpdateOneWithoutAuditLogsNestedInput
  }

  export type AuditLogUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AuditLogCreateManyInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    userId?: bigint | number | null
  }

  export type AuditLogUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type AuditLogUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type FastBillingCreateInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    items?: FastBillingItemCreateNestedManyWithoutFastBillingInput
    createdByUser?: UserCreateNestedOneWithoutCreatedFastBillingsInput
  }

  export type FastBillingUncheckedCreateInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    items?: FastBillingItemUncheckedCreateNestedManyWithoutFastBillingInput
  }

  export type FastBillingUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    items?: FastBillingItemUpdateManyWithoutFastBillingNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedFastBillingsNestedInput
  }

  export type FastBillingUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: FastBillingItemUncheckedUpdateManyWithoutFastBillingNestedInput
  }

  export type FastBillingCreateManyInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FastBillingUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type FastBillingItemCreateInput = {
    id?: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    fastBilling: FastBillingCreateNestedOneWithoutItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedFastBillingItemsInput
  }

  export type FastBillingItemUncheckedCreateInput = {
    id?: bigint | number
    fastBillingId: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingItemUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    fastBilling?: FastBillingUpdateOneRequiredWithoutItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedFastBillingItemsNestedInput
  }

  export type FastBillingItemUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    fastBillingId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type FastBillingItemCreateManyInput = {
    id?: bigint | number
    fastBillingId: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingItemUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FastBillingItemUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    fastBillingId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CashBankSettingCreateInput = {
    id?: bigint | number
    openingCashInHand?: Decimal | DecimalJsLike | number | string
    openingCashInBank?: Decimal | DecimalJsLike | number | string
    openingDate: Date | string
    remarks?: string | null
    isLocked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankSettingUncheckedCreateInput = {
    id?: bigint | number
    openingCashInHand?: Decimal | DecimalJsLike | number | string
    openingCashInBank?: Decimal | DecimalJsLike | number | string
    openingDate: Date | string
    remarks?: string | null
    isLocked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankSettingUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    openingCashInHand?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isLocked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankSettingUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    openingCashInHand?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isLocked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankSettingCreateManyInput = {
    id?: bigint | number
    openingCashInHand?: Decimal | DecimalJsLike | number | string
    openingCashInBank?: Decimal | DecimalJsLike | number | string
    openingDate: Date | string
    remarks?: string | null
    isLocked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankSettingUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    openingCashInHand?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isLocked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankSettingUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    openingCashInHand?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingCashInBank?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    openingDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isLocked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankTransferCreateInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedByUser?: UserCreateNestedOneWithoutDeletedCashBankTransfersInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCashBankTransfersInput
  }

  export type CashBankTransferUncheckedCreateInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    deletedBy?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type CashBankTransferUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedByUser?: UserUpdateOneWithoutDeletedCashBankTransfersNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCashBankTransfersNestedInput
  }

  export type CashBankTransferUncheckedUpdateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    deletedBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CashBankTransferCreateManyInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    deletedBy?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type CashBankTransferUpdateManyMutationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankTransferUncheckedUpdateManyInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    deletedBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type BigIntFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    in?: bigint[] | number[]
    notIn?: bigint[] | number[]
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntFilter<$PrismaModel> | bigint | number
  }

  export type StringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[]
    notIn?: string[]
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringFilter<$PrismaModel> | string
  }

  export type DateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[]
    notIn?: Date[] | string[]
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeFilter<$PrismaModel> | Date | string
  }

  export type UserListRelationFilter = {
    every?: UserWhereInput
    some?: UserWhereInput
    none?: UserWhereInput
  }

  export type UserOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RoleOrderByRelevanceInput = {
    fields: RoleOrderByRelevanceFieldEnum | RoleOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type RoleCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RoleAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type RoleMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RoleMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RoleSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type BigIntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    in?: bigint[] | number[]
    notIn?: bigint[] | number[]
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedBigIntFilter<$PrismaModel>
    _min?: NestedBigIntFilter<$PrismaModel>
    _max?: NestedBigIntFilter<$PrismaModel>
  }

  export type StringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[]
    notIn?: string[]
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[]
    notIn?: Date[] | string[]
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedDateTimeFilter<$PrismaModel>
    _max?: NestedDateTimeFilter<$PrismaModel>
  }

  export type StringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | null
    notIn?: string[] | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringNullableFilter<$PrismaModel> | string | null
  }

  export type BoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type RoleScalarRelationFilter = {
    is?: RoleWhereInput
    isNot?: RoleWhereInput
  }

  export type ForgotPasswordNullableScalarRelationFilter = {
    is?: ForgotPasswordWhereInput | null
    isNot?: ForgotPasswordWhereInput | null
  }

  export type StateListRelationFilter = {
    every?: StateWhereInput
    some?: StateWhereInput
    none?: StateWhereInput
  }

  export type DistrictListRelationFilter = {
    every?: DistrictWhereInput
    some?: DistrictWhereInput
    none?: DistrictWhereInput
  }

  export type VegetableListRelationFilter = {
    every?: VegetableWhereInput
    some?: VegetableWhereInput
    none?: VegetableWhereInput
  }

  export type CustomerListRelationFilter = {
    every?: CustomerWhereInput
    some?: CustomerWhereInput
    none?: CustomerWhereInput
  }

  export type SupplierListRelationFilter = {
    every?: SupplierWhereInput
    some?: SupplierWhereInput
    none?: SupplierWhereInput
  }

  export type SupplierPaymentListRelationFilter = {
    every?: SupplierPaymentWhereInput
    some?: SupplierPaymentWhereInput
    none?: SupplierPaymentWhereInput
  }

  export type UpiListRelationFilter = {
    every?: UpiWhereInput
    some?: UpiWhereInput
    none?: UpiWhereInput
  }

  export type PurchaseListRelationFilter = {
    every?: PurchaseWhereInput
    some?: PurchaseWhereInput
    none?: PurchaseWhereInput
  }

  export type ShopListRelationFilter = {
    every?: ShopWhereInput
    some?: ShopWhereInput
    none?: ShopWhereInput
  }

  export type SaleListRelationFilter = {
    every?: SaleWhereInput
    some?: SaleWhereInput
    none?: SaleWhereInput
  }

  export type SaleItemListRelationFilter = {
    every?: SaleItemWhereInput
    some?: SaleItemWhereInput
    none?: SaleItemWhereInput
  }

  export type CustomerReceiptListRelationFilter = {
    every?: CustomerReceiptWhereInput
    some?: CustomerReceiptWhereInput
    none?: CustomerReceiptWhereInput
  }

  export type ExpenseListRelationFilter = {
    every?: ExpenseWhereInput
    some?: ExpenseWhereInput
    none?: ExpenseWhereInput
  }

  export type StockSpoilageListRelationFilter = {
    every?: StockSpoilageWhereInput
    some?: StockSpoilageWhereInput
    none?: StockSpoilageWhereInput
  }

  export type SaleReturnListRelationFilter = {
    every?: SaleReturnWhereInput
    some?: SaleReturnWhereInput
    none?: SaleReturnWhereInput
  }

  export type QuotationListRelationFilter = {
    every?: QuotationWhereInput
    some?: QuotationWhereInput
    none?: QuotationWhereInput
  }

  export type QuotationItemListRelationFilter = {
    every?: QuotationItemWhereInput
    some?: QuotationItemWhereInput
    none?: QuotationItemWhereInput
  }

  export type PurchaseReturnListRelationFilter = {
    every?: PurchaseReturnWhereInput
    some?: PurchaseReturnWhereInput
    none?: PurchaseReturnWhereInput
  }

  export type RetailStockListRelationFilter = {
    every?: RetailStockWhereInput
    some?: RetailStockWhereInput
    none?: RetailStockWhereInput
  }

  export type RetailSaleListRelationFilter = {
    every?: RetailSaleWhereInput
    some?: RetailSaleWhereInput
    none?: RetailSaleWhereInput
  }

  export type RetailSaleItemListRelationFilter = {
    every?: RetailSaleItemWhereInput
    some?: RetailSaleItemWhereInput
    none?: RetailSaleItemWhereInput
  }

  export type RetailStockSpoilageListRelationFilter = {
    every?: RetailStockSpoilageWhereInput
    some?: RetailStockSpoilageWhereInput
    none?: RetailStockSpoilageWhereInput
  }

  export type RetailStockReturnListRelationFilter = {
    every?: RetailStockReturnWhereInput
    some?: RetailStockReturnWhereInput
    none?: RetailStockReturnWhereInput
  }

  export type BoxReturnListRelationFilter = {
    every?: BoxReturnWhereInput
    some?: BoxReturnWhereInput
    none?: BoxReturnWhereInput
  }

  export type EmployeeListRelationFilter = {
    every?: EmployeeWhereInput
    some?: EmployeeWhereInput
    none?: EmployeeWhereInput
  }

  export type AttendanceListRelationFilter = {
    every?: AttendanceWhereInput
    some?: AttendanceWhereInput
    none?: AttendanceWhereInput
  }

  export type ArrivalSettlementListRelationFilter = {
    every?: ArrivalSettlementWhereInput
    some?: ArrivalSettlementWhereInput
    none?: ArrivalSettlementWhereInput
  }

  export type ArrivalCustomPattiListRelationFilter = {
    every?: ArrivalCustomPattiWhereInput
    some?: ArrivalCustomPattiWhereInput
    none?: ArrivalCustomPattiWhereInput
  }

  export type FastBillingListRelationFilter = {
    every?: FastBillingWhereInput
    some?: FastBillingWhereInput
    none?: FastBillingWhereInput
  }

  export type FastBillingItemListRelationFilter = {
    every?: FastBillingItemWhereInput
    some?: FastBillingItemWhereInput
    none?: FastBillingItemWhereInput
  }

  export type CashBankTransferListRelationFilter = {
    every?: CashBankTransferWhereInput
    some?: CashBankTransferWhereInput
    none?: CashBankTransferWhereInput
  }

  export type AuditLogListRelationFilter = {
    every?: AuditLogWhereInput
    some?: AuditLogWhereInput
    none?: AuditLogWhereInput
  }

  export type SortOrderInput = {
    sort: SortOrder
    nulls?: NullsOrder
  }

  export type StateOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type DistrictOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type VegetableOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type CustomerOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type SupplierOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type SupplierPaymentOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UpiOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type PurchaseOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ShopOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type SaleOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type SaleItemOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type CustomerReceiptOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ExpenseOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type StockSpoilageOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type SaleReturnOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type QuotationOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type QuotationItemOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type PurchaseReturnOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RetailStockOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RetailSaleOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RetailSaleItemOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RetailStockSpoilageOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RetailStockReturnOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type BoxReturnOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type EmployeeOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type AttendanceOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ArrivalSettlementOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ArrivalCustomPattiOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type FastBillingOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type FastBillingItemOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type CashBankTransferOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type AuditLogOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UserOrderByRelevanceInput = {
    fields: UserOrderByRelevanceFieldEnum | UserOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type UserCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    email?: SortOrder
    mobileNo?: SortOrder
    password?: SortOrder
    roleId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    status?: SortOrder
    profile?: SortOrder
  }

  export type UserAvgOrderByAggregateInput = {
    id?: SortOrder
    roleId?: SortOrder
  }

  export type UserMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    email?: SortOrder
    mobileNo?: SortOrder
    password?: SortOrder
    roleId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    status?: SortOrder
    profile?: SortOrder
  }

  export type UserMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    email?: SortOrder
    mobileNo?: SortOrder
    password?: SortOrder
    roleId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    status?: SortOrder
    profile?: SortOrder
  }

  export type UserSumOrderByAggregateInput = {
    id?: SortOrder
    roleId?: SortOrder
  }

  export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | null
    notIn?: string[] | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }

  export type BoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type BigIntNullableFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | null
    notIn?: bigint[] | number[] | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null
  }

  export type UserNullableScalarRelationFilter = {
    is?: UserWhereInput | null
    isNot?: UserWhereInput | null
  }

  export type StateOrderByRelevanceInput = {
    fields: StateOrderByRelevanceFieldEnum | StateOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type StateCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StateAvgOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type StateMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StateMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StateSumOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type BigIntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | null
    notIn?: bigint[] | number[] | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedBigIntNullableFilter<$PrismaModel>
    _min?: NestedBigIntNullableFilter<$PrismaModel>
    _max?: NestedBigIntNullableFilter<$PrismaModel>
  }

  export type StateScalarRelationFilter = {
    is?: StateWhereInput
    isNot?: StateWhereInput
  }

  export type DistrictOrderByRelevanceInput = {
    fields: DistrictOrderByRelevanceFieldEnum | DistrictOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type DistrictCountOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type DistrictAvgOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    createdBy?: SortOrder
  }

  export type DistrictMaxOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type DistrictMinOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type DistrictSumOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    createdBy?: SortOrder
  }

  export type VegetableOrderByRelevanceInput = {
    fields: VegetableOrderByRelevanceFieldEnum | VegetableOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type VegetableCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    hindiName?: SortOrder
    kannadaName?: SortOrder
    malayalamName?: SortOrder
    teluguName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    hsnCode?: SortOrder
    isFlexible?: SortOrder
    createdBy?: SortOrder
  }

  export type VegetableAvgOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type VegetableMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    hindiName?: SortOrder
    kannadaName?: SortOrder
    malayalamName?: SortOrder
    teluguName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    hsnCode?: SortOrder
    isFlexible?: SortOrder
    createdBy?: SortOrder
  }

  export type VegetableMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    hindiName?: SortOrder
    kannadaName?: SortOrder
    malayalamName?: SortOrder
    teluguName?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    hsnCode?: SortOrder
    isFlexible?: SortOrder
    createdBy?: SortOrder
  }

  export type VegetableSumOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type DecimalFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[]
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[]
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
  }

  export type DateTimeNullableFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | null
    notIn?: Date[] | string[] | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
  }

  export type DistrictScalarRelationFilter = {
    is?: DistrictWhereInput
    isNot?: DistrictWhereInput
  }

  export type CustomerOrderByRelevanceInput = {
    fields: CustomerOrderByRelevanceFieldEnum | CustomerOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type CustomerCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerAvgOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerSumOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    createdBy?: SortOrder
  }

  export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[]
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[]
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedDecimalFilter<$PrismaModel>
    _sum?: NestedDecimalFilter<$PrismaModel>
    _min?: NestedDecimalFilter<$PrismaModel>
    _max?: NestedDecimalFilter<$PrismaModel>
  }

  export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | null
    notIn?: Date[] | string[] | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedDateTimeNullableFilter<$PrismaModel>
    _max?: NestedDateTimeNullableFilter<$PrismaModel>
  }

  export type SupplierOrderByRelevanceInput = {
    fields: SupplierOrderByRelevanceFieldEnum | SupplierOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type SupplierCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierAvgOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    tamilName?: SortOrder
    mobileNo?: SortOrder
    address?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierSumOrderByAggregateInput = {
    id?: SortOrder
    stateId?: SortOrder
    districtId?: SortOrder
    openingBalance?: SortOrder
    outstandingBalance?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumPaymentModeFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel>
    in?: $Enums.PaymentMode[]
    notIn?: $Enums.PaymentMode[]
    not?: NestedEnumPaymentModeFilter<$PrismaModel> | $Enums.PaymentMode
  }

  export type EnumSupplierPaymentTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.SupplierPaymentType | EnumSupplierPaymentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.SupplierPaymentType[]
    notIn?: $Enums.SupplierPaymentType[]
    not?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel> | $Enums.SupplierPaymentType
  }

  export type SupplierScalarRelationFilter = {
    is?: SupplierWhereInput
    isNot?: SupplierWhereInput
  }

  export type SupplierPaymentOrderByRelevanceInput = {
    fields: SupplierPaymentOrderByRelevanceFieldEnum | SupplierPaymentOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type SupplierPaymentCountOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    paymentDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    type?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierPaymentAvgOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierPaymentMaxOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    paymentDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    type?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierPaymentMinOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    paymentDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    type?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SupplierPaymentSumOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumPaymentModeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel>
    in?: $Enums.PaymentMode[]
    notIn?: $Enums.PaymentMode[]
    not?: NestedEnumPaymentModeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMode
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPaymentModeFilter<$PrismaModel>
    _max?: NestedEnumPaymentModeFilter<$PrismaModel>
  }

  export type EnumSupplierPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SupplierPaymentType | EnumSupplierPaymentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.SupplierPaymentType[]
    notIn?: $Enums.SupplierPaymentType[]
    not?: NestedEnumSupplierPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.SupplierPaymentType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel>
    _max?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel>
  }

  export type IntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[]
    notIn?: number[]
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }

  export type UpiOrderByRelevanceInput = {
    fields: UpiOrderByRelevanceFieldEnum | UpiOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type UpiCountOrderByAggregateInput = {
    id?: SortOrder
    upiId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type UpiAvgOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type UpiMaxOrderByAggregateInput = {
    id?: SortOrder
    upiId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type UpiMinOrderByAggregateInput = {
    id?: SortOrder
    upiId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type UpiSumOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type IntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[]
    notIn?: number[]
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedIntFilter<$PrismaModel>
    _min?: NestedIntFilter<$PrismaModel>
    _max?: NestedIntFilter<$PrismaModel>
  }

  export type EnumPurchaseTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseType | EnumPurchaseTypeFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseType[]
    notIn?: $Enums.PurchaseType[]
    not?: NestedEnumPurchaseTypeFilter<$PrismaModel> | $Enums.PurchaseType
  }

  export type EnumPurchaseStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseStatus | EnumPurchaseStatusFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseStatus[]
    notIn?: $Enums.PurchaseStatus[]
    not?: NestedEnumPurchaseStatusFilter<$PrismaModel> | $Enums.PurchaseStatus
  }

  export type EnumPurchaseUnitFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseUnit | EnumPurchaseUnitFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseUnit[]
    notIn?: $Enums.PurchaseUnit[]
    not?: NestedEnumPurchaseUnitFilter<$PrismaModel> | $Enums.PurchaseUnit
  }

  export type EnumRateTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.RateType | EnumRateTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RateType[]
    notIn?: $Enums.RateType[]
    not?: NestedEnumRateTypeFilter<$PrismaModel> | $Enums.RateType
  }

  export type DecimalNullableFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
  }

  export type SupplierNullableScalarRelationFilter = {
    is?: SupplierWhereInput | null
    isNot?: SupplierWhereInput | null
  }

  export type VegetableScalarRelationFilter = {
    is?: VegetableWhereInput
    isNot?: VegetableWhereInput
  }

  export type ArrivalSettlementNullableScalarRelationFilter = {
    is?: ArrivalSettlementWhereInput | null
    isNot?: ArrivalSettlementWhereInput | null
  }

  export type ArrivalCustomPattiNullableScalarRelationFilter = {
    is?: ArrivalCustomPattiWhereInput | null
    isNot?: ArrivalCustomPattiWhereInput | null
  }

  export type PurchaseOrderByRelevanceInput = {
    fields: PurchaseOrderByRelevanceFieldEnum | PurchaseOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type PurchaseCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseDate?: SortOrder
    billNo?: SortOrder
    supplierId?: SortOrder
    cashSupplierName?: SortOrder
    vegetableId?: SortOrder
    lotNo?: SortOrder
    purchaseType?: SortOrder
    status?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    dateOfDespatch?: SortOrder
    arrivalDate?: SortOrder
    placeOfDespatch?: SortOrder
    placeOfArrival?: SortOrder
    truckNo?: SortOrder
    agentName?: SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    remarks?: SortOrder
    closedAt?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseAvgOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    vegetableId?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseDate?: SortOrder
    billNo?: SortOrder
    supplierId?: SortOrder
    cashSupplierName?: SortOrder
    vegetableId?: SortOrder
    lotNo?: SortOrder
    purchaseType?: SortOrder
    status?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    dateOfDespatch?: SortOrder
    arrivalDate?: SortOrder
    placeOfDespatch?: SortOrder
    placeOfArrival?: SortOrder
    truckNo?: SortOrder
    agentName?: SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    remarks?: SortOrder
    closedAt?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseDate?: SortOrder
    billNo?: SortOrder
    supplierId?: SortOrder
    cashSupplierName?: SortOrder
    vegetableId?: SortOrder
    lotNo?: SortOrder
    purchaseType?: SortOrder
    status?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    dateOfDespatch?: SortOrder
    arrivalDate?: SortOrder
    placeOfDespatch?: SortOrder
    placeOfArrival?: SortOrder
    truckNo?: SortOrder
    agentName?: SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    remarks?: SortOrder
    closedAt?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseSumOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    vegetableId?: SortOrder
    bags?: SortOrder
    weightPerBag?: SortOrder
    quantity?: SortOrder
    ratePerUnit?: SortOrder
    freight?: SortOrder
    extraFreight?: SortOrder
    associationFee?: SortOrder
    unloadingFee?: SortOrder
    miscellaneousFee?: SortOrder
    totalFreight?: SortOrder
    transportFee?: SortOrder
    loadingUnloadingFee?: SortOrder
    otherCharges?: SortOrder
    thaiyalCharges?: SortOrder
    extraCharges?: SortOrder
    goodsTotal?: SortOrder
    surchargeTotal?: SortOrder
    costPerUnit?: SortOrder
    grandTotal?: SortOrder
    advanceAmount?: SortOrder
    balanceAmount?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumPurchaseTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseType | EnumPurchaseTypeFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseType[]
    notIn?: $Enums.PurchaseType[]
    not?: NestedEnumPurchaseTypeWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseTypeFilter<$PrismaModel>
    _max?: NestedEnumPurchaseTypeFilter<$PrismaModel>
  }

  export type EnumPurchaseStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseStatus | EnumPurchaseStatusFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseStatus[]
    notIn?: $Enums.PurchaseStatus[]
    not?: NestedEnumPurchaseStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseStatusFilter<$PrismaModel>
    _max?: NestedEnumPurchaseStatusFilter<$PrismaModel>
  }

  export type EnumPurchaseUnitWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseUnit | EnumPurchaseUnitFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseUnit[]
    notIn?: $Enums.PurchaseUnit[]
    not?: NestedEnumPurchaseUnitWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseUnit
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseUnitFilter<$PrismaModel>
    _max?: NestedEnumPurchaseUnitFilter<$PrismaModel>
  }

  export type EnumRateTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.RateType | EnumRateTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RateType[]
    notIn?: $Enums.RateType[]
    not?: NestedEnumRateTypeWithAggregatesFilter<$PrismaModel> | $Enums.RateType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumRateTypeFilter<$PrismaModel>
    _max?: NestedEnumRateTypeFilter<$PrismaModel>
  }

  export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedDecimalNullableFilter<$PrismaModel>
    _sum?: NestedDecimalNullableFilter<$PrismaModel>
    _min?: NestedDecimalNullableFilter<$PrismaModel>
    _max?: NestedDecimalNullableFilter<$PrismaModel>
  }

  export type ShopOrderByRelevanceInput = {
    fields: ShopOrderByRelevanceFieldEnum | ShopOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type ShopCountOrderByAggregateInput = {
    id?: SortOrder
    shopName?: SortOrder
    shortName?: SortOrder
    address?: SortOrder
    mobile?: SortOrder
    mobile2?: SortOrder
    mapUrl?: SortOrder
    godName1?: SortOrder
    godName2?: SortOrder
    godName3?: SortOrder
    logo?: SortOrder
    godImage1?: SortOrder
    godImage2?: SortOrder
    authorizedSign?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ShopAvgOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type ShopMaxOrderByAggregateInput = {
    id?: SortOrder
    shopName?: SortOrder
    shortName?: SortOrder
    address?: SortOrder
    mobile?: SortOrder
    mobile2?: SortOrder
    mapUrl?: SortOrder
    godName1?: SortOrder
    godName2?: SortOrder
    godName3?: SortOrder
    logo?: SortOrder
    godImage1?: SortOrder
    godImage2?: SortOrder
    authorizedSign?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ShopMinOrderByAggregateInput = {
    id?: SortOrder
    shopName?: SortOrder
    shortName?: SortOrder
    address?: SortOrder
    mobile?: SortOrder
    mobile2?: SortOrder
    mapUrl?: SortOrder
    godName1?: SortOrder
    godName2?: SortOrder
    godName3?: SortOrder
    logo?: SortOrder
    godImage1?: SortOrder
    godImage2?: SortOrder
    authorizedSign?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ShopSumOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumSalePaymentStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.SalePaymentStatus | EnumSalePaymentStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SalePaymentStatus[]
    notIn?: $Enums.SalePaymentStatus[]
    not?: NestedEnumSalePaymentStatusFilter<$PrismaModel> | $Enums.SalePaymentStatus
  }
  export type JsonNullableFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type CustomerNullableScalarRelationFilter = {
    is?: CustomerWhereInput | null
    isNot?: CustomerWhereInput | null
  }

  export type SaleOrderByRelevanceInput = {
    fields: SaleOrderByRelevanceFieldEnum | SaleOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type SaleCountOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    customerId?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    images?: SortOrder
    invoiceDownloadToken?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleAvgOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleMaxOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    customerId?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    invoiceDownloadToken?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleMinOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    customerId?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    invoiceDownloadToken?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleSumOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    freightCharge?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    cashAmount?: SortOrder
    upiAmount?: SortOrder
    bankAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumSalePaymentStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SalePaymentStatus | EnumSalePaymentStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SalePaymentStatus[]
    notIn?: $Enums.SalePaymentStatus[]
    not?: NestedEnumSalePaymentStatusWithAggregatesFilter<$PrismaModel> | $Enums.SalePaymentStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSalePaymentStatusFilter<$PrismaModel>
    _max?: NestedEnumSalePaymentStatusFilter<$PrismaModel>
  }
  export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedJsonNullableFilter<$PrismaModel>
    _max?: NestedJsonNullableFilter<$PrismaModel>
  }

  export type SaleScalarRelationFilter = {
    is?: SaleWhereInput
    isNot?: SaleWhereInput
  }

  export type PurchaseScalarRelationFilter = {
    is?: PurchaseWhereInput
    isNot?: PurchaseWhereInput
  }

  export type SaleItemCountOrderByAggregateInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleItemAvgOrderByAggregateInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleItemMaxOrderByAggregateInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleItemMinOrderByAggregateInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleItemSumOrderByAggregateInput = {
    id?: SortOrder
    saleId?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerScalarRelationFilter = {
    is?: CustomerWhereInput
    isNot?: CustomerWhereInput
  }

  export type CustomerReceiptOrderByRelevanceInput = {
    fields: CustomerReceiptOrderByRelevanceFieldEnum | CustomerReceiptOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type CustomerReceiptCountOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    receiptDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerReceiptAvgOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerReceiptMaxOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    receiptDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerReceiptMinOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    receiptDate?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    isWhatsappMessageSent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CustomerReceiptSumOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseNullableScalarRelationFilter = {
    is?: PurchaseWhereInput | null
    isNot?: PurchaseWhereInput | null
  }

  export type ExpenseOrderByRelevanceInput = {
    fields: ExpenseOrderByRelevanceFieldEnum | ExpenseOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type ExpenseCountOrderByAggregateInput = {
    id?: SortOrder
    expenseDate?: SortOrder
    category?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    purchaseId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ExpenseAvgOrderByAggregateInput = {
    id?: SortOrder
    amount?: SortOrder
    purchaseId?: SortOrder
    createdBy?: SortOrder
  }

  export type ExpenseMaxOrderByAggregateInput = {
    id?: SortOrder
    expenseDate?: SortOrder
    category?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    purchaseId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ExpenseMinOrderByAggregateInput = {
    id?: SortOrder
    expenseDate?: SortOrder
    category?: SortOrder
    amount?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    purchaseId?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ExpenseSumOrderByAggregateInput = {
    id?: SortOrder
    amount?: SortOrder
    purchaseId?: SortOrder
    createdBy?: SortOrder
  }

  export type UserScalarRelationFilter = {
    is?: UserWhereInput
    isNot?: UserWhereInput
  }

  export type ForgotPasswordOrderByRelevanceInput = {
    fields: ForgotPasswordOrderByRelevanceFieldEnum | ForgotPasswordOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type ForgotPasswordCountOrderByAggregateInput = {
    userId?: SortOrder
    otp?: SortOrder
    expiresAt?: SortOrder
    attempts?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ForgotPasswordAvgOrderByAggregateInput = {
    userId?: SortOrder
    attempts?: SortOrder
  }

  export type ForgotPasswordMaxOrderByAggregateInput = {
    userId?: SortOrder
    otp?: SortOrder
    expiresAt?: SortOrder
    attempts?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ForgotPasswordMinOrderByAggregateInput = {
    userId?: SortOrder
    otp?: SortOrder
    expiresAt?: SortOrder
    attempts?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ForgotPasswordSumOrderByAggregateInput = {
    userId?: SortOrder
    attempts?: SortOrder
  }

  export type StockSpoilageOrderByRelevanceInput = {
    fields: StockSpoilageOrderByRelevanceFieldEnum | StockSpoilageOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type StockSpoilageCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StockSpoilageAvgOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    createdBy?: SortOrder
  }

  export type StockSpoilageMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StockSpoilageMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type StockSpoilageSumOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleItemScalarRelationFilter = {
    is?: SaleItemWhereInput
    isNot?: SaleItemWhereInput
  }

  export type SaleReturnOrderByRelevanceInput = {
    fields: SaleReturnOrderByRelevanceFieldEnum | SaleReturnOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type SaleReturnCountOrderByAggregateInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleReturnAvgOrderByAggregateInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleReturnMaxOrderByAggregateInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleReturnMinOrderByAggregateInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type SaleReturnSumOrderByAggregateInput = {
    id?: SortOrder
    saleItemId?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    returnAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumSettlementStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.SettlementStatus | EnumSettlementStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SettlementStatus[]
    notIn?: $Enums.SettlementStatus[]
    not?: NestedEnumSettlementStatusFilter<$PrismaModel> | $Enums.SettlementStatus
  }

  export type EnumPaymentModeNullableFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel> | null
    in?: $Enums.PaymentMode[] | null
    notIn?: $Enums.PaymentMode[] | null
    not?: NestedEnumPaymentModeNullableFilter<$PrismaModel> | $Enums.PaymentMode | null
  }

  export type ArrivalSettlementOrderByRelevanceInput = {
    fields: ArrivalSettlementOrderByRelevanceFieldEnum | ArrivalSettlementOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type ArrivalSettlementCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    settlementNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    status?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalSettlementAvgOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalSettlementMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    settlementNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    status?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalSettlementMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    settlementNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    status?: SortOrder
    paymentMode?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalSettlementSumOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    paidAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumSettlementStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SettlementStatus | EnumSettlementStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SettlementStatus[]
    notIn?: $Enums.SettlementStatus[]
    not?: NestedEnumSettlementStatusWithAggregatesFilter<$PrismaModel> | $Enums.SettlementStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSettlementStatusFilter<$PrismaModel>
    _max?: NestedEnumSettlementStatusFilter<$PrismaModel>
  }

  export type EnumPaymentModeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel> | null
    in?: $Enums.PaymentMode[] | null
    notIn?: $Enums.PaymentMode[] | null
    not?: NestedEnumPaymentModeNullableWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMode | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedEnumPaymentModeNullableFilter<$PrismaModel>
    _max?: NestedEnumPaymentModeNullableFilter<$PrismaModel>
  }
  export type JsonFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>

  export type JsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type ArrivalCustomPattiOrderByRelevanceInput = {
    fields: ArrivalCustomPattiOrderByRelevanceFieldEnum | ArrivalCustomPattiOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type ArrivalCustomPattiCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    pattiNo?: SortOrder
    settlementDate?: SortOrder
    items?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalCustomPattiAvgOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalCustomPattiMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    pattiNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalCustomPattiMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    pattiNo?: SortOrder
    settlementDate?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type ArrivalCustomPattiSumOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    totalWeightSold?: SortOrder
    grossSalesTotal?: SortOrder
    commissionPercent?: SortOrder
    commissionAmount?: SortOrder
    freightDeducted?: SortOrder
    extraFreightDeducted?: SortOrder
    associationDeducted?: SortOrder
    unloadingDeducted?: SortOrder
    miscDeducted?: SortOrder
    totalDeductions?: SortOrder
    advanceAdjusted?: SortOrder
    netPayable?: SortOrder
    createdBy?: SortOrder
  }
  export type JsonWithAggregatesFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedJsonFilter<$PrismaModel>
    _max?: NestedJsonFilter<$PrismaModel>
  }

  export type QuotationOrderByRelevanceInput = {
    fields: QuotationOrderByRelevanceFieldEnum | QuotationOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type QuotationCountOrderByAggregateInput = {
    id?: SortOrder
    quotationNo?: SortOrder
    customerId?: SortOrder
    customerName?: SortOrder
    quotationDate?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationAvgOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationMaxOrderByAggregateInput = {
    id?: SortOrder
    quotationNo?: SortOrder
    customerId?: SortOrder
    customerName?: SortOrder
    quotationDate?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationMinOrderByAggregateInput = {
    id?: SortOrder
    quotationNo?: SortOrder
    customerId?: SortOrder
    customerName?: SortOrder
    quotationDate?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationSumOrderByAggregateInput = {
    id?: SortOrder
    customerId?: SortOrder
    amount?: SortOrder
    extraCharge?: SortOrder
    discount?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationScalarRelationFilter = {
    is?: QuotationWhereInput
    isNot?: QuotationWhereInput
  }

  export type VegetableNullableScalarRelationFilter = {
    is?: VegetableWhereInput | null
    isNot?: VegetableWhereInput | null
  }

  export type QuotationItemOrderByRelevanceInput = {
    fields: QuotationItemOrderByRelevanceFieldEnum | QuotationItemOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type QuotationItemCountOrderByAggregateInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrder
    vegName?: SortOrder
    hsnCode?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationItemAvgOrderByAggregateInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrder
    quantity?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationItemMaxOrderByAggregateInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrder
    vegName?: SortOrder
    hsnCode?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationItemMinOrderByAggregateInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrder
    vegName?: SortOrder
    hsnCode?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type QuotationItemSumOrderByAggregateInput = {
    id?: SortOrder
    quotationId?: SortOrder
    vegetableId?: SortOrder
    quantity?: SortOrder
    price?: SortOrder
    amount?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseReturnOrderByRelevanceInput = {
    fields: PurchaseReturnOrderByRelevanceFieldEnum | PurchaseReturnOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type PurchaseReturnCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseReturnAvgOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    returnAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseReturnMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseReturnMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    returnAmount?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type PurchaseReturnSumOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    returnAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockOrderByRelevanceInput = {
    fields: RetailStockOrderByRelevanceFieldEnum | RetailStockOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type RetailStockCountOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    lotNo?: SortOrder
    allocatedUnit?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    costPerUnit?: SortOrder
    allocationDate?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockAvgOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    costPerUnit?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockMaxOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    lotNo?: SortOrder
    allocatedUnit?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    costPerUnit?: SortOrder
    allocationDate?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockMinOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    lotNo?: SortOrder
    allocatedUnit?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    costPerUnit?: SortOrder
    allocationDate?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSumOrderByAggregateInput = {
    id?: SortOrder
    purchaseId?: SortOrder
    allocatedQty?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    remainingQuantity?: SortOrder
    remainingBags?: SortOrder
    costPerUnit?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockScalarRelationFilter = {
    is?: RetailStockWhereInput
    isNot?: RetailStockWhereInput
  }

  export type RetailStockReturnOrderByRelevanceInput = {
    fields: RetailStockReturnOrderByRelevanceFieldEnum | RetailStockReturnOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type RetailStockReturnCountOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockReturnAvgOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockReturnMaxOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockReturnMinOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    returnDate?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockReturnSumOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleOrderByRelevanceInput = {
    fields: RetailSaleOrderByRelevanceFieldEnum | RetailSaleOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type RetailSaleCountOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentMode?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    movedToWholesale?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleAvgOrderByAggregateInput = {
    id?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleMaxOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentMode?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    movedToWholesale?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleMinOrderByAggregateInput = {
    id?: SortOrder
    invoiceNo?: SortOrder
    walkInName?: SortOrder
    walkInMobile?: SortOrder
    invoiceDate?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    paymentMode?: SortOrder
    paymentStatus?: SortOrder
    remarks?: SortOrder
    movedToWholesale?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleSumOrderByAggregateInput = {
    id?: SortOrder
    subTotal?: SortOrder
    discount?: SortOrder
    grandTotal?: SortOrder
    receivedAmount?: SortOrder
    balanceAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleScalarRelationFilter = {
    is?: RetailSaleWhereInput
    isNot?: RetailSaleWhereInput
  }

  export type RetailSaleItemCountOrderByAggregateInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleItemAvgOrderByAggregateInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleItemMaxOrderByAggregateInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleItemMinOrderByAggregateInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    saleUnit?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailSaleItemSumOrderByAggregateInput = {
    id?: SortOrder
    retailSaleId?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    bags?: SortOrder
    costPerUnit?: SortOrder
    sellingRate?: SortOrder
    total?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSpoilageOrderByRelevanceInput = {
    fields: RetailStockSpoilageOrderByRelevanceFieldEnum | RetailStockSpoilageOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type RetailStockSpoilageCountOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSpoilageAvgOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSpoilageMaxOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSpoilageMinOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    spoilageDate?: SortOrder
    quantity?: SortOrder
    reason?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type RetailStockSpoilageSumOrderByAggregateInput = {
    id?: SortOrder
    retailStockId?: SortOrder
    quantity?: SortOrder
    createdBy?: SortOrder
  }

  export type BoxReturnOrderByRelevanceInput = {
    fields: BoxReturnOrderByRelevanceFieldEnum | BoxReturnOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type BoxReturnCountOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    returnDate?: SortOrder
    boxCount?: SortOrder
    remarks?: SortOrder
    signature?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type BoxReturnAvgOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    boxCount?: SortOrder
    createdBy?: SortOrder
  }

  export type BoxReturnMaxOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    returnDate?: SortOrder
    boxCount?: SortOrder
    remarks?: SortOrder
    signature?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type BoxReturnMinOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    returnDate?: SortOrder
    boxCount?: SortOrder
    remarks?: SortOrder
    signature?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type BoxReturnSumOrderByAggregateInput = {
    id?: SortOrder
    supplierId?: SortOrder
    boxCount?: SortOrder
    createdBy?: SortOrder
  }

  export type EmployeeOrderByRelevanceInput = {
    fields: EmployeeOrderByRelevanceFieldEnum | EmployeeOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type EmployeeCountOrderByAggregateInput = {
    id?: SortOrder
    employeeCode?: SortOrder
    name?: SortOrder
    mobile?: SortOrder
    designation?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type EmployeeAvgOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type EmployeeMaxOrderByAggregateInput = {
    id?: SortOrder
    employeeCode?: SortOrder
    name?: SortOrder
    mobile?: SortOrder
    designation?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type EmployeeMinOrderByAggregateInput = {
    id?: SortOrder
    employeeCode?: SortOrder
    name?: SortOrder
    mobile?: SortOrder
    designation?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    deletedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type EmployeeSumOrderByAggregateInput = {
    id?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumAttendanceStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.AttendanceStatus | EnumAttendanceStatusFieldRefInput<$PrismaModel>
    in?: $Enums.AttendanceStatus[]
    notIn?: $Enums.AttendanceStatus[]
    not?: NestedEnumAttendanceStatusFilter<$PrismaModel> | $Enums.AttendanceStatus
  }

  export type EmployeeScalarRelationFilter = {
    is?: EmployeeWhereInput
    isNot?: EmployeeWhereInput
  }

  export type AttendanceOrderByRelevanceInput = {
    fields: AttendanceOrderByRelevanceFieldEnum | AttendanceOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type AttendanceEmployeeIdDateCompoundUniqueInput = {
    employeeId: bigint | number
    date: Date | string
  }

  export type AttendanceCountOrderByAggregateInput = {
    id?: SortOrder
    employeeId?: SortOrder
    date?: SortOrder
    status?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type AttendanceAvgOrderByAggregateInput = {
    id?: SortOrder
    employeeId?: SortOrder
    createdBy?: SortOrder
  }

  export type AttendanceMaxOrderByAggregateInput = {
    id?: SortOrder
    employeeId?: SortOrder
    date?: SortOrder
    status?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type AttendanceMinOrderByAggregateInput = {
    id?: SortOrder
    employeeId?: SortOrder
    date?: SortOrder
    status?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type AttendanceSumOrderByAggregateInput = {
    id?: SortOrder
    employeeId?: SortOrder
    createdBy?: SortOrder
  }

  export type EnumAttendanceStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.AttendanceStatus | EnumAttendanceStatusFieldRefInput<$PrismaModel>
    in?: $Enums.AttendanceStatus[]
    notIn?: $Enums.AttendanceStatus[]
    not?: NestedEnumAttendanceStatusWithAggregatesFilter<$PrismaModel> | $Enums.AttendanceStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumAttendanceStatusFilter<$PrismaModel>
    _max?: NestedEnumAttendanceStatusFilter<$PrismaModel>
  }

  export type EnumAuditActionFilter<$PrismaModel = never> = {
    equals?: $Enums.AuditAction | EnumAuditActionFieldRefInput<$PrismaModel>
    in?: $Enums.AuditAction[]
    notIn?: $Enums.AuditAction[]
    not?: NestedEnumAuditActionFilter<$PrismaModel> | $Enums.AuditAction
  }

  export type AuditLogOrderByRelevanceInput = {
    fields: AuditLogOrderByRelevanceFieldEnum | AuditLogOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type AuditLogCountOrderByAggregateInput = {
    id?: SortOrder
    entityName?: SortOrder
    entityId?: SortOrder
    action?: SortOrder
    oldValues?: SortOrder
    newValues?: SortOrder
    createdAt?: SortOrder
    userId?: SortOrder
  }

  export type AuditLogAvgOrderByAggregateInput = {
    id?: SortOrder
    entityId?: SortOrder
    userId?: SortOrder
  }

  export type AuditLogMaxOrderByAggregateInput = {
    id?: SortOrder
    entityName?: SortOrder
    entityId?: SortOrder
    action?: SortOrder
    createdAt?: SortOrder
    userId?: SortOrder
  }

  export type AuditLogMinOrderByAggregateInput = {
    id?: SortOrder
    entityName?: SortOrder
    entityId?: SortOrder
    action?: SortOrder
    createdAt?: SortOrder
    userId?: SortOrder
  }

  export type AuditLogSumOrderByAggregateInput = {
    id?: SortOrder
    entityId?: SortOrder
    userId?: SortOrder
  }

  export type EnumAuditActionWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.AuditAction | EnumAuditActionFieldRefInput<$PrismaModel>
    in?: $Enums.AuditAction[]
    notIn?: $Enums.AuditAction[]
    not?: NestedEnumAuditActionWithAggregatesFilter<$PrismaModel> | $Enums.AuditAction
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumAuditActionFilter<$PrismaModel>
    _max?: NestedEnumAuditActionFilter<$PrismaModel>
  }

  export type FastBillingOrderByRelevanceInput = {
    fields: FastBillingOrderByRelevanceFieldEnum | FastBillingOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type FastBillingCountOrderByAggregateInput = {
    id?: SortOrder
    billNo?: SortOrder
    billDate?: SortOrder
    customerName?: SortOrder
    totalAmount?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingAvgOrderByAggregateInput = {
    id?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingMaxOrderByAggregateInput = {
    id?: SortOrder
    billNo?: SortOrder
    billDate?: SortOrder
    customerName?: SortOrder
    totalAmount?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingMinOrderByAggregateInput = {
    id?: SortOrder
    billNo?: SortOrder
    billDate?: SortOrder
    customerName?: SortOrder
    totalAmount?: SortOrder
    remarks?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingSumOrderByAggregateInput = {
    id?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingScalarRelationFilter = {
    is?: FastBillingWhereInput
    isNot?: FastBillingWhereInput
  }

  export type FastBillingItemOrderByRelevanceInput = {
    fields: FastBillingItemOrderByRelevanceFieldEnum | FastBillingItemOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type FastBillingItemCountOrderByAggregateInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    vegetableName?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    numberOfBoxes?: SortOrder
    numberOfThaar?: SortOrder
    numberOfPieces?: SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingItemAvgOrderByAggregateInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    quantity?: SortOrder
    numberOfBoxes?: SortOrder
    numberOfThaar?: SortOrder
    numberOfPieces?: SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingItemMaxOrderByAggregateInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    vegetableName?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    numberOfBoxes?: SortOrder
    numberOfThaar?: SortOrder
    numberOfPieces?: SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingItemMinOrderByAggregateInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    vegetableName?: SortOrder
    quantity?: SortOrder
    unit?: SortOrder
    rateType?: SortOrder
    numberOfBoxes?: SortOrder
    numberOfThaar?: SortOrder
    numberOfPieces?: SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrder
    totalAmount?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type FastBillingItemSumOrderByAggregateInput = {
    id?: SortOrder
    fastBillingId?: SortOrder
    quantity?: SortOrder
    numberOfBoxes?: SortOrder
    numberOfThaar?: SortOrder
    numberOfPieces?: SortOrder
    ratePerUnit?: SortOrder
    extraCharges?: SortOrder
    totalAmount?: SortOrder
    createdBy?: SortOrder
  }

  export type CashBankSettingOrderByRelevanceInput = {
    fields: CashBankSettingOrderByRelevanceFieldEnum | CashBankSettingOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type CashBankSettingCountOrderByAggregateInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
    openingDate?: SortOrder
    remarks?: SortOrder
    isLocked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type CashBankSettingAvgOrderByAggregateInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
  }

  export type CashBankSettingMaxOrderByAggregateInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
    openingDate?: SortOrder
    remarks?: SortOrder
    isLocked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type CashBankSettingMinOrderByAggregateInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
    openingDate?: SortOrder
    remarks?: SortOrder
    isLocked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type CashBankSettingSumOrderByAggregateInput = {
    id?: SortOrder
    openingCashInHand?: SortOrder
    openingCashInBank?: SortOrder
  }

  export type CashBankTransferOrderByRelevanceInput = {
    fields: CashBankTransferOrderByRelevanceFieldEnum | CashBankTransferOrderByRelevanceFieldEnum[]
    sort: SortOrder
    search: string
  }

  export type CashBankTransferCountOrderByAggregateInput = {
    id?: SortOrder
    transferDate?: SortOrder
    amount?: SortOrder
    fromAccount?: SortOrder
    toAccount?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    deletedAt?: SortOrder
    deletedBy?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CashBankTransferAvgOrderByAggregateInput = {
    id?: SortOrder
    amount?: SortOrder
    deletedBy?: SortOrder
    createdBy?: SortOrder
  }

  export type CashBankTransferMaxOrderByAggregateInput = {
    id?: SortOrder
    transferDate?: SortOrder
    amount?: SortOrder
    fromAccount?: SortOrder
    toAccount?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    deletedAt?: SortOrder
    deletedBy?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CashBankTransferMinOrderByAggregateInput = {
    id?: SortOrder
    transferDate?: SortOrder
    amount?: SortOrder
    fromAccount?: SortOrder
    toAccount?: SortOrder
    referenceNo?: SortOrder
    remarks?: SortOrder
    deletedAt?: SortOrder
    deletedBy?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    createdBy?: SortOrder
  }

  export type CashBankTransferSumOrderByAggregateInput = {
    id?: SortOrder
    amount?: SortOrder
    deletedBy?: SortOrder
    createdBy?: SortOrder
  }

  export type UserCreateNestedManyWithoutRoleInput = {
    create?: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput> | UserCreateWithoutRoleInput[] | UserUncheckedCreateWithoutRoleInput[]
    connectOrCreate?: UserCreateOrConnectWithoutRoleInput | UserCreateOrConnectWithoutRoleInput[]
    createMany?: UserCreateManyRoleInputEnvelope
    connect?: UserWhereUniqueInput | UserWhereUniqueInput[]
  }

  export type UserUncheckedCreateNestedManyWithoutRoleInput = {
    create?: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput> | UserCreateWithoutRoleInput[] | UserUncheckedCreateWithoutRoleInput[]
    connectOrCreate?: UserCreateOrConnectWithoutRoleInput | UserCreateOrConnectWithoutRoleInput[]
    createMany?: UserCreateManyRoleInputEnvelope
    connect?: UserWhereUniqueInput | UserWhereUniqueInput[]
  }

  export type BigIntFieldUpdateOperationsInput = {
    set?: bigint | number
    increment?: bigint | number
    decrement?: bigint | number
    multiply?: bigint | number
    divide?: bigint | number
  }

  export type StringFieldUpdateOperationsInput = {
    set?: string
  }

  export type DateTimeFieldUpdateOperationsInput = {
    set?: Date | string
  }

  export type UserUpdateManyWithoutRoleNestedInput = {
    create?: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput> | UserCreateWithoutRoleInput[] | UserUncheckedCreateWithoutRoleInput[]
    connectOrCreate?: UserCreateOrConnectWithoutRoleInput | UserCreateOrConnectWithoutRoleInput[]
    upsert?: UserUpsertWithWhereUniqueWithoutRoleInput | UserUpsertWithWhereUniqueWithoutRoleInput[]
    createMany?: UserCreateManyRoleInputEnvelope
    set?: UserWhereUniqueInput | UserWhereUniqueInput[]
    disconnect?: UserWhereUniqueInput | UserWhereUniqueInput[]
    delete?: UserWhereUniqueInput | UserWhereUniqueInput[]
    connect?: UserWhereUniqueInput | UserWhereUniqueInput[]
    update?: UserUpdateWithWhereUniqueWithoutRoleInput | UserUpdateWithWhereUniqueWithoutRoleInput[]
    updateMany?: UserUpdateManyWithWhereWithoutRoleInput | UserUpdateManyWithWhereWithoutRoleInput[]
    deleteMany?: UserScalarWhereInput | UserScalarWhereInput[]
  }

  export type UserUncheckedUpdateManyWithoutRoleNestedInput = {
    create?: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput> | UserCreateWithoutRoleInput[] | UserUncheckedCreateWithoutRoleInput[]
    connectOrCreate?: UserCreateOrConnectWithoutRoleInput | UserCreateOrConnectWithoutRoleInput[]
    upsert?: UserUpsertWithWhereUniqueWithoutRoleInput | UserUpsertWithWhereUniqueWithoutRoleInput[]
    createMany?: UserCreateManyRoleInputEnvelope
    set?: UserWhereUniqueInput | UserWhereUniqueInput[]
    disconnect?: UserWhereUniqueInput | UserWhereUniqueInput[]
    delete?: UserWhereUniqueInput | UserWhereUniqueInput[]
    connect?: UserWhereUniqueInput | UserWhereUniqueInput[]
    update?: UserUpdateWithWhereUniqueWithoutRoleInput | UserUpdateWithWhereUniqueWithoutRoleInput[]
    updateMany?: UserUpdateManyWithWhereWithoutRoleInput | UserUpdateManyWithWhereWithoutRoleInput[]
    deleteMany?: UserScalarWhereInput | UserScalarWhereInput[]
  }

  export type RoleCreateNestedOneWithoutUsersInput = {
    create?: XOR<RoleCreateWithoutUsersInput, RoleUncheckedCreateWithoutUsersInput>
    connectOrCreate?: RoleCreateOrConnectWithoutUsersInput
    connect?: RoleWhereUniqueInput
  }

  export type ForgotPasswordCreateNestedOneWithoutUserInput = {
    create?: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
    connectOrCreate?: ForgotPasswordCreateOrConnectWithoutUserInput
    connect?: ForgotPasswordWhereUniqueInput
  }

  export type StateCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput> | StateCreateWithoutCreatedByUserInput[] | StateUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StateCreateOrConnectWithoutCreatedByUserInput | StateCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: StateCreateManyCreatedByUserInputEnvelope
    connect?: StateWhereUniqueInput | StateWhereUniqueInput[]
  }

  export type DistrictCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput> | DistrictCreateWithoutCreatedByUserInput[] | DistrictUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutCreatedByUserInput | DistrictCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: DistrictCreateManyCreatedByUserInputEnvelope
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
  }

  export type VegetableCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput> | VegetableCreateWithoutCreatedByUserInput[] | VegetableUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: VegetableCreateOrConnectWithoutCreatedByUserInput | VegetableCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: VegetableCreateManyCreatedByUserInputEnvelope
    connect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
  }

  export type CustomerCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput> | CustomerCreateWithoutCreatedByUserInput[] | CustomerUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutCreatedByUserInput | CustomerCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CustomerCreateManyCreatedByUserInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput> | SupplierCreateWithoutCreatedByUserInput[] | SupplierUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutCreatedByUserInput | SupplierCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SupplierCreateManyCreatedByUserInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type SupplierPaymentCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput> | SupplierPaymentCreateWithoutCreatedByUserInput[] | SupplierPaymentUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutCreatedByUserInput | SupplierPaymentCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SupplierPaymentCreateManyCreatedByUserInputEnvelope
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
  }

  export type UpiCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput> | UpiCreateWithoutCreatedByUserInput[] | UpiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: UpiCreateOrConnectWithoutCreatedByUserInput | UpiCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: UpiCreateManyCreatedByUserInputEnvelope
    connect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
  }

  export type PurchaseCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput> | PurchaseCreateWithoutCreatedByUserInput[] | PurchaseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutCreatedByUserInput | PurchaseCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: PurchaseCreateManyCreatedByUserInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type ShopCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput> | ShopCreateWithoutCreatedByUserInput[] | ShopUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ShopCreateOrConnectWithoutCreatedByUserInput | ShopCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ShopCreateManyCreatedByUserInputEnvelope
    connect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
  }

  export type SaleCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput> | SaleCreateWithoutCreatedByUserInput[] | SaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCreatedByUserInput | SaleCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleCreateManyCreatedByUserInputEnvelope
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
  }

  export type SaleItemCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput> | SaleItemCreateWithoutCreatedByUserInput[] | SaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutCreatedByUserInput | SaleItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleItemCreateManyCreatedByUserInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type CustomerReceiptCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput> | CustomerReceiptCreateWithoutCreatedByUserInput[] | CustomerReceiptUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCreatedByUserInput | CustomerReceiptCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CustomerReceiptCreateManyCreatedByUserInputEnvelope
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
  }

  export type ExpenseCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput> | ExpenseCreateWithoutCreatedByUserInput[] | ExpenseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutCreatedByUserInput | ExpenseCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ExpenseCreateManyCreatedByUserInputEnvelope
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
  }

  export type StockSpoilageCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput> | StockSpoilageCreateWithoutCreatedByUserInput[] | StockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutCreatedByUserInput | StockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: StockSpoilageCreateManyCreatedByUserInputEnvelope
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
  }

  export type SaleReturnCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput> | SaleReturnCreateWithoutCreatedByUserInput[] | SaleReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutCreatedByUserInput | SaleReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleReturnCreateManyCreatedByUserInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type QuotationCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput> | QuotationCreateWithoutCreatedByUserInput[] | QuotationUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCreatedByUserInput | QuotationCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: QuotationCreateManyCreatedByUserInputEnvelope
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
  }

  export type QuotationItemCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput> | QuotationItemCreateWithoutCreatedByUserInput[] | QuotationItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutCreatedByUserInput | QuotationItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: QuotationItemCreateManyCreatedByUserInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type PurchaseReturnCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput> | PurchaseReturnCreateWithoutCreatedByUserInput[] | PurchaseReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutCreatedByUserInput | PurchaseReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: PurchaseReturnCreateManyCreatedByUserInputEnvelope
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
  }

  export type RetailStockCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput> | RetailStockCreateWithoutCreatedByUserInput[] | RetailStockUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutCreatedByUserInput | RetailStockCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
  }

  export type RetailSaleCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput> | RetailSaleCreateWithoutCreatedByUserInput[] | RetailSaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleCreateOrConnectWithoutCreatedByUserInput | RetailSaleCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailSaleCreateManyCreatedByUserInputEnvelope
    connect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
  }

  export type RetailSaleItemCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput> | RetailSaleItemCreateWithoutCreatedByUserInput[] | RetailSaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutCreatedByUserInput | RetailSaleItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailSaleItemCreateManyCreatedByUserInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput> | RetailStockSpoilageCreateWithoutCreatedByUserInput[] | RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput | RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockSpoilageCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
  }

  export type RetailStockReturnCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput> | RetailStockReturnCreateWithoutCreatedByUserInput[] | RetailStockReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutCreatedByUserInput | RetailStockReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockReturnCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
  }

  export type BoxReturnCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput> | BoxReturnCreateWithoutCreatedByUserInput[] | BoxReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutCreatedByUserInput | BoxReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: BoxReturnCreateManyCreatedByUserInputEnvelope
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
  }

  export type EmployeeCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput> | EmployeeCreateWithoutCreatedByUserInput[] | EmployeeUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: EmployeeCreateOrConnectWithoutCreatedByUserInput | EmployeeCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: EmployeeCreateManyCreatedByUserInputEnvelope
    connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
  }

  export type AttendanceCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput> | AttendanceCreateWithoutCreatedByUserInput[] | AttendanceUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutCreatedByUserInput | AttendanceCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: AttendanceCreateManyCreatedByUserInputEnvelope
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
  }

  export type ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput> | ArrivalSettlementCreateWithoutCreatedByUserInput[] | ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput | ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ArrivalSettlementCreateManyCreatedByUserInputEnvelope
    connect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
  }

  export type ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput> | ArrivalCustomPattiCreateWithoutCreatedByUserInput[] | ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput | ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ArrivalCustomPattiCreateManyCreatedByUserInputEnvelope
    connect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
  }

  export type FastBillingCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput> | FastBillingCreateWithoutCreatedByUserInput[] | FastBillingUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingCreateOrConnectWithoutCreatedByUserInput | FastBillingCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: FastBillingCreateManyCreatedByUserInputEnvelope
    connect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
  }

  export type FastBillingItemCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput> | FastBillingItemCreateWithoutCreatedByUserInput[] | FastBillingItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutCreatedByUserInput | FastBillingItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: FastBillingItemCreateManyCreatedByUserInputEnvelope
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
  }

  export type CashBankTransferCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput> | CashBankTransferCreateWithoutCreatedByUserInput[] | CashBankTransferUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutCreatedByUserInput | CashBankTransferCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CashBankTransferCreateManyCreatedByUserInputEnvelope
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
  }

  export type CashBankTransferCreateNestedManyWithoutDeletedByUserInput = {
    create?: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput> | CashBankTransferCreateWithoutDeletedByUserInput[] | CashBankTransferUncheckedCreateWithoutDeletedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutDeletedByUserInput | CashBankTransferCreateOrConnectWithoutDeletedByUserInput[]
    createMany?: CashBankTransferCreateManyDeletedByUserInputEnvelope
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
  }

  export type AuditLogCreateNestedManyWithoutUserInput = {
    create?: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput> | AuditLogCreateWithoutUserInput[] | AuditLogUncheckedCreateWithoutUserInput[]
    connectOrCreate?: AuditLogCreateOrConnectWithoutUserInput | AuditLogCreateOrConnectWithoutUserInput[]
    createMany?: AuditLogCreateManyUserInputEnvelope
    connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
  }

  export type ForgotPasswordUncheckedCreateNestedOneWithoutUserInput = {
    create?: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
    connectOrCreate?: ForgotPasswordCreateOrConnectWithoutUserInput
    connect?: ForgotPasswordWhereUniqueInput
  }

  export type StateUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput> | StateCreateWithoutCreatedByUserInput[] | StateUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StateCreateOrConnectWithoutCreatedByUserInput | StateCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: StateCreateManyCreatedByUserInputEnvelope
    connect?: StateWhereUniqueInput | StateWhereUniqueInput[]
  }

  export type DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput> | DistrictCreateWithoutCreatedByUserInput[] | DistrictUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutCreatedByUserInput | DistrictCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: DistrictCreateManyCreatedByUserInputEnvelope
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
  }

  export type VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput> | VegetableCreateWithoutCreatedByUserInput[] | VegetableUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: VegetableCreateOrConnectWithoutCreatedByUserInput | VegetableCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: VegetableCreateManyCreatedByUserInputEnvelope
    connect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
  }

  export type CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput> | CustomerCreateWithoutCreatedByUserInput[] | CustomerUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutCreatedByUserInput | CustomerCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CustomerCreateManyCreatedByUserInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput> | SupplierCreateWithoutCreatedByUserInput[] | SupplierUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutCreatedByUserInput | SupplierCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SupplierCreateManyCreatedByUserInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput> | SupplierPaymentCreateWithoutCreatedByUserInput[] | SupplierPaymentUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutCreatedByUserInput | SupplierPaymentCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SupplierPaymentCreateManyCreatedByUserInputEnvelope
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
  }

  export type UpiUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput> | UpiCreateWithoutCreatedByUserInput[] | UpiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: UpiCreateOrConnectWithoutCreatedByUserInput | UpiCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: UpiCreateManyCreatedByUserInputEnvelope
    connect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
  }

  export type PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput> | PurchaseCreateWithoutCreatedByUserInput[] | PurchaseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutCreatedByUserInput | PurchaseCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: PurchaseCreateManyCreatedByUserInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type ShopUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput> | ShopCreateWithoutCreatedByUserInput[] | ShopUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ShopCreateOrConnectWithoutCreatedByUserInput | ShopCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ShopCreateManyCreatedByUserInputEnvelope
    connect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
  }

  export type SaleUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput> | SaleCreateWithoutCreatedByUserInput[] | SaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCreatedByUserInput | SaleCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleCreateManyCreatedByUserInputEnvelope
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
  }

  export type SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput> | SaleItemCreateWithoutCreatedByUserInput[] | SaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutCreatedByUserInput | SaleItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleItemCreateManyCreatedByUserInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput> | CustomerReceiptCreateWithoutCreatedByUserInput[] | CustomerReceiptUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCreatedByUserInput | CustomerReceiptCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CustomerReceiptCreateManyCreatedByUserInputEnvelope
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
  }

  export type ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput> | ExpenseCreateWithoutCreatedByUserInput[] | ExpenseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutCreatedByUserInput | ExpenseCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ExpenseCreateManyCreatedByUserInputEnvelope
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
  }

  export type StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput> | StockSpoilageCreateWithoutCreatedByUserInput[] | StockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutCreatedByUserInput | StockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: StockSpoilageCreateManyCreatedByUserInputEnvelope
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
  }

  export type SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput> | SaleReturnCreateWithoutCreatedByUserInput[] | SaleReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutCreatedByUserInput | SaleReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: SaleReturnCreateManyCreatedByUserInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput> | QuotationCreateWithoutCreatedByUserInput[] | QuotationUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCreatedByUserInput | QuotationCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: QuotationCreateManyCreatedByUserInputEnvelope
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
  }

  export type QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput> | QuotationItemCreateWithoutCreatedByUserInput[] | QuotationItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutCreatedByUserInput | QuotationItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: QuotationItemCreateManyCreatedByUserInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput> | PurchaseReturnCreateWithoutCreatedByUserInput[] | PurchaseReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutCreatedByUserInput | PurchaseReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: PurchaseReturnCreateManyCreatedByUserInputEnvelope
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
  }

  export type RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput> | RetailStockCreateWithoutCreatedByUserInput[] | RetailStockUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutCreatedByUserInput | RetailStockCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
  }

  export type RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput> | RetailSaleCreateWithoutCreatedByUserInput[] | RetailSaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleCreateOrConnectWithoutCreatedByUserInput | RetailSaleCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailSaleCreateManyCreatedByUserInputEnvelope
    connect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
  }

  export type RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput> | RetailSaleItemCreateWithoutCreatedByUserInput[] | RetailSaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutCreatedByUserInput | RetailSaleItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailSaleItemCreateManyCreatedByUserInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput> | RetailStockSpoilageCreateWithoutCreatedByUserInput[] | RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput | RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockSpoilageCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
  }

  export type RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput> | RetailStockReturnCreateWithoutCreatedByUserInput[] | RetailStockReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutCreatedByUserInput | RetailStockReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: RetailStockReturnCreateManyCreatedByUserInputEnvelope
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
  }

  export type BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput> | BoxReturnCreateWithoutCreatedByUserInput[] | BoxReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutCreatedByUserInput | BoxReturnCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: BoxReturnCreateManyCreatedByUserInputEnvelope
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
  }

  export type EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput> | EmployeeCreateWithoutCreatedByUserInput[] | EmployeeUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: EmployeeCreateOrConnectWithoutCreatedByUserInput | EmployeeCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: EmployeeCreateManyCreatedByUserInputEnvelope
    connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
  }

  export type AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput> | AttendanceCreateWithoutCreatedByUserInput[] | AttendanceUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutCreatedByUserInput | AttendanceCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: AttendanceCreateManyCreatedByUserInputEnvelope
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
  }

  export type ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput> | ArrivalSettlementCreateWithoutCreatedByUserInput[] | ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput | ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ArrivalSettlementCreateManyCreatedByUserInputEnvelope
    connect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
  }

  export type ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput> | ArrivalCustomPattiCreateWithoutCreatedByUserInput[] | ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput | ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: ArrivalCustomPattiCreateManyCreatedByUserInputEnvelope
    connect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
  }

  export type FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput> | FastBillingCreateWithoutCreatedByUserInput[] | FastBillingUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingCreateOrConnectWithoutCreatedByUserInput | FastBillingCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: FastBillingCreateManyCreatedByUserInputEnvelope
    connect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
  }

  export type FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput> | FastBillingItemCreateWithoutCreatedByUserInput[] | FastBillingItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutCreatedByUserInput | FastBillingItemCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: FastBillingItemCreateManyCreatedByUserInputEnvelope
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
  }

  export type CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput = {
    create?: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput> | CashBankTransferCreateWithoutCreatedByUserInput[] | CashBankTransferUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutCreatedByUserInput | CashBankTransferCreateOrConnectWithoutCreatedByUserInput[]
    createMany?: CashBankTransferCreateManyCreatedByUserInputEnvelope
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
  }

  export type CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput = {
    create?: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput> | CashBankTransferCreateWithoutDeletedByUserInput[] | CashBankTransferUncheckedCreateWithoutDeletedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutDeletedByUserInput | CashBankTransferCreateOrConnectWithoutDeletedByUserInput[]
    createMany?: CashBankTransferCreateManyDeletedByUserInputEnvelope
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
  }

  export type AuditLogUncheckedCreateNestedManyWithoutUserInput = {
    create?: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput> | AuditLogCreateWithoutUserInput[] | AuditLogUncheckedCreateWithoutUserInput[]
    connectOrCreate?: AuditLogCreateOrConnectWithoutUserInput | AuditLogCreateOrConnectWithoutUserInput[]
    createMany?: AuditLogCreateManyUserInputEnvelope
    connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
  }

  export type NullableStringFieldUpdateOperationsInput = {
    set?: string | null
  }

  export type BoolFieldUpdateOperationsInput = {
    set?: boolean
  }

  export type RoleUpdateOneRequiredWithoutUsersNestedInput = {
    create?: XOR<RoleCreateWithoutUsersInput, RoleUncheckedCreateWithoutUsersInput>
    connectOrCreate?: RoleCreateOrConnectWithoutUsersInput
    upsert?: RoleUpsertWithoutUsersInput
    connect?: RoleWhereUniqueInput
    update?: XOR<XOR<RoleUpdateToOneWithWhereWithoutUsersInput, RoleUpdateWithoutUsersInput>, RoleUncheckedUpdateWithoutUsersInput>
  }

  export type ForgotPasswordUpdateOneWithoutUserNestedInput = {
    create?: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
    connectOrCreate?: ForgotPasswordCreateOrConnectWithoutUserInput
    upsert?: ForgotPasswordUpsertWithoutUserInput
    disconnect?: ForgotPasswordWhereInput | boolean
    delete?: ForgotPasswordWhereInput | boolean
    connect?: ForgotPasswordWhereUniqueInput
    update?: XOR<XOR<ForgotPasswordUpdateToOneWithWhereWithoutUserInput, ForgotPasswordUpdateWithoutUserInput>, ForgotPasswordUncheckedUpdateWithoutUserInput>
  }

  export type StateUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput> | StateCreateWithoutCreatedByUserInput[] | StateUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StateCreateOrConnectWithoutCreatedByUserInput | StateCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: StateUpsertWithWhereUniqueWithoutCreatedByUserInput | StateUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: StateCreateManyCreatedByUserInputEnvelope
    set?: StateWhereUniqueInput | StateWhereUniqueInput[]
    disconnect?: StateWhereUniqueInput | StateWhereUniqueInput[]
    delete?: StateWhereUniqueInput | StateWhereUniqueInput[]
    connect?: StateWhereUniqueInput | StateWhereUniqueInput[]
    update?: StateUpdateWithWhereUniqueWithoutCreatedByUserInput | StateUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: StateUpdateManyWithWhereWithoutCreatedByUserInput | StateUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: StateScalarWhereInput | StateScalarWhereInput[]
  }

  export type DistrictUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput> | DistrictCreateWithoutCreatedByUserInput[] | DistrictUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutCreatedByUserInput | DistrictCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: DistrictUpsertWithWhereUniqueWithoutCreatedByUserInput | DistrictUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: DistrictCreateManyCreatedByUserInputEnvelope
    set?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    disconnect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    delete?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    update?: DistrictUpdateWithWhereUniqueWithoutCreatedByUserInput | DistrictUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: DistrictUpdateManyWithWhereWithoutCreatedByUserInput | DistrictUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
  }

  export type VegetableUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput> | VegetableCreateWithoutCreatedByUserInput[] | VegetableUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: VegetableCreateOrConnectWithoutCreatedByUserInput | VegetableCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: VegetableUpsertWithWhereUniqueWithoutCreatedByUserInput | VegetableUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: VegetableCreateManyCreatedByUserInputEnvelope
    set?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    disconnect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    delete?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    connect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    update?: VegetableUpdateWithWhereUniqueWithoutCreatedByUserInput | VegetableUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: VegetableUpdateManyWithWhereWithoutCreatedByUserInput | VegetableUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: VegetableScalarWhereInput | VegetableScalarWhereInput[]
  }

  export type CustomerUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput> | CustomerCreateWithoutCreatedByUserInput[] | CustomerUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutCreatedByUserInput | CustomerCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutCreatedByUserInput | CustomerUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CustomerCreateManyCreatedByUserInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutCreatedByUserInput | CustomerUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutCreatedByUserInput | CustomerUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput> | SupplierCreateWithoutCreatedByUserInput[] | SupplierUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutCreatedByUserInput | SupplierCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutCreatedByUserInput | SupplierUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SupplierCreateManyCreatedByUserInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutCreatedByUserInput | SupplierUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutCreatedByUserInput | SupplierUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput> | SupplierPaymentCreateWithoutCreatedByUserInput[] | SupplierPaymentUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutCreatedByUserInput | SupplierPaymentCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SupplierPaymentUpsertWithWhereUniqueWithoutCreatedByUserInput | SupplierPaymentUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SupplierPaymentCreateManyCreatedByUserInputEnvelope
    set?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    disconnect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    delete?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    update?: SupplierPaymentUpdateWithWhereUniqueWithoutCreatedByUserInput | SupplierPaymentUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SupplierPaymentUpdateManyWithWhereWithoutCreatedByUserInput | SupplierPaymentUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
  }

  export type UpiUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput> | UpiCreateWithoutCreatedByUserInput[] | UpiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: UpiCreateOrConnectWithoutCreatedByUserInput | UpiCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: UpiUpsertWithWhereUniqueWithoutCreatedByUserInput | UpiUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: UpiCreateManyCreatedByUserInputEnvelope
    set?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    disconnect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    delete?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    connect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    update?: UpiUpdateWithWhereUniqueWithoutCreatedByUserInput | UpiUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: UpiUpdateManyWithWhereWithoutCreatedByUserInput | UpiUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: UpiScalarWhereInput | UpiScalarWhereInput[]
  }

  export type PurchaseUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput> | PurchaseCreateWithoutCreatedByUserInput[] | PurchaseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutCreatedByUserInput | PurchaseCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutCreatedByUserInput | PurchaseUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: PurchaseCreateManyCreatedByUserInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutCreatedByUserInput | PurchaseUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutCreatedByUserInput | PurchaseUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type ShopUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput> | ShopCreateWithoutCreatedByUserInput[] | ShopUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ShopCreateOrConnectWithoutCreatedByUserInput | ShopCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ShopUpsertWithWhereUniqueWithoutCreatedByUserInput | ShopUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ShopCreateManyCreatedByUserInputEnvelope
    set?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    disconnect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    delete?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    connect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    update?: ShopUpdateWithWhereUniqueWithoutCreatedByUserInput | ShopUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ShopUpdateManyWithWhereWithoutCreatedByUserInput | ShopUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ShopScalarWhereInput | ShopScalarWhereInput[]
  }

  export type SaleUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput> | SaleCreateWithoutCreatedByUserInput[] | SaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCreatedByUserInput | SaleCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleCreateManyCreatedByUserInputEnvelope
    set?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    disconnect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    delete?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    update?: SaleUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleUpdateManyWithWhereWithoutCreatedByUserInput | SaleUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleScalarWhereInput | SaleScalarWhereInput[]
  }

  export type SaleItemUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput> | SaleItemCreateWithoutCreatedByUserInput[] | SaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutCreatedByUserInput | SaleItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleItemCreateManyCreatedByUserInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutCreatedByUserInput | SaleItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput> | CustomerReceiptCreateWithoutCreatedByUserInput[] | CustomerReceiptUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCreatedByUserInput | CustomerReceiptCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CustomerReceiptUpsertWithWhereUniqueWithoutCreatedByUserInput | CustomerReceiptUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CustomerReceiptCreateManyCreatedByUserInputEnvelope
    set?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    disconnect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    delete?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    update?: CustomerReceiptUpdateWithWhereUniqueWithoutCreatedByUserInput | CustomerReceiptUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CustomerReceiptUpdateManyWithWhereWithoutCreatedByUserInput | CustomerReceiptUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
  }

  export type ExpenseUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput> | ExpenseCreateWithoutCreatedByUserInput[] | ExpenseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutCreatedByUserInput | ExpenseCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ExpenseUpsertWithWhereUniqueWithoutCreatedByUserInput | ExpenseUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ExpenseCreateManyCreatedByUserInputEnvelope
    set?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    disconnect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    delete?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    update?: ExpenseUpdateWithWhereUniqueWithoutCreatedByUserInput | ExpenseUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ExpenseUpdateManyWithWhereWithoutCreatedByUserInput | ExpenseUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
  }

  export type StockSpoilageUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput> | StockSpoilageCreateWithoutCreatedByUserInput[] | StockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutCreatedByUserInput | StockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: StockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput | StockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: StockSpoilageCreateManyCreatedByUserInputEnvelope
    set?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    disconnect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    delete?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    update?: StockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput | StockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: StockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput | StockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
  }

  export type SaleReturnUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput> | SaleReturnCreateWithoutCreatedByUserInput[] | SaleReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutCreatedByUserInput | SaleReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleReturnCreateManyCreatedByUserInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutCreatedByUserInput | SaleReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type QuotationUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput> | QuotationCreateWithoutCreatedByUserInput[] | QuotationUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCreatedByUserInput | QuotationCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: QuotationUpsertWithWhereUniqueWithoutCreatedByUserInput | QuotationUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: QuotationCreateManyCreatedByUserInputEnvelope
    set?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    disconnect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    delete?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    update?: QuotationUpdateWithWhereUniqueWithoutCreatedByUserInput | QuotationUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: QuotationUpdateManyWithWhereWithoutCreatedByUserInput | QuotationUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
  }

  export type QuotationItemUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput> | QuotationItemCreateWithoutCreatedByUserInput[] | QuotationItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutCreatedByUserInput | QuotationItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutCreatedByUserInput | QuotationItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: QuotationItemCreateManyCreatedByUserInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutCreatedByUserInput | QuotationItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutCreatedByUserInput | QuotationItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput> | PurchaseReturnCreateWithoutCreatedByUserInput[] | PurchaseReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutCreatedByUserInput | PurchaseReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: PurchaseReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | PurchaseReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: PurchaseReturnCreateManyCreatedByUserInputEnvelope
    set?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    disconnect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    delete?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    update?: PurchaseReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | PurchaseReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: PurchaseReturnUpdateManyWithWhereWithoutCreatedByUserInput | PurchaseReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
  }

  export type RetailStockUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput> | RetailStockCreateWithoutCreatedByUserInput[] | RetailStockUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutCreatedByUserInput | RetailStockCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockCreateManyCreatedByUserInputEnvelope
    set?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    disconnect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    delete?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    update?: RetailStockUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
  }

  export type RetailSaleUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput> | RetailSaleCreateWithoutCreatedByUserInput[] | RetailSaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleCreateOrConnectWithoutCreatedByUserInput | RetailSaleCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailSaleUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailSaleUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailSaleCreateManyCreatedByUserInputEnvelope
    set?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    disconnect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    delete?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    connect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    update?: RetailSaleUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailSaleUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailSaleUpdateManyWithWhereWithoutCreatedByUserInput | RetailSaleUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailSaleScalarWhereInput | RetailSaleScalarWhereInput[]
  }

  export type RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput> | RetailSaleItemCreateWithoutCreatedByUserInput[] | RetailSaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutCreatedByUserInput | RetailSaleItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailSaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailSaleItemCreateManyCreatedByUserInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailSaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutCreatedByUserInput | RetailSaleItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput> | RetailStockSpoilageCreateWithoutCreatedByUserInput[] | RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput | RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockSpoilageCreateManyCreatedByUserInputEnvelope
    set?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    disconnect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    delete?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    update?: RetailStockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
  }

  export type RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput> | RetailStockReturnCreateWithoutCreatedByUserInput[] | RetailStockReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutCreatedByUserInput | RetailStockReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockReturnCreateManyCreatedByUserInputEnvelope
    set?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    disconnect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    delete?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    update?: RetailStockReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockReturnUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
  }

  export type BoxReturnUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput> | BoxReturnCreateWithoutCreatedByUserInput[] | BoxReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutCreatedByUserInput | BoxReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: BoxReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | BoxReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: BoxReturnCreateManyCreatedByUserInputEnvelope
    set?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    disconnect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    delete?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    update?: BoxReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | BoxReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: BoxReturnUpdateManyWithWhereWithoutCreatedByUserInput | BoxReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
  }

  export type EmployeeUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput> | EmployeeCreateWithoutCreatedByUserInput[] | EmployeeUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: EmployeeCreateOrConnectWithoutCreatedByUserInput | EmployeeCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: EmployeeUpsertWithWhereUniqueWithoutCreatedByUserInput | EmployeeUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: EmployeeCreateManyCreatedByUserInputEnvelope
    set?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    disconnect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    delete?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    update?: EmployeeUpdateWithWhereUniqueWithoutCreatedByUserInput | EmployeeUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: EmployeeUpdateManyWithWhereWithoutCreatedByUserInput | EmployeeUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[]
  }

  export type AttendanceUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput> | AttendanceCreateWithoutCreatedByUserInput[] | AttendanceUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutCreatedByUserInput | AttendanceCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: AttendanceUpsertWithWhereUniqueWithoutCreatedByUserInput | AttendanceUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: AttendanceCreateManyCreatedByUserInputEnvelope
    set?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    disconnect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    delete?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    update?: AttendanceUpdateWithWhereUniqueWithoutCreatedByUserInput | AttendanceUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: AttendanceUpdateManyWithWhereWithoutCreatedByUserInput | AttendanceUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
  }

  export type ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput> | ArrivalSettlementCreateWithoutCreatedByUserInput[] | ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput | ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ArrivalSettlementUpsertWithWhereUniqueWithoutCreatedByUserInput | ArrivalSettlementUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ArrivalSettlementCreateManyCreatedByUserInputEnvelope
    set?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    disconnect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    delete?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    connect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    update?: ArrivalSettlementUpdateWithWhereUniqueWithoutCreatedByUserInput | ArrivalSettlementUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ArrivalSettlementUpdateManyWithWhereWithoutCreatedByUserInput | ArrivalSettlementUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ArrivalSettlementScalarWhereInput | ArrivalSettlementScalarWhereInput[]
  }

  export type ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput> | ArrivalCustomPattiCreateWithoutCreatedByUserInput[] | ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput | ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ArrivalCustomPattiUpsertWithWhereUniqueWithoutCreatedByUserInput | ArrivalCustomPattiUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ArrivalCustomPattiCreateManyCreatedByUserInputEnvelope
    set?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    disconnect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    delete?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    connect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    update?: ArrivalCustomPattiUpdateWithWhereUniqueWithoutCreatedByUserInput | ArrivalCustomPattiUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ArrivalCustomPattiUpdateManyWithWhereWithoutCreatedByUserInput | ArrivalCustomPattiUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ArrivalCustomPattiScalarWhereInput | ArrivalCustomPattiScalarWhereInput[]
  }

  export type FastBillingUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput> | FastBillingCreateWithoutCreatedByUserInput[] | FastBillingUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingCreateOrConnectWithoutCreatedByUserInput | FastBillingCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: FastBillingUpsertWithWhereUniqueWithoutCreatedByUserInput | FastBillingUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: FastBillingCreateManyCreatedByUserInputEnvelope
    set?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    disconnect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    delete?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    connect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    update?: FastBillingUpdateWithWhereUniqueWithoutCreatedByUserInput | FastBillingUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: FastBillingUpdateManyWithWhereWithoutCreatedByUserInput | FastBillingUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: FastBillingScalarWhereInput | FastBillingScalarWhereInput[]
  }

  export type FastBillingItemUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput> | FastBillingItemCreateWithoutCreatedByUserInput[] | FastBillingItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutCreatedByUserInput | FastBillingItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: FastBillingItemUpsertWithWhereUniqueWithoutCreatedByUserInput | FastBillingItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: FastBillingItemCreateManyCreatedByUserInputEnvelope
    set?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    disconnect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    delete?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    update?: FastBillingItemUpdateWithWhereUniqueWithoutCreatedByUserInput | FastBillingItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: FastBillingItemUpdateManyWithWhereWithoutCreatedByUserInput | FastBillingItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
  }

  export type CashBankTransferUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput> | CashBankTransferCreateWithoutCreatedByUserInput[] | CashBankTransferUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutCreatedByUserInput | CashBankTransferCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CashBankTransferUpsertWithWhereUniqueWithoutCreatedByUserInput | CashBankTransferUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CashBankTransferCreateManyCreatedByUserInputEnvelope
    set?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    disconnect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    delete?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    update?: CashBankTransferUpdateWithWhereUniqueWithoutCreatedByUserInput | CashBankTransferUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CashBankTransferUpdateManyWithWhereWithoutCreatedByUserInput | CashBankTransferUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
  }

  export type CashBankTransferUpdateManyWithoutDeletedByUserNestedInput = {
    create?: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput> | CashBankTransferCreateWithoutDeletedByUserInput[] | CashBankTransferUncheckedCreateWithoutDeletedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutDeletedByUserInput | CashBankTransferCreateOrConnectWithoutDeletedByUserInput[]
    upsert?: CashBankTransferUpsertWithWhereUniqueWithoutDeletedByUserInput | CashBankTransferUpsertWithWhereUniqueWithoutDeletedByUserInput[]
    createMany?: CashBankTransferCreateManyDeletedByUserInputEnvelope
    set?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    disconnect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    delete?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    update?: CashBankTransferUpdateWithWhereUniqueWithoutDeletedByUserInput | CashBankTransferUpdateWithWhereUniqueWithoutDeletedByUserInput[]
    updateMany?: CashBankTransferUpdateManyWithWhereWithoutDeletedByUserInput | CashBankTransferUpdateManyWithWhereWithoutDeletedByUserInput[]
    deleteMany?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
  }

  export type AuditLogUpdateManyWithoutUserNestedInput = {
    create?: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput> | AuditLogCreateWithoutUserInput[] | AuditLogUncheckedCreateWithoutUserInput[]
    connectOrCreate?: AuditLogCreateOrConnectWithoutUserInput | AuditLogCreateOrConnectWithoutUserInput[]
    upsert?: AuditLogUpsertWithWhereUniqueWithoutUserInput | AuditLogUpsertWithWhereUniqueWithoutUserInput[]
    createMany?: AuditLogCreateManyUserInputEnvelope
    set?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    disconnect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    delete?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    update?: AuditLogUpdateWithWhereUniqueWithoutUserInput | AuditLogUpdateWithWhereUniqueWithoutUserInput[]
    updateMany?: AuditLogUpdateManyWithWhereWithoutUserInput | AuditLogUpdateManyWithWhereWithoutUserInput[]
    deleteMany?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[]
  }

  export type ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput = {
    create?: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
    connectOrCreate?: ForgotPasswordCreateOrConnectWithoutUserInput
    upsert?: ForgotPasswordUpsertWithoutUserInput
    disconnect?: ForgotPasswordWhereInput | boolean
    delete?: ForgotPasswordWhereInput | boolean
    connect?: ForgotPasswordWhereUniqueInput
    update?: XOR<XOR<ForgotPasswordUpdateToOneWithWhereWithoutUserInput, ForgotPasswordUpdateWithoutUserInput>, ForgotPasswordUncheckedUpdateWithoutUserInput>
  }

  export type StateUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput> | StateCreateWithoutCreatedByUserInput[] | StateUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StateCreateOrConnectWithoutCreatedByUserInput | StateCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: StateUpsertWithWhereUniqueWithoutCreatedByUserInput | StateUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: StateCreateManyCreatedByUserInputEnvelope
    set?: StateWhereUniqueInput | StateWhereUniqueInput[]
    disconnect?: StateWhereUniqueInput | StateWhereUniqueInput[]
    delete?: StateWhereUniqueInput | StateWhereUniqueInput[]
    connect?: StateWhereUniqueInput | StateWhereUniqueInput[]
    update?: StateUpdateWithWhereUniqueWithoutCreatedByUserInput | StateUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: StateUpdateManyWithWhereWithoutCreatedByUserInput | StateUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: StateScalarWhereInput | StateScalarWhereInput[]
  }

  export type DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput> | DistrictCreateWithoutCreatedByUserInput[] | DistrictUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutCreatedByUserInput | DistrictCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: DistrictUpsertWithWhereUniqueWithoutCreatedByUserInput | DistrictUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: DistrictCreateManyCreatedByUserInputEnvelope
    set?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    disconnect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    delete?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    update?: DistrictUpdateWithWhereUniqueWithoutCreatedByUserInput | DistrictUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: DistrictUpdateManyWithWhereWithoutCreatedByUserInput | DistrictUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
  }

  export type VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput> | VegetableCreateWithoutCreatedByUserInput[] | VegetableUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: VegetableCreateOrConnectWithoutCreatedByUserInput | VegetableCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: VegetableUpsertWithWhereUniqueWithoutCreatedByUserInput | VegetableUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: VegetableCreateManyCreatedByUserInputEnvelope
    set?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    disconnect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    delete?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    connect?: VegetableWhereUniqueInput | VegetableWhereUniqueInput[]
    update?: VegetableUpdateWithWhereUniqueWithoutCreatedByUserInput | VegetableUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: VegetableUpdateManyWithWhereWithoutCreatedByUserInput | VegetableUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: VegetableScalarWhereInput | VegetableScalarWhereInput[]
  }

  export type CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput> | CustomerCreateWithoutCreatedByUserInput[] | CustomerUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutCreatedByUserInput | CustomerCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutCreatedByUserInput | CustomerUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CustomerCreateManyCreatedByUserInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutCreatedByUserInput | CustomerUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutCreatedByUserInput | CustomerUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput> | SupplierCreateWithoutCreatedByUserInput[] | SupplierUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutCreatedByUserInput | SupplierCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutCreatedByUserInput | SupplierUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SupplierCreateManyCreatedByUserInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutCreatedByUserInput | SupplierUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutCreatedByUserInput | SupplierUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput> | SupplierPaymentCreateWithoutCreatedByUserInput[] | SupplierPaymentUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutCreatedByUserInput | SupplierPaymentCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SupplierPaymentUpsertWithWhereUniqueWithoutCreatedByUserInput | SupplierPaymentUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SupplierPaymentCreateManyCreatedByUserInputEnvelope
    set?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    disconnect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    delete?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    update?: SupplierPaymentUpdateWithWhereUniqueWithoutCreatedByUserInput | SupplierPaymentUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SupplierPaymentUpdateManyWithWhereWithoutCreatedByUserInput | SupplierPaymentUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
  }

  export type UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput> | UpiCreateWithoutCreatedByUserInput[] | UpiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: UpiCreateOrConnectWithoutCreatedByUserInput | UpiCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: UpiUpsertWithWhereUniqueWithoutCreatedByUserInput | UpiUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: UpiCreateManyCreatedByUserInputEnvelope
    set?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    disconnect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    delete?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    connect?: UpiWhereUniqueInput | UpiWhereUniqueInput[]
    update?: UpiUpdateWithWhereUniqueWithoutCreatedByUserInput | UpiUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: UpiUpdateManyWithWhereWithoutCreatedByUserInput | UpiUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: UpiScalarWhereInput | UpiScalarWhereInput[]
  }

  export type PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput> | PurchaseCreateWithoutCreatedByUserInput[] | PurchaseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutCreatedByUserInput | PurchaseCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutCreatedByUserInput | PurchaseUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: PurchaseCreateManyCreatedByUserInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutCreatedByUserInput | PurchaseUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutCreatedByUserInput | PurchaseUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput> | ShopCreateWithoutCreatedByUserInput[] | ShopUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ShopCreateOrConnectWithoutCreatedByUserInput | ShopCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ShopUpsertWithWhereUniqueWithoutCreatedByUserInput | ShopUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ShopCreateManyCreatedByUserInputEnvelope
    set?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    disconnect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    delete?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    connect?: ShopWhereUniqueInput | ShopWhereUniqueInput[]
    update?: ShopUpdateWithWhereUniqueWithoutCreatedByUserInput | ShopUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ShopUpdateManyWithWhereWithoutCreatedByUserInput | ShopUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ShopScalarWhereInput | ShopScalarWhereInput[]
  }

  export type SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput> | SaleCreateWithoutCreatedByUserInput[] | SaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCreatedByUserInput | SaleCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleCreateManyCreatedByUserInputEnvelope
    set?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    disconnect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    delete?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    update?: SaleUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleUpdateManyWithWhereWithoutCreatedByUserInput | SaleUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleScalarWhereInput | SaleScalarWhereInput[]
  }

  export type SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput> | SaleItemCreateWithoutCreatedByUserInput[] | SaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutCreatedByUserInput | SaleItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleItemCreateManyCreatedByUserInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutCreatedByUserInput | SaleItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput> | CustomerReceiptCreateWithoutCreatedByUserInput[] | CustomerReceiptUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCreatedByUserInput | CustomerReceiptCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CustomerReceiptUpsertWithWhereUniqueWithoutCreatedByUserInput | CustomerReceiptUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CustomerReceiptCreateManyCreatedByUserInputEnvelope
    set?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    disconnect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    delete?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    update?: CustomerReceiptUpdateWithWhereUniqueWithoutCreatedByUserInput | CustomerReceiptUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CustomerReceiptUpdateManyWithWhereWithoutCreatedByUserInput | CustomerReceiptUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
  }

  export type ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput> | ExpenseCreateWithoutCreatedByUserInput[] | ExpenseUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutCreatedByUserInput | ExpenseCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ExpenseUpsertWithWhereUniqueWithoutCreatedByUserInput | ExpenseUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ExpenseCreateManyCreatedByUserInputEnvelope
    set?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    disconnect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    delete?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    update?: ExpenseUpdateWithWhereUniqueWithoutCreatedByUserInput | ExpenseUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ExpenseUpdateManyWithWhereWithoutCreatedByUserInput | ExpenseUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
  }

  export type StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput> | StockSpoilageCreateWithoutCreatedByUserInput[] | StockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutCreatedByUserInput | StockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: StockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput | StockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: StockSpoilageCreateManyCreatedByUserInputEnvelope
    set?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    disconnect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    delete?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    update?: StockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput | StockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: StockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput | StockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
  }

  export type SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput> | SaleReturnCreateWithoutCreatedByUserInput[] | SaleReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutCreatedByUserInput | SaleReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | SaleReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: SaleReturnCreateManyCreatedByUserInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | SaleReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutCreatedByUserInput | SaleReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput> | QuotationCreateWithoutCreatedByUserInput[] | QuotationUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCreatedByUserInput | QuotationCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: QuotationUpsertWithWhereUniqueWithoutCreatedByUserInput | QuotationUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: QuotationCreateManyCreatedByUserInputEnvelope
    set?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    disconnect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    delete?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    update?: QuotationUpdateWithWhereUniqueWithoutCreatedByUserInput | QuotationUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: QuotationUpdateManyWithWhereWithoutCreatedByUserInput | QuotationUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
  }

  export type QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput> | QuotationItemCreateWithoutCreatedByUserInput[] | QuotationItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutCreatedByUserInput | QuotationItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutCreatedByUserInput | QuotationItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: QuotationItemCreateManyCreatedByUserInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutCreatedByUserInput | QuotationItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutCreatedByUserInput | QuotationItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput> | PurchaseReturnCreateWithoutCreatedByUserInput[] | PurchaseReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutCreatedByUserInput | PurchaseReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: PurchaseReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | PurchaseReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: PurchaseReturnCreateManyCreatedByUserInputEnvelope
    set?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    disconnect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    delete?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    update?: PurchaseReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | PurchaseReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: PurchaseReturnUpdateManyWithWhereWithoutCreatedByUserInput | PurchaseReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
  }

  export type RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput> | RetailStockCreateWithoutCreatedByUserInput[] | RetailStockUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutCreatedByUserInput | RetailStockCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockCreateManyCreatedByUserInputEnvelope
    set?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    disconnect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    delete?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    update?: RetailStockUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
  }

  export type RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput> | RetailSaleCreateWithoutCreatedByUserInput[] | RetailSaleUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleCreateOrConnectWithoutCreatedByUserInput | RetailSaleCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailSaleUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailSaleUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailSaleCreateManyCreatedByUserInputEnvelope
    set?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    disconnect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    delete?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    connect?: RetailSaleWhereUniqueInput | RetailSaleWhereUniqueInput[]
    update?: RetailSaleUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailSaleUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailSaleUpdateManyWithWhereWithoutCreatedByUserInput | RetailSaleUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailSaleScalarWhereInput | RetailSaleScalarWhereInput[]
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput> | RetailSaleItemCreateWithoutCreatedByUserInput[] | RetailSaleItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutCreatedByUserInput | RetailSaleItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailSaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailSaleItemCreateManyCreatedByUserInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailSaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutCreatedByUserInput | RetailSaleItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput> | RetailStockSpoilageCreateWithoutCreatedByUserInput[] | RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput | RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockSpoilageCreateManyCreatedByUserInputEnvelope
    set?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    disconnect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    delete?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    update?: RetailStockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
  }

  export type RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput> | RetailStockReturnCreateWithoutCreatedByUserInput[] | RetailStockReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutCreatedByUserInput | RetailStockReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: RetailStockReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | RetailStockReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: RetailStockReturnCreateManyCreatedByUserInputEnvelope
    set?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    disconnect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    delete?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    update?: RetailStockReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | RetailStockReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: RetailStockReturnUpdateManyWithWhereWithoutCreatedByUserInput | RetailStockReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
  }

  export type BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput> | BoxReturnCreateWithoutCreatedByUserInput[] | BoxReturnUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutCreatedByUserInput | BoxReturnCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: BoxReturnUpsertWithWhereUniqueWithoutCreatedByUserInput | BoxReturnUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: BoxReturnCreateManyCreatedByUserInputEnvelope
    set?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    disconnect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    delete?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    update?: BoxReturnUpdateWithWhereUniqueWithoutCreatedByUserInput | BoxReturnUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: BoxReturnUpdateManyWithWhereWithoutCreatedByUserInput | BoxReturnUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
  }

  export type EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput> | EmployeeCreateWithoutCreatedByUserInput[] | EmployeeUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: EmployeeCreateOrConnectWithoutCreatedByUserInput | EmployeeCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: EmployeeUpsertWithWhereUniqueWithoutCreatedByUserInput | EmployeeUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: EmployeeCreateManyCreatedByUserInputEnvelope
    set?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    disconnect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    delete?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[]
    update?: EmployeeUpdateWithWhereUniqueWithoutCreatedByUserInput | EmployeeUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: EmployeeUpdateManyWithWhereWithoutCreatedByUserInput | EmployeeUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[]
  }

  export type AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput> | AttendanceCreateWithoutCreatedByUserInput[] | AttendanceUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutCreatedByUserInput | AttendanceCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: AttendanceUpsertWithWhereUniqueWithoutCreatedByUserInput | AttendanceUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: AttendanceCreateManyCreatedByUserInputEnvelope
    set?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    disconnect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    delete?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    update?: AttendanceUpdateWithWhereUniqueWithoutCreatedByUserInput | AttendanceUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: AttendanceUpdateManyWithWhereWithoutCreatedByUserInput | AttendanceUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
  }

  export type ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput> | ArrivalSettlementCreateWithoutCreatedByUserInput[] | ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput | ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ArrivalSettlementUpsertWithWhereUniqueWithoutCreatedByUserInput | ArrivalSettlementUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ArrivalSettlementCreateManyCreatedByUserInputEnvelope
    set?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    disconnect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    delete?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    connect?: ArrivalSettlementWhereUniqueInput | ArrivalSettlementWhereUniqueInput[]
    update?: ArrivalSettlementUpdateWithWhereUniqueWithoutCreatedByUserInput | ArrivalSettlementUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ArrivalSettlementUpdateManyWithWhereWithoutCreatedByUserInput | ArrivalSettlementUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ArrivalSettlementScalarWhereInput | ArrivalSettlementScalarWhereInput[]
  }

  export type ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput> | ArrivalCustomPattiCreateWithoutCreatedByUserInput[] | ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput | ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: ArrivalCustomPattiUpsertWithWhereUniqueWithoutCreatedByUserInput | ArrivalCustomPattiUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: ArrivalCustomPattiCreateManyCreatedByUserInputEnvelope
    set?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    disconnect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    delete?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    connect?: ArrivalCustomPattiWhereUniqueInput | ArrivalCustomPattiWhereUniqueInput[]
    update?: ArrivalCustomPattiUpdateWithWhereUniqueWithoutCreatedByUserInput | ArrivalCustomPattiUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: ArrivalCustomPattiUpdateManyWithWhereWithoutCreatedByUserInput | ArrivalCustomPattiUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: ArrivalCustomPattiScalarWhereInput | ArrivalCustomPattiScalarWhereInput[]
  }

  export type FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput> | FastBillingCreateWithoutCreatedByUserInput[] | FastBillingUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingCreateOrConnectWithoutCreatedByUserInput | FastBillingCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: FastBillingUpsertWithWhereUniqueWithoutCreatedByUserInput | FastBillingUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: FastBillingCreateManyCreatedByUserInputEnvelope
    set?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    disconnect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    delete?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    connect?: FastBillingWhereUniqueInput | FastBillingWhereUniqueInput[]
    update?: FastBillingUpdateWithWhereUniqueWithoutCreatedByUserInput | FastBillingUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: FastBillingUpdateManyWithWhereWithoutCreatedByUserInput | FastBillingUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: FastBillingScalarWhereInput | FastBillingScalarWhereInput[]
  }

  export type FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput> | FastBillingItemCreateWithoutCreatedByUserInput[] | FastBillingItemUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutCreatedByUserInput | FastBillingItemCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: FastBillingItemUpsertWithWhereUniqueWithoutCreatedByUserInput | FastBillingItemUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: FastBillingItemCreateManyCreatedByUserInputEnvelope
    set?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    disconnect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    delete?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    update?: FastBillingItemUpdateWithWhereUniqueWithoutCreatedByUserInput | FastBillingItemUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: FastBillingItemUpdateManyWithWhereWithoutCreatedByUserInput | FastBillingItemUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
  }

  export type CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput = {
    create?: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput> | CashBankTransferCreateWithoutCreatedByUserInput[] | CashBankTransferUncheckedCreateWithoutCreatedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutCreatedByUserInput | CashBankTransferCreateOrConnectWithoutCreatedByUserInput[]
    upsert?: CashBankTransferUpsertWithWhereUniqueWithoutCreatedByUserInput | CashBankTransferUpsertWithWhereUniqueWithoutCreatedByUserInput[]
    createMany?: CashBankTransferCreateManyCreatedByUserInputEnvelope
    set?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    disconnect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    delete?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    update?: CashBankTransferUpdateWithWhereUniqueWithoutCreatedByUserInput | CashBankTransferUpdateWithWhereUniqueWithoutCreatedByUserInput[]
    updateMany?: CashBankTransferUpdateManyWithWhereWithoutCreatedByUserInput | CashBankTransferUpdateManyWithWhereWithoutCreatedByUserInput[]
    deleteMany?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
  }

  export type CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput = {
    create?: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput> | CashBankTransferCreateWithoutDeletedByUserInput[] | CashBankTransferUncheckedCreateWithoutDeletedByUserInput[]
    connectOrCreate?: CashBankTransferCreateOrConnectWithoutDeletedByUserInput | CashBankTransferCreateOrConnectWithoutDeletedByUserInput[]
    upsert?: CashBankTransferUpsertWithWhereUniqueWithoutDeletedByUserInput | CashBankTransferUpsertWithWhereUniqueWithoutDeletedByUserInput[]
    createMany?: CashBankTransferCreateManyDeletedByUserInputEnvelope
    set?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    disconnect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    delete?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    connect?: CashBankTransferWhereUniqueInput | CashBankTransferWhereUniqueInput[]
    update?: CashBankTransferUpdateWithWhereUniqueWithoutDeletedByUserInput | CashBankTransferUpdateWithWhereUniqueWithoutDeletedByUserInput[]
    updateMany?: CashBankTransferUpdateManyWithWhereWithoutDeletedByUserInput | CashBankTransferUpdateManyWithWhereWithoutDeletedByUserInput[]
    deleteMany?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
  }

  export type AuditLogUncheckedUpdateManyWithoutUserNestedInput = {
    create?: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput> | AuditLogCreateWithoutUserInput[] | AuditLogUncheckedCreateWithoutUserInput[]
    connectOrCreate?: AuditLogCreateOrConnectWithoutUserInput | AuditLogCreateOrConnectWithoutUserInput[]
    upsert?: AuditLogUpsertWithWhereUniqueWithoutUserInput | AuditLogUpsertWithWhereUniqueWithoutUserInput[]
    createMany?: AuditLogCreateManyUserInputEnvelope
    set?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    disconnect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    delete?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    connect?: AuditLogWhereUniqueInput | AuditLogWhereUniqueInput[]
    update?: AuditLogUpdateWithWhereUniqueWithoutUserInput | AuditLogUpdateWithWhereUniqueWithoutUserInput[]
    updateMany?: AuditLogUpdateManyWithWhereWithoutUserInput | AuditLogUpdateManyWithWhereWithoutUserInput[]
    deleteMany?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[]
  }

  export type DistrictCreateNestedManyWithoutStateInput = {
    create?: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput> | DistrictCreateWithoutStateInput[] | DistrictUncheckedCreateWithoutStateInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutStateInput | DistrictCreateOrConnectWithoutStateInput[]
    createMany?: DistrictCreateManyStateInputEnvelope
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
  }

  export type CustomerCreateNestedManyWithoutStateInput = {
    create?: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput> | CustomerCreateWithoutStateInput[] | CustomerUncheckedCreateWithoutStateInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutStateInput | CustomerCreateOrConnectWithoutStateInput[]
    createMany?: CustomerCreateManyStateInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierCreateNestedManyWithoutStateInput = {
    create?: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput> | SupplierCreateWithoutStateInput[] | SupplierUncheckedCreateWithoutStateInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutStateInput | SupplierCreateOrConnectWithoutStateInput[]
    createMany?: SupplierCreateManyStateInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedStatesInput = {
    create?: XOR<UserCreateWithoutCreatedStatesInput, UserUncheckedCreateWithoutCreatedStatesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedStatesInput
    connect?: UserWhereUniqueInput
  }

  export type DistrictUncheckedCreateNestedManyWithoutStateInput = {
    create?: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput> | DistrictCreateWithoutStateInput[] | DistrictUncheckedCreateWithoutStateInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutStateInput | DistrictCreateOrConnectWithoutStateInput[]
    createMany?: DistrictCreateManyStateInputEnvelope
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
  }

  export type CustomerUncheckedCreateNestedManyWithoutStateInput = {
    create?: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput> | CustomerCreateWithoutStateInput[] | CustomerUncheckedCreateWithoutStateInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutStateInput | CustomerCreateOrConnectWithoutStateInput[]
    createMany?: CustomerCreateManyStateInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierUncheckedCreateNestedManyWithoutStateInput = {
    create?: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput> | SupplierCreateWithoutStateInput[] | SupplierUncheckedCreateWithoutStateInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutStateInput | SupplierCreateOrConnectWithoutStateInput[]
    createMany?: SupplierCreateManyStateInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type DistrictUpdateManyWithoutStateNestedInput = {
    create?: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput> | DistrictCreateWithoutStateInput[] | DistrictUncheckedCreateWithoutStateInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutStateInput | DistrictCreateOrConnectWithoutStateInput[]
    upsert?: DistrictUpsertWithWhereUniqueWithoutStateInput | DistrictUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: DistrictCreateManyStateInputEnvelope
    set?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    disconnect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    delete?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    update?: DistrictUpdateWithWhereUniqueWithoutStateInput | DistrictUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: DistrictUpdateManyWithWhereWithoutStateInput | DistrictUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
  }

  export type CustomerUpdateManyWithoutStateNestedInput = {
    create?: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput> | CustomerCreateWithoutStateInput[] | CustomerUncheckedCreateWithoutStateInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutStateInput | CustomerCreateOrConnectWithoutStateInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutStateInput | CustomerUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: CustomerCreateManyStateInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutStateInput | CustomerUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutStateInput | CustomerUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUpdateManyWithoutStateNestedInput = {
    create?: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput> | SupplierCreateWithoutStateInput[] | SupplierUncheckedCreateWithoutStateInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutStateInput | SupplierCreateOrConnectWithoutStateInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutStateInput | SupplierUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: SupplierCreateManyStateInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutStateInput | SupplierUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutStateInput | SupplierUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedStatesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedStatesInput, UserUncheckedCreateWithoutCreatedStatesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedStatesInput
    upsert?: UserUpsertWithoutCreatedStatesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedStatesInput, UserUpdateWithoutCreatedStatesInput>, UserUncheckedUpdateWithoutCreatedStatesInput>
  }

  export type NullableBigIntFieldUpdateOperationsInput = {
    set?: bigint | number | null
    increment?: bigint | number
    decrement?: bigint | number
    multiply?: bigint | number
    divide?: bigint | number
  }

  export type DistrictUncheckedUpdateManyWithoutStateNestedInput = {
    create?: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput> | DistrictCreateWithoutStateInput[] | DistrictUncheckedCreateWithoutStateInput[]
    connectOrCreate?: DistrictCreateOrConnectWithoutStateInput | DistrictCreateOrConnectWithoutStateInput[]
    upsert?: DistrictUpsertWithWhereUniqueWithoutStateInput | DistrictUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: DistrictCreateManyStateInputEnvelope
    set?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    disconnect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    delete?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    connect?: DistrictWhereUniqueInput | DistrictWhereUniqueInput[]
    update?: DistrictUpdateWithWhereUniqueWithoutStateInput | DistrictUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: DistrictUpdateManyWithWhereWithoutStateInput | DistrictUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
  }

  export type CustomerUncheckedUpdateManyWithoutStateNestedInput = {
    create?: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput> | CustomerCreateWithoutStateInput[] | CustomerUncheckedCreateWithoutStateInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutStateInput | CustomerCreateOrConnectWithoutStateInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutStateInput | CustomerUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: CustomerCreateManyStateInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutStateInput | CustomerUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutStateInput | CustomerUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUncheckedUpdateManyWithoutStateNestedInput = {
    create?: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput> | SupplierCreateWithoutStateInput[] | SupplierUncheckedCreateWithoutStateInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutStateInput | SupplierCreateOrConnectWithoutStateInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutStateInput | SupplierUpsertWithWhereUniqueWithoutStateInput[]
    createMany?: SupplierCreateManyStateInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutStateInput | SupplierUpdateWithWhereUniqueWithoutStateInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutStateInput | SupplierUpdateManyWithWhereWithoutStateInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type StateCreateNestedOneWithoutDistrictsInput = {
    create?: XOR<StateCreateWithoutDistrictsInput, StateUncheckedCreateWithoutDistrictsInput>
    connectOrCreate?: StateCreateOrConnectWithoutDistrictsInput
    connect?: StateWhereUniqueInput
  }

  export type CustomerCreateNestedManyWithoutDistrictInput = {
    create?: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput> | CustomerCreateWithoutDistrictInput[] | CustomerUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutDistrictInput | CustomerCreateOrConnectWithoutDistrictInput[]
    createMany?: CustomerCreateManyDistrictInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierCreateNestedManyWithoutDistrictInput = {
    create?: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput> | SupplierCreateWithoutDistrictInput[] | SupplierUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutDistrictInput | SupplierCreateOrConnectWithoutDistrictInput[]
    createMany?: SupplierCreateManyDistrictInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedDistrictsInput = {
    create?: XOR<UserCreateWithoutCreatedDistrictsInput, UserUncheckedCreateWithoutCreatedDistrictsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedDistrictsInput
    connect?: UserWhereUniqueInput
  }

  export type CustomerUncheckedCreateNestedManyWithoutDistrictInput = {
    create?: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput> | CustomerCreateWithoutDistrictInput[] | CustomerUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutDistrictInput | CustomerCreateOrConnectWithoutDistrictInput[]
    createMany?: CustomerCreateManyDistrictInputEnvelope
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
  }

  export type SupplierUncheckedCreateNestedManyWithoutDistrictInput = {
    create?: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput> | SupplierCreateWithoutDistrictInput[] | SupplierUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutDistrictInput | SupplierCreateOrConnectWithoutDistrictInput[]
    createMany?: SupplierCreateManyDistrictInputEnvelope
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
  }

  export type StateUpdateOneRequiredWithoutDistrictsNestedInput = {
    create?: XOR<StateCreateWithoutDistrictsInput, StateUncheckedCreateWithoutDistrictsInput>
    connectOrCreate?: StateCreateOrConnectWithoutDistrictsInput
    upsert?: StateUpsertWithoutDistrictsInput
    connect?: StateWhereUniqueInput
    update?: XOR<XOR<StateUpdateToOneWithWhereWithoutDistrictsInput, StateUpdateWithoutDistrictsInput>, StateUncheckedUpdateWithoutDistrictsInput>
  }

  export type CustomerUpdateManyWithoutDistrictNestedInput = {
    create?: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput> | CustomerCreateWithoutDistrictInput[] | CustomerUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutDistrictInput | CustomerCreateOrConnectWithoutDistrictInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutDistrictInput | CustomerUpsertWithWhereUniqueWithoutDistrictInput[]
    createMany?: CustomerCreateManyDistrictInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutDistrictInput | CustomerUpdateWithWhereUniqueWithoutDistrictInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutDistrictInput | CustomerUpdateManyWithWhereWithoutDistrictInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUpdateManyWithoutDistrictNestedInput = {
    create?: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput> | SupplierCreateWithoutDistrictInput[] | SupplierUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutDistrictInput | SupplierCreateOrConnectWithoutDistrictInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutDistrictInput | SupplierUpsertWithWhereUniqueWithoutDistrictInput[]
    createMany?: SupplierCreateManyDistrictInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutDistrictInput | SupplierUpdateWithWhereUniqueWithoutDistrictInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutDistrictInput | SupplierUpdateManyWithWhereWithoutDistrictInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedDistrictsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedDistrictsInput, UserUncheckedCreateWithoutCreatedDistrictsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedDistrictsInput
    upsert?: UserUpsertWithoutCreatedDistrictsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedDistrictsInput, UserUpdateWithoutCreatedDistrictsInput>, UserUncheckedUpdateWithoutCreatedDistrictsInput>
  }

  export type CustomerUncheckedUpdateManyWithoutDistrictNestedInput = {
    create?: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput> | CustomerCreateWithoutDistrictInput[] | CustomerUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: CustomerCreateOrConnectWithoutDistrictInput | CustomerCreateOrConnectWithoutDistrictInput[]
    upsert?: CustomerUpsertWithWhereUniqueWithoutDistrictInput | CustomerUpsertWithWhereUniqueWithoutDistrictInput[]
    createMany?: CustomerCreateManyDistrictInputEnvelope
    set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[]
    update?: CustomerUpdateWithWhereUniqueWithoutDistrictInput | CustomerUpdateWithWhereUniqueWithoutDistrictInput[]
    updateMany?: CustomerUpdateManyWithWhereWithoutDistrictInput | CustomerUpdateManyWithWhereWithoutDistrictInput[]
    deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
  }

  export type SupplierUncheckedUpdateManyWithoutDistrictNestedInput = {
    create?: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput> | SupplierCreateWithoutDistrictInput[] | SupplierUncheckedCreateWithoutDistrictInput[]
    connectOrCreate?: SupplierCreateOrConnectWithoutDistrictInput | SupplierCreateOrConnectWithoutDistrictInput[]
    upsert?: SupplierUpsertWithWhereUniqueWithoutDistrictInput | SupplierUpsertWithWhereUniqueWithoutDistrictInput[]
    createMany?: SupplierCreateManyDistrictInputEnvelope
    set?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    disconnect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    delete?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    connect?: SupplierWhereUniqueInput | SupplierWhereUniqueInput[]
    update?: SupplierUpdateWithWhereUniqueWithoutDistrictInput | SupplierUpdateWithWhereUniqueWithoutDistrictInput[]
    updateMany?: SupplierUpdateManyWithWhereWithoutDistrictInput | SupplierUpdateManyWithWhereWithoutDistrictInput[]
    deleteMany?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
  }

  export type PurchaseCreateNestedManyWithoutVegetableInput = {
    create?: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput> | PurchaseCreateWithoutVegetableInput[] | PurchaseUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutVegetableInput | PurchaseCreateOrConnectWithoutVegetableInput[]
    createMany?: PurchaseCreateManyVegetableInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type QuotationItemCreateNestedManyWithoutVegetableInput = {
    create?: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput> | QuotationItemCreateWithoutVegetableInput[] | QuotationItemUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutVegetableInput | QuotationItemCreateOrConnectWithoutVegetableInput[]
    createMany?: QuotationItemCreateManyVegetableInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedVegetablesInput = {
    create?: XOR<UserCreateWithoutCreatedVegetablesInput, UserUncheckedCreateWithoutCreatedVegetablesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedVegetablesInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUncheckedCreateNestedManyWithoutVegetableInput = {
    create?: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput> | PurchaseCreateWithoutVegetableInput[] | PurchaseUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutVegetableInput | PurchaseCreateOrConnectWithoutVegetableInput[]
    createMany?: PurchaseCreateManyVegetableInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type QuotationItemUncheckedCreateNestedManyWithoutVegetableInput = {
    create?: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput> | QuotationItemCreateWithoutVegetableInput[] | QuotationItemUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutVegetableInput | QuotationItemCreateOrConnectWithoutVegetableInput[]
    createMany?: QuotationItemCreateManyVegetableInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type PurchaseUpdateManyWithoutVegetableNestedInput = {
    create?: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput> | PurchaseCreateWithoutVegetableInput[] | PurchaseUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutVegetableInput | PurchaseCreateOrConnectWithoutVegetableInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutVegetableInput | PurchaseUpsertWithWhereUniqueWithoutVegetableInput[]
    createMany?: PurchaseCreateManyVegetableInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutVegetableInput | PurchaseUpdateWithWhereUniqueWithoutVegetableInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutVegetableInput | PurchaseUpdateManyWithWhereWithoutVegetableInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type QuotationItemUpdateManyWithoutVegetableNestedInput = {
    create?: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput> | QuotationItemCreateWithoutVegetableInput[] | QuotationItemUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutVegetableInput | QuotationItemCreateOrConnectWithoutVegetableInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutVegetableInput | QuotationItemUpsertWithWhereUniqueWithoutVegetableInput[]
    createMany?: QuotationItemCreateManyVegetableInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutVegetableInput | QuotationItemUpdateWithWhereUniqueWithoutVegetableInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutVegetableInput | QuotationItemUpdateManyWithWhereWithoutVegetableInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedVegetablesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedVegetablesInput, UserUncheckedCreateWithoutCreatedVegetablesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedVegetablesInput
    upsert?: UserUpsertWithoutCreatedVegetablesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedVegetablesInput, UserUpdateWithoutCreatedVegetablesInput>, UserUncheckedUpdateWithoutCreatedVegetablesInput>
  }

  export type PurchaseUncheckedUpdateManyWithoutVegetableNestedInput = {
    create?: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput> | PurchaseCreateWithoutVegetableInput[] | PurchaseUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutVegetableInput | PurchaseCreateOrConnectWithoutVegetableInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutVegetableInput | PurchaseUpsertWithWhereUniqueWithoutVegetableInput[]
    createMany?: PurchaseCreateManyVegetableInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutVegetableInput | PurchaseUpdateWithWhereUniqueWithoutVegetableInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutVegetableInput | PurchaseUpdateManyWithWhereWithoutVegetableInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type QuotationItemUncheckedUpdateManyWithoutVegetableNestedInput = {
    create?: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput> | QuotationItemCreateWithoutVegetableInput[] | QuotationItemUncheckedCreateWithoutVegetableInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutVegetableInput | QuotationItemCreateOrConnectWithoutVegetableInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutVegetableInput | QuotationItemUpsertWithWhereUniqueWithoutVegetableInput[]
    createMany?: QuotationItemCreateManyVegetableInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutVegetableInput | QuotationItemUpdateWithWhereUniqueWithoutVegetableInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutVegetableInput | QuotationItemUpdateManyWithWhereWithoutVegetableInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type StateCreateNestedOneWithoutCustomersInput = {
    create?: XOR<StateCreateWithoutCustomersInput, StateUncheckedCreateWithoutCustomersInput>
    connectOrCreate?: StateCreateOrConnectWithoutCustomersInput
    connect?: StateWhereUniqueInput
  }

  export type DistrictCreateNestedOneWithoutCustomersInput = {
    create?: XOR<DistrictCreateWithoutCustomersInput, DistrictUncheckedCreateWithoutCustomersInput>
    connectOrCreate?: DistrictCreateOrConnectWithoutCustomersInput
    connect?: DistrictWhereUniqueInput
  }

  export type SaleCreateNestedManyWithoutCustomerInput = {
    create?: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput> | SaleCreateWithoutCustomerInput[] | SaleUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCustomerInput | SaleCreateOrConnectWithoutCustomerInput[]
    createMany?: SaleCreateManyCustomerInputEnvelope
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
  }

  export type CustomerReceiptCreateNestedManyWithoutCustomerInput = {
    create?: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput> | CustomerReceiptCreateWithoutCustomerInput[] | CustomerReceiptUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCustomerInput | CustomerReceiptCreateOrConnectWithoutCustomerInput[]
    createMany?: CustomerReceiptCreateManyCustomerInputEnvelope
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
  }

  export type QuotationCreateNestedManyWithoutCustomerInput = {
    create?: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput> | QuotationCreateWithoutCustomerInput[] | QuotationUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCustomerInput | QuotationCreateOrConnectWithoutCustomerInput[]
    createMany?: QuotationCreateManyCustomerInputEnvelope
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedCustomersInput = {
    create?: XOR<UserCreateWithoutCreatedCustomersInput, UserUncheckedCreateWithoutCreatedCustomersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCustomersInput
    connect?: UserWhereUniqueInput
  }

  export type SaleUncheckedCreateNestedManyWithoutCustomerInput = {
    create?: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput> | SaleCreateWithoutCustomerInput[] | SaleUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCustomerInput | SaleCreateOrConnectWithoutCustomerInput[]
    createMany?: SaleCreateManyCustomerInputEnvelope
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
  }

  export type CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput = {
    create?: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput> | CustomerReceiptCreateWithoutCustomerInput[] | CustomerReceiptUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCustomerInput | CustomerReceiptCreateOrConnectWithoutCustomerInput[]
    createMany?: CustomerReceiptCreateManyCustomerInputEnvelope
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
  }

  export type QuotationUncheckedCreateNestedManyWithoutCustomerInput = {
    create?: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput> | QuotationCreateWithoutCustomerInput[] | QuotationUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCustomerInput | QuotationCreateOrConnectWithoutCustomerInput[]
    createMany?: QuotationCreateManyCustomerInputEnvelope
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
  }

  export type DecimalFieldUpdateOperationsInput = {
    set?: Decimal | DecimalJsLike | number | string
    increment?: Decimal | DecimalJsLike | number | string
    decrement?: Decimal | DecimalJsLike | number | string
    multiply?: Decimal | DecimalJsLike | number | string
    divide?: Decimal | DecimalJsLike | number | string
  }

  export type NullableDateTimeFieldUpdateOperationsInput = {
    set?: Date | string | null
  }

  export type StateUpdateOneRequiredWithoutCustomersNestedInput = {
    create?: XOR<StateCreateWithoutCustomersInput, StateUncheckedCreateWithoutCustomersInput>
    connectOrCreate?: StateCreateOrConnectWithoutCustomersInput
    upsert?: StateUpsertWithoutCustomersInput
    connect?: StateWhereUniqueInput
    update?: XOR<XOR<StateUpdateToOneWithWhereWithoutCustomersInput, StateUpdateWithoutCustomersInput>, StateUncheckedUpdateWithoutCustomersInput>
  }

  export type DistrictUpdateOneRequiredWithoutCustomersNestedInput = {
    create?: XOR<DistrictCreateWithoutCustomersInput, DistrictUncheckedCreateWithoutCustomersInput>
    connectOrCreate?: DistrictCreateOrConnectWithoutCustomersInput
    upsert?: DistrictUpsertWithoutCustomersInput
    connect?: DistrictWhereUniqueInput
    update?: XOR<XOR<DistrictUpdateToOneWithWhereWithoutCustomersInput, DistrictUpdateWithoutCustomersInput>, DistrictUncheckedUpdateWithoutCustomersInput>
  }

  export type SaleUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput> | SaleCreateWithoutCustomerInput[] | SaleUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCustomerInput | SaleCreateOrConnectWithoutCustomerInput[]
    upsert?: SaleUpsertWithWhereUniqueWithoutCustomerInput | SaleUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: SaleCreateManyCustomerInputEnvelope
    set?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    disconnect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    delete?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    update?: SaleUpdateWithWhereUniqueWithoutCustomerInput | SaleUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: SaleUpdateManyWithWhereWithoutCustomerInput | SaleUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: SaleScalarWhereInput | SaleScalarWhereInput[]
  }

  export type CustomerReceiptUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput> | CustomerReceiptCreateWithoutCustomerInput[] | CustomerReceiptUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCustomerInput | CustomerReceiptCreateOrConnectWithoutCustomerInput[]
    upsert?: CustomerReceiptUpsertWithWhereUniqueWithoutCustomerInput | CustomerReceiptUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: CustomerReceiptCreateManyCustomerInputEnvelope
    set?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    disconnect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    delete?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    update?: CustomerReceiptUpdateWithWhereUniqueWithoutCustomerInput | CustomerReceiptUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: CustomerReceiptUpdateManyWithWhereWithoutCustomerInput | CustomerReceiptUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
  }

  export type QuotationUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput> | QuotationCreateWithoutCustomerInput[] | QuotationUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCustomerInput | QuotationCreateOrConnectWithoutCustomerInput[]
    upsert?: QuotationUpsertWithWhereUniqueWithoutCustomerInput | QuotationUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: QuotationCreateManyCustomerInputEnvelope
    set?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    disconnect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    delete?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    update?: QuotationUpdateWithWhereUniqueWithoutCustomerInput | QuotationUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: QuotationUpdateManyWithWhereWithoutCustomerInput | QuotationUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedCustomersNestedInput = {
    create?: XOR<UserCreateWithoutCreatedCustomersInput, UserUncheckedCreateWithoutCreatedCustomersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCustomersInput
    upsert?: UserUpsertWithoutCreatedCustomersInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedCustomersInput, UserUpdateWithoutCreatedCustomersInput>, UserUncheckedUpdateWithoutCreatedCustomersInput>
  }

  export type SaleUncheckedUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput> | SaleCreateWithoutCustomerInput[] | SaleUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: SaleCreateOrConnectWithoutCustomerInput | SaleCreateOrConnectWithoutCustomerInput[]
    upsert?: SaleUpsertWithWhereUniqueWithoutCustomerInput | SaleUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: SaleCreateManyCustomerInputEnvelope
    set?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    disconnect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    delete?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    connect?: SaleWhereUniqueInput | SaleWhereUniqueInput[]
    update?: SaleUpdateWithWhereUniqueWithoutCustomerInput | SaleUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: SaleUpdateManyWithWhereWithoutCustomerInput | SaleUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: SaleScalarWhereInput | SaleScalarWhereInput[]
  }

  export type CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput> | CustomerReceiptCreateWithoutCustomerInput[] | CustomerReceiptUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: CustomerReceiptCreateOrConnectWithoutCustomerInput | CustomerReceiptCreateOrConnectWithoutCustomerInput[]
    upsert?: CustomerReceiptUpsertWithWhereUniqueWithoutCustomerInput | CustomerReceiptUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: CustomerReceiptCreateManyCustomerInputEnvelope
    set?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    disconnect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    delete?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    connect?: CustomerReceiptWhereUniqueInput | CustomerReceiptWhereUniqueInput[]
    update?: CustomerReceiptUpdateWithWhereUniqueWithoutCustomerInput | CustomerReceiptUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: CustomerReceiptUpdateManyWithWhereWithoutCustomerInput | CustomerReceiptUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
  }

  export type QuotationUncheckedUpdateManyWithoutCustomerNestedInput = {
    create?: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput> | QuotationCreateWithoutCustomerInput[] | QuotationUncheckedCreateWithoutCustomerInput[]
    connectOrCreate?: QuotationCreateOrConnectWithoutCustomerInput | QuotationCreateOrConnectWithoutCustomerInput[]
    upsert?: QuotationUpsertWithWhereUniqueWithoutCustomerInput | QuotationUpsertWithWhereUniqueWithoutCustomerInput[]
    createMany?: QuotationCreateManyCustomerInputEnvelope
    set?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    disconnect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    delete?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    connect?: QuotationWhereUniqueInput | QuotationWhereUniqueInput[]
    update?: QuotationUpdateWithWhereUniqueWithoutCustomerInput | QuotationUpdateWithWhereUniqueWithoutCustomerInput[]
    updateMany?: QuotationUpdateManyWithWhereWithoutCustomerInput | QuotationUpdateManyWithWhereWithoutCustomerInput[]
    deleteMany?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
  }

  export type StateCreateNestedOneWithoutSuppliersInput = {
    create?: XOR<StateCreateWithoutSuppliersInput, StateUncheckedCreateWithoutSuppliersInput>
    connectOrCreate?: StateCreateOrConnectWithoutSuppliersInput
    connect?: StateWhereUniqueInput
  }

  export type DistrictCreateNestedOneWithoutSuppliersInput = {
    create?: XOR<DistrictCreateWithoutSuppliersInput, DistrictUncheckedCreateWithoutSuppliersInput>
    connectOrCreate?: DistrictCreateOrConnectWithoutSuppliersInput
    connect?: DistrictWhereUniqueInput
  }

  export type PurchaseCreateNestedManyWithoutSupplierInput = {
    create?: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput> | PurchaseCreateWithoutSupplierInput[] | PurchaseUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutSupplierInput | PurchaseCreateOrConnectWithoutSupplierInput[]
    createMany?: PurchaseCreateManySupplierInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type SupplierPaymentCreateNestedManyWithoutSupplierInput = {
    create?: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput> | SupplierPaymentCreateWithoutSupplierInput[] | SupplierPaymentUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutSupplierInput | SupplierPaymentCreateOrConnectWithoutSupplierInput[]
    createMany?: SupplierPaymentCreateManySupplierInputEnvelope
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
  }

  export type BoxReturnCreateNestedManyWithoutSupplierInput = {
    create?: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput> | BoxReturnCreateWithoutSupplierInput[] | BoxReturnUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutSupplierInput | BoxReturnCreateOrConnectWithoutSupplierInput[]
    createMany?: BoxReturnCreateManySupplierInputEnvelope
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedSuppliersInput = {
    create?: XOR<UserCreateWithoutCreatedSuppliersInput, UserUncheckedCreateWithoutCreatedSuppliersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSuppliersInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUncheckedCreateNestedManyWithoutSupplierInput = {
    create?: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput> | PurchaseCreateWithoutSupplierInput[] | PurchaseUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutSupplierInput | PurchaseCreateOrConnectWithoutSupplierInput[]
    createMany?: PurchaseCreateManySupplierInputEnvelope
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
  }

  export type SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput = {
    create?: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput> | SupplierPaymentCreateWithoutSupplierInput[] | SupplierPaymentUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutSupplierInput | SupplierPaymentCreateOrConnectWithoutSupplierInput[]
    createMany?: SupplierPaymentCreateManySupplierInputEnvelope
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
  }

  export type BoxReturnUncheckedCreateNestedManyWithoutSupplierInput = {
    create?: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput> | BoxReturnCreateWithoutSupplierInput[] | BoxReturnUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutSupplierInput | BoxReturnCreateOrConnectWithoutSupplierInput[]
    createMany?: BoxReturnCreateManySupplierInputEnvelope
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
  }

  export type StateUpdateOneRequiredWithoutSuppliersNestedInput = {
    create?: XOR<StateCreateWithoutSuppliersInput, StateUncheckedCreateWithoutSuppliersInput>
    connectOrCreate?: StateCreateOrConnectWithoutSuppliersInput
    upsert?: StateUpsertWithoutSuppliersInput
    connect?: StateWhereUniqueInput
    update?: XOR<XOR<StateUpdateToOneWithWhereWithoutSuppliersInput, StateUpdateWithoutSuppliersInput>, StateUncheckedUpdateWithoutSuppliersInput>
  }

  export type DistrictUpdateOneRequiredWithoutSuppliersNestedInput = {
    create?: XOR<DistrictCreateWithoutSuppliersInput, DistrictUncheckedCreateWithoutSuppliersInput>
    connectOrCreate?: DistrictCreateOrConnectWithoutSuppliersInput
    upsert?: DistrictUpsertWithoutSuppliersInput
    connect?: DistrictWhereUniqueInput
    update?: XOR<XOR<DistrictUpdateToOneWithWhereWithoutSuppliersInput, DistrictUpdateWithoutSuppliersInput>, DistrictUncheckedUpdateWithoutSuppliersInput>
  }

  export type PurchaseUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput> | PurchaseCreateWithoutSupplierInput[] | PurchaseUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutSupplierInput | PurchaseCreateOrConnectWithoutSupplierInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutSupplierInput | PurchaseUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: PurchaseCreateManySupplierInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutSupplierInput | PurchaseUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutSupplierInput | PurchaseUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type SupplierPaymentUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput> | SupplierPaymentCreateWithoutSupplierInput[] | SupplierPaymentUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutSupplierInput | SupplierPaymentCreateOrConnectWithoutSupplierInput[]
    upsert?: SupplierPaymentUpsertWithWhereUniqueWithoutSupplierInput | SupplierPaymentUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: SupplierPaymentCreateManySupplierInputEnvelope
    set?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    disconnect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    delete?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    update?: SupplierPaymentUpdateWithWhereUniqueWithoutSupplierInput | SupplierPaymentUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: SupplierPaymentUpdateManyWithWhereWithoutSupplierInput | SupplierPaymentUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
  }

  export type BoxReturnUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput> | BoxReturnCreateWithoutSupplierInput[] | BoxReturnUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutSupplierInput | BoxReturnCreateOrConnectWithoutSupplierInput[]
    upsert?: BoxReturnUpsertWithWhereUniqueWithoutSupplierInput | BoxReturnUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: BoxReturnCreateManySupplierInputEnvelope
    set?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    disconnect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    delete?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    update?: BoxReturnUpdateWithWhereUniqueWithoutSupplierInput | BoxReturnUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: BoxReturnUpdateManyWithWhereWithoutSupplierInput | BoxReturnUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedSuppliersNestedInput = {
    create?: XOR<UserCreateWithoutCreatedSuppliersInput, UserUncheckedCreateWithoutCreatedSuppliersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSuppliersInput
    upsert?: UserUpsertWithoutCreatedSuppliersInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedSuppliersInput, UserUpdateWithoutCreatedSuppliersInput>, UserUncheckedUpdateWithoutCreatedSuppliersInput>
  }

  export type PurchaseUncheckedUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput> | PurchaseCreateWithoutSupplierInput[] | PurchaseUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: PurchaseCreateOrConnectWithoutSupplierInput | PurchaseCreateOrConnectWithoutSupplierInput[]
    upsert?: PurchaseUpsertWithWhereUniqueWithoutSupplierInput | PurchaseUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: PurchaseCreateManySupplierInputEnvelope
    set?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    disconnect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    delete?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    connect?: PurchaseWhereUniqueInput | PurchaseWhereUniqueInput[]
    update?: PurchaseUpdateWithWhereUniqueWithoutSupplierInput | PurchaseUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: PurchaseUpdateManyWithWhereWithoutSupplierInput | PurchaseUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
  }

  export type SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput> | SupplierPaymentCreateWithoutSupplierInput[] | SupplierPaymentUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: SupplierPaymentCreateOrConnectWithoutSupplierInput | SupplierPaymentCreateOrConnectWithoutSupplierInput[]
    upsert?: SupplierPaymentUpsertWithWhereUniqueWithoutSupplierInput | SupplierPaymentUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: SupplierPaymentCreateManySupplierInputEnvelope
    set?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    disconnect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    delete?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    connect?: SupplierPaymentWhereUniqueInput | SupplierPaymentWhereUniqueInput[]
    update?: SupplierPaymentUpdateWithWhereUniqueWithoutSupplierInput | SupplierPaymentUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: SupplierPaymentUpdateManyWithWhereWithoutSupplierInput | SupplierPaymentUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
  }

  export type BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput = {
    create?: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput> | BoxReturnCreateWithoutSupplierInput[] | BoxReturnUncheckedCreateWithoutSupplierInput[]
    connectOrCreate?: BoxReturnCreateOrConnectWithoutSupplierInput | BoxReturnCreateOrConnectWithoutSupplierInput[]
    upsert?: BoxReturnUpsertWithWhereUniqueWithoutSupplierInput | BoxReturnUpsertWithWhereUniqueWithoutSupplierInput[]
    createMany?: BoxReturnCreateManySupplierInputEnvelope
    set?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    disconnect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    delete?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    connect?: BoxReturnWhereUniqueInput | BoxReturnWhereUniqueInput[]
    update?: BoxReturnUpdateWithWhereUniqueWithoutSupplierInput | BoxReturnUpdateWithWhereUniqueWithoutSupplierInput[]
    updateMany?: BoxReturnUpdateManyWithWhereWithoutSupplierInput | BoxReturnUpdateManyWithWhereWithoutSupplierInput[]
    deleteMany?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
  }

  export type SupplierCreateNestedOneWithoutSupplierPaymentsInput = {
    create?: XOR<SupplierCreateWithoutSupplierPaymentsInput, SupplierUncheckedCreateWithoutSupplierPaymentsInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutSupplierPaymentsInput
    connect?: SupplierWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedSupplierPaymentsInput = {
    create?: XOR<UserCreateWithoutCreatedSupplierPaymentsInput, UserUncheckedCreateWithoutCreatedSupplierPaymentsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSupplierPaymentsInput
    connect?: UserWhereUniqueInput
  }

  export type EnumPaymentModeFieldUpdateOperationsInput = {
    set?: $Enums.PaymentMode
  }

  export type EnumSupplierPaymentTypeFieldUpdateOperationsInput = {
    set?: $Enums.SupplierPaymentType
  }

  export type SupplierUpdateOneRequiredWithoutSupplierPaymentsNestedInput = {
    create?: XOR<SupplierCreateWithoutSupplierPaymentsInput, SupplierUncheckedCreateWithoutSupplierPaymentsInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutSupplierPaymentsInput
    upsert?: SupplierUpsertWithoutSupplierPaymentsInput
    connect?: SupplierWhereUniqueInput
    update?: XOR<XOR<SupplierUpdateToOneWithWhereWithoutSupplierPaymentsInput, SupplierUpdateWithoutSupplierPaymentsInput>, SupplierUncheckedUpdateWithoutSupplierPaymentsInput>
  }

  export type UserUpdateOneWithoutCreatedSupplierPaymentsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedSupplierPaymentsInput, UserUncheckedCreateWithoutCreatedSupplierPaymentsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSupplierPaymentsInput
    upsert?: UserUpsertWithoutCreatedSupplierPaymentsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedSupplierPaymentsInput, UserUpdateWithoutCreatedSupplierPaymentsInput>, UserUncheckedUpdateWithoutCreatedSupplierPaymentsInput>
  }

  export type UserCreateNestedOneWithoutCreatedUpisInput = {
    create?: XOR<UserCreateWithoutCreatedUpisInput, UserUncheckedCreateWithoutCreatedUpisInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedUpisInput
    connect?: UserWhereUniqueInput
  }

  export type UserUpdateOneWithoutCreatedUpisNestedInput = {
    create?: XOR<UserCreateWithoutCreatedUpisInput, UserUncheckedCreateWithoutCreatedUpisInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedUpisInput
    upsert?: UserUpsertWithoutCreatedUpisInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedUpisInput, UserUpdateWithoutCreatedUpisInput>, UserUncheckedUpdateWithoutCreatedUpisInput>
  }

  export type IntFieldUpdateOperationsInput = {
    set?: number
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type SupplierCreateNestedOneWithoutPurchasesInput = {
    create?: XOR<SupplierCreateWithoutPurchasesInput, SupplierUncheckedCreateWithoutPurchasesInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutPurchasesInput
    connect?: SupplierWhereUniqueInput
  }

  export type VegetableCreateNestedOneWithoutPurchasesInput = {
    create?: XOR<VegetableCreateWithoutPurchasesInput, VegetableUncheckedCreateWithoutPurchasesInput>
    connectOrCreate?: VegetableCreateOrConnectWithoutPurchasesInput
    connect?: VegetableWhereUniqueInput
  }

  export type ArrivalSettlementCreateNestedOneWithoutPurchaseInput = {
    create?: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutPurchaseInput
    connect?: ArrivalSettlementWhereUniqueInput
  }

  export type ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutPurchaseInput
    connect?: ArrivalCustomPattiWhereUniqueInput
  }

  export type SaleItemCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput> | SaleItemCreateWithoutPurchaseInput[] | SaleItemUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutPurchaseInput | SaleItemCreateOrConnectWithoutPurchaseInput[]
    createMany?: SaleItemCreateManyPurchaseInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type StockSpoilageCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput> | StockSpoilageCreateWithoutPurchaseInput[] | StockSpoilageUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutPurchaseInput | StockSpoilageCreateOrConnectWithoutPurchaseInput[]
    createMany?: StockSpoilageCreateManyPurchaseInputEnvelope
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
  }

  export type SaleReturnCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput> | SaleReturnCreateWithoutPurchaseInput[] | SaleReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutPurchaseInput | SaleReturnCreateOrConnectWithoutPurchaseInput[]
    createMany?: SaleReturnCreateManyPurchaseInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type PurchaseReturnCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput> | PurchaseReturnCreateWithoutPurchaseInput[] | PurchaseReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutPurchaseInput | PurchaseReturnCreateOrConnectWithoutPurchaseInput[]
    createMany?: PurchaseReturnCreateManyPurchaseInputEnvelope
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
  }

  export type RetailStockCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput> | RetailStockCreateWithoutPurchaseInput[] | RetailStockUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutPurchaseInput | RetailStockCreateOrConnectWithoutPurchaseInput[]
    createMany?: RetailStockCreateManyPurchaseInputEnvelope
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
  }

  export type ExpenseCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput> | ExpenseCreateWithoutPurchaseInput[] | ExpenseUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutPurchaseInput | ExpenseCreateOrConnectWithoutPurchaseInput[]
    createMany?: ExpenseCreateManyPurchaseInputEnvelope
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedPurchasesInput = {
    create?: XOR<UserCreateWithoutCreatedPurchasesInput, UserUncheckedCreateWithoutCreatedPurchasesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedPurchasesInput
    connect?: UserWhereUniqueInput
  }

  export type ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput = {
    create?: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutPurchaseInput
    connect?: ArrivalSettlementWhereUniqueInput
  }

  export type ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutPurchaseInput
    connect?: ArrivalCustomPattiWhereUniqueInput
  }

  export type SaleItemUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput> | SaleItemCreateWithoutPurchaseInput[] | SaleItemUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutPurchaseInput | SaleItemCreateOrConnectWithoutPurchaseInput[]
    createMany?: SaleItemCreateManyPurchaseInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput> | StockSpoilageCreateWithoutPurchaseInput[] | StockSpoilageUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutPurchaseInput | StockSpoilageCreateOrConnectWithoutPurchaseInput[]
    createMany?: StockSpoilageCreateManyPurchaseInputEnvelope
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
  }

  export type SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput> | SaleReturnCreateWithoutPurchaseInput[] | SaleReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutPurchaseInput | SaleReturnCreateOrConnectWithoutPurchaseInput[]
    createMany?: SaleReturnCreateManyPurchaseInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput> | PurchaseReturnCreateWithoutPurchaseInput[] | PurchaseReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutPurchaseInput | PurchaseReturnCreateOrConnectWithoutPurchaseInput[]
    createMany?: PurchaseReturnCreateManyPurchaseInputEnvelope
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
  }

  export type RetailStockUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput> | RetailStockCreateWithoutPurchaseInput[] | RetailStockUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutPurchaseInput | RetailStockCreateOrConnectWithoutPurchaseInput[]
    createMany?: RetailStockCreateManyPurchaseInputEnvelope
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
  }

  export type ExpenseUncheckedCreateNestedManyWithoutPurchaseInput = {
    create?: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput> | ExpenseCreateWithoutPurchaseInput[] | ExpenseUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutPurchaseInput | ExpenseCreateOrConnectWithoutPurchaseInput[]
    createMany?: ExpenseCreateManyPurchaseInputEnvelope
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
  }

  export type EnumPurchaseTypeFieldUpdateOperationsInput = {
    set?: $Enums.PurchaseType
  }

  export type EnumPurchaseStatusFieldUpdateOperationsInput = {
    set?: $Enums.PurchaseStatus
  }

  export type EnumPurchaseUnitFieldUpdateOperationsInput = {
    set?: $Enums.PurchaseUnit
  }

  export type EnumRateTypeFieldUpdateOperationsInput = {
    set?: $Enums.RateType
  }

  export type NullableDecimalFieldUpdateOperationsInput = {
    set?: Decimal | DecimalJsLike | number | string | null
    increment?: Decimal | DecimalJsLike | number | string
    decrement?: Decimal | DecimalJsLike | number | string
    multiply?: Decimal | DecimalJsLike | number | string
    divide?: Decimal | DecimalJsLike | number | string
  }

  export type SupplierUpdateOneWithoutPurchasesNestedInput = {
    create?: XOR<SupplierCreateWithoutPurchasesInput, SupplierUncheckedCreateWithoutPurchasesInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutPurchasesInput
    upsert?: SupplierUpsertWithoutPurchasesInput
    disconnect?: SupplierWhereInput | boolean
    delete?: SupplierWhereInput | boolean
    connect?: SupplierWhereUniqueInput
    update?: XOR<XOR<SupplierUpdateToOneWithWhereWithoutPurchasesInput, SupplierUpdateWithoutPurchasesInput>, SupplierUncheckedUpdateWithoutPurchasesInput>
  }

  export type VegetableUpdateOneRequiredWithoutPurchasesNestedInput = {
    create?: XOR<VegetableCreateWithoutPurchasesInput, VegetableUncheckedCreateWithoutPurchasesInput>
    connectOrCreate?: VegetableCreateOrConnectWithoutPurchasesInput
    upsert?: VegetableUpsertWithoutPurchasesInput
    connect?: VegetableWhereUniqueInput
    update?: XOR<XOR<VegetableUpdateToOneWithWhereWithoutPurchasesInput, VegetableUpdateWithoutPurchasesInput>, VegetableUncheckedUpdateWithoutPurchasesInput>
  }

  export type ArrivalSettlementUpdateOneWithoutPurchaseNestedInput = {
    create?: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutPurchaseInput
    upsert?: ArrivalSettlementUpsertWithoutPurchaseInput
    disconnect?: ArrivalSettlementWhereInput | boolean
    delete?: ArrivalSettlementWhereInput | boolean
    connect?: ArrivalSettlementWhereUniqueInput
    update?: XOR<XOR<ArrivalSettlementUpdateToOneWithWhereWithoutPurchaseInput, ArrivalSettlementUpdateWithoutPurchaseInput>, ArrivalSettlementUncheckedUpdateWithoutPurchaseInput>
  }

  export type ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutPurchaseInput
    upsert?: ArrivalCustomPattiUpsertWithoutPurchaseInput
    disconnect?: ArrivalCustomPattiWhereInput | boolean
    delete?: ArrivalCustomPattiWhereInput | boolean
    connect?: ArrivalCustomPattiWhereUniqueInput
    update?: XOR<XOR<ArrivalCustomPattiUpdateToOneWithWhereWithoutPurchaseInput, ArrivalCustomPattiUpdateWithoutPurchaseInput>, ArrivalCustomPattiUncheckedUpdateWithoutPurchaseInput>
  }

  export type SaleItemUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput> | SaleItemCreateWithoutPurchaseInput[] | SaleItemUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutPurchaseInput | SaleItemCreateOrConnectWithoutPurchaseInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutPurchaseInput | SaleItemUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: SaleItemCreateManyPurchaseInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutPurchaseInput | SaleItemUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutPurchaseInput | SaleItemUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type StockSpoilageUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput> | StockSpoilageCreateWithoutPurchaseInput[] | StockSpoilageUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutPurchaseInput | StockSpoilageCreateOrConnectWithoutPurchaseInput[]
    upsert?: StockSpoilageUpsertWithWhereUniqueWithoutPurchaseInput | StockSpoilageUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: StockSpoilageCreateManyPurchaseInputEnvelope
    set?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    disconnect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    delete?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    update?: StockSpoilageUpdateWithWhereUniqueWithoutPurchaseInput | StockSpoilageUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: StockSpoilageUpdateManyWithWhereWithoutPurchaseInput | StockSpoilageUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
  }

  export type SaleReturnUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput> | SaleReturnCreateWithoutPurchaseInput[] | SaleReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutPurchaseInput | SaleReturnCreateOrConnectWithoutPurchaseInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutPurchaseInput | SaleReturnUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: SaleReturnCreateManyPurchaseInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutPurchaseInput | SaleReturnUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutPurchaseInput | SaleReturnUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type PurchaseReturnUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput> | PurchaseReturnCreateWithoutPurchaseInput[] | PurchaseReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutPurchaseInput | PurchaseReturnCreateOrConnectWithoutPurchaseInput[]
    upsert?: PurchaseReturnUpsertWithWhereUniqueWithoutPurchaseInput | PurchaseReturnUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: PurchaseReturnCreateManyPurchaseInputEnvelope
    set?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    disconnect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    delete?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    update?: PurchaseReturnUpdateWithWhereUniqueWithoutPurchaseInput | PurchaseReturnUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: PurchaseReturnUpdateManyWithWhereWithoutPurchaseInput | PurchaseReturnUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
  }

  export type RetailStockUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput> | RetailStockCreateWithoutPurchaseInput[] | RetailStockUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutPurchaseInput | RetailStockCreateOrConnectWithoutPurchaseInput[]
    upsert?: RetailStockUpsertWithWhereUniqueWithoutPurchaseInput | RetailStockUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: RetailStockCreateManyPurchaseInputEnvelope
    set?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    disconnect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    delete?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    update?: RetailStockUpdateWithWhereUniqueWithoutPurchaseInput | RetailStockUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: RetailStockUpdateManyWithWhereWithoutPurchaseInput | RetailStockUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
  }

  export type ExpenseUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput> | ExpenseCreateWithoutPurchaseInput[] | ExpenseUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutPurchaseInput | ExpenseCreateOrConnectWithoutPurchaseInput[]
    upsert?: ExpenseUpsertWithWhereUniqueWithoutPurchaseInput | ExpenseUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: ExpenseCreateManyPurchaseInputEnvelope
    set?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    disconnect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    delete?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    update?: ExpenseUpdateWithWhereUniqueWithoutPurchaseInput | ExpenseUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: ExpenseUpdateManyWithWhereWithoutPurchaseInput | ExpenseUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedPurchasesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedPurchasesInput, UserUncheckedCreateWithoutCreatedPurchasesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedPurchasesInput
    upsert?: UserUpsertWithoutCreatedPurchasesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedPurchasesInput, UserUpdateWithoutCreatedPurchasesInput>, UserUncheckedUpdateWithoutCreatedPurchasesInput>
  }

  export type ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput = {
    create?: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalSettlementCreateOrConnectWithoutPurchaseInput
    upsert?: ArrivalSettlementUpsertWithoutPurchaseInput
    disconnect?: ArrivalSettlementWhereInput | boolean
    delete?: ArrivalSettlementWhereInput | boolean
    connect?: ArrivalSettlementWhereUniqueInput
    update?: XOR<XOR<ArrivalSettlementUpdateToOneWithWhereWithoutPurchaseInput, ArrivalSettlementUpdateWithoutPurchaseInput>, ArrivalSettlementUncheckedUpdateWithoutPurchaseInput>
  }

  export type ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput = {
    create?: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
    connectOrCreate?: ArrivalCustomPattiCreateOrConnectWithoutPurchaseInput
    upsert?: ArrivalCustomPattiUpsertWithoutPurchaseInput
    disconnect?: ArrivalCustomPattiWhereInput | boolean
    delete?: ArrivalCustomPattiWhereInput | boolean
    connect?: ArrivalCustomPattiWhereUniqueInput
    update?: XOR<XOR<ArrivalCustomPattiUpdateToOneWithWhereWithoutPurchaseInput, ArrivalCustomPattiUpdateWithoutPurchaseInput>, ArrivalCustomPattiUncheckedUpdateWithoutPurchaseInput>
  }

  export type SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput> | SaleItemCreateWithoutPurchaseInput[] | SaleItemUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutPurchaseInput | SaleItemCreateOrConnectWithoutPurchaseInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutPurchaseInput | SaleItemUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: SaleItemCreateManyPurchaseInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutPurchaseInput | SaleItemUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutPurchaseInput | SaleItemUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput> | StockSpoilageCreateWithoutPurchaseInput[] | StockSpoilageUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: StockSpoilageCreateOrConnectWithoutPurchaseInput | StockSpoilageCreateOrConnectWithoutPurchaseInput[]
    upsert?: StockSpoilageUpsertWithWhereUniqueWithoutPurchaseInput | StockSpoilageUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: StockSpoilageCreateManyPurchaseInputEnvelope
    set?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    disconnect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    delete?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    connect?: StockSpoilageWhereUniqueInput | StockSpoilageWhereUniqueInput[]
    update?: StockSpoilageUpdateWithWhereUniqueWithoutPurchaseInput | StockSpoilageUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: StockSpoilageUpdateManyWithWhereWithoutPurchaseInput | StockSpoilageUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
  }

  export type SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput> | SaleReturnCreateWithoutPurchaseInput[] | SaleReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutPurchaseInput | SaleReturnCreateOrConnectWithoutPurchaseInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutPurchaseInput | SaleReturnUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: SaleReturnCreateManyPurchaseInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutPurchaseInput | SaleReturnUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutPurchaseInput | SaleReturnUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput> | PurchaseReturnCreateWithoutPurchaseInput[] | PurchaseReturnUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: PurchaseReturnCreateOrConnectWithoutPurchaseInput | PurchaseReturnCreateOrConnectWithoutPurchaseInput[]
    upsert?: PurchaseReturnUpsertWithWhereUniqueWithoutPurchaseInput | PurchaseReturnUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: PurchaseReturnCreateManyPurchaseInputEnvelope
    set?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    disconnect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    delete?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    connect?: PurchaseReturnWhereUniqueInput | PurchaseReturnWhereUniqueInput[]
    update?: PurchaseReturnUpdateWithWhereUniqueWithoutPurchaseInput | PurchaseReturnUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: PurchaseReturnUpdateManyWithWhereWithoutPurchaseInput | PurchaseReturnUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
  }

  export type RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput> | RetailStockCreateWithoutPurchaseInput[] | RetailStockUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: RetailStockCreateOrConnectWithoutPurchaseInput | RetailStockCreateOrConnectWithoutPurchaseInput[]
    upsert?: RetailStockUpsertWithWhereUniqueWithoutPurchaseInput | RetailStockUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: RetailStockCreateManyPurchaseInputEnvelope
    set?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    disconnect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    delete?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    connect?: RetailStockWhereUniqueInput | RetailStockWhereUniqueInput[]
    update?: RetailStockUpdateWithWhereUniqueWithoutPurchaseInput | RetailStockUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: RetailStockUpdateManyWithWhereWithoutPurchaseInput | RetailStockUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
  }

  export type ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput = {
    create?: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput> | ExpenseCreateWithoutPurchaseInput[] | ExpenseUncheckedCreateWithoutPurchaseInput[]
    connectOrCreate?: ExpenseCreateOrConnectWithoutPurchaseInput | ExpenseCreateOrConnectWithoutPurchaseInput[]
    upsert?: ExpenseUpsertWithWhereUniqueWithoutPurchaseInput | ExpenseUpsertWithWhereUniqueWithoutPurchaseInput[]
    createMany?: ExpenseCreateManyPurchaseInputEnvelope
    set?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    disconnect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    delete?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    connect?: ExpenseWhereUniqueInput | ExpenseWhereUniqueInput[]
    update?: ExpenseUpdateWithWhereUniqueWithoutPurchaseInput | ExpenseUpdateWithWhereUniqueWithoutPurchaseInput[]
    updateMany?: ExpenseUpdateManyWithWhereWithoutPurchaseInput | ExpenseUpdateManyWithWhereWithoutPurchaseInput[]
    deleteMany?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
  }

  export type UserCreateNestedOneWithoutCreatedShopsInput = {
    create?: XOR<UserCreateWithoutCreatedShopsInput, UserUncheckedCreateWithoutCreatedShopsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedShopsInput
    connect?: UserWhereUniqueInput
  }

  export type UserUpdateOneWithoutCreatedShopsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedShopsInput, UserUncheckedCreateWithoutCreatedShopsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedShopsInput
    upsert?: UserUpsertWithoutCreatedShopsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedShopsInput, UserUpdateWithoutCreatedShopsInput>, UserUncheckedUpdateWithoutCreatedShopsInput>
  }

  export type CustomerCreateNestedOneWithoutSalesInput = {
    create?: XOR<CustomerCreateWithoutSalesInput, CustomerUncheckedCreateWithoutSalesInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutSalesInput
    connect?: CustomerWhereUniqueInput
  }

  export type SaleItemCreateNestedManyWithoutSaleInput = {
    create?: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput> | SaleItemCreateWithoutSaleInput[] | SaleItemUncheckedCreateWithoutSaleInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleInput | SaleItemCreateOrConnectWithoutSaleInput[]
    createMany?: SaleItemCreateManySaleInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedSalesInput = {
    create?: XOR<UserCreateWithoutCreatedSalesInput, UserUncheckedCreateWithoutCreatedSalesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSalesInput
    connect?: UserWhereUniqueInput
  }

  export type SaleItemUncheckedCreateNestedManyWithoutSaleInput = {
    create?: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput> | SaleItemCreateWithoutSaleInput[] | SaleItemUncheckedCreateWithoutSaleInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleInput | SaleItemCreateOrConnectWithoutSaleInput[]
    createMany?: SaleItemCreateManySaleInputEnvelope
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
  }

  export type EnumSalePaymentStatusFieldUpdateOperationsInput = {
    set?: $Enums.SalePaymentStatus
  }

  export type CustomerUpdateOneWithoutSalesNestedInput = {
    create?: XOR<CustomerCreateWithoutSalesInput, CustomerUncheckedCreateWithoutSalesInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutSalesInput
    upsert?: CustomerUpsertWithoutSalesInput
    disconnect?: CustomerWhereInput | boolean
    delete?: CustomerWhereInput | boolean
    connect?: CustomerWhereUniqueInput
    update?: XOR<XOR<CustomerUpdateToOneWithWhereWithoutSalesInput, CustomerUpdateWithoutSalesInput>, CustomerUncheckedUpdateWithoutSalesInput>
  }

  export type SaleItemUpdateManyWithoutSaleNestedInput = {
    create?: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput> | SaleItemCreateWithoutSaleInput[] | SaleItemUncheckedCreateWithoutSaleInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleInput | SaleItemCreateOrConnectWithoutSaleInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutSaleInput | SaleItemUpsertWithWhereUniqueWithoutSaleInput[]
    createMany?: SaleItemCreateManySaleInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutSaleInput | SaleItemUpdateWithWhereUniqueWithoutSaleInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutSaleInput | SaleItemUpdateManyWithWhereWithoutSaleInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedSalesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedSalesInput, UserUncheckedCreateWithoutCreatedSalesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSalesInput
    upsert?: UserUpsertWithoutCreatedSalesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedSalesInput, UserUpdateWithoutCreatedSalesInput>, UserUncheckedUpdateWithoutCreatedSalesInput>
  }

  export type SaleItemUncheckedUpdateManyWithoutSaleNestedInput = {
    create?: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput> | SaleItemCreateWithoutSaleInput[] | SaleItemUncheckedCreateWithoutSaleInput[]
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleInput | SaleItemCreateOrConnectWithoutSaleInput[]
    upsert?: SaleItemUpsertWithWhereUniqueWithoutSaleInput | SaleItemUpsertWithWhereUniqueWithoutSaleInput[]
    createMany?: SaleItemCreateManySaleInputEnvelope
    set?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    disconnect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    delete?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    connect?: SaleItemWhereUniqueInput | SaleItemWhereUniqueInput[]
    update?: SaleItemUpdateWithWhereUniqueWithoutSaleInput | SaleItemUpdateWithWhereUniqueWithoutSaleInput[]
    updateMany?: SaleItemUpdateManyWithWhereWithoutSaleInput | SaleItemUpdateManyWithWhereWithoutSaleInput[]
    deleteMany?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
  }

  export type SaleCreateNestedOneWithoutItemsInput = {
    create?: XOR<SaleCreateWithoutItemsInput, SaleUncheckedCreateWithoutItemsInput>
    connectOrCreate?: SaleCreateOrConnectWithoutItemsInput
    connect?: SaleWhereUniqueInput
  }

  export type PurchaseCreateNestedOneWithoutSaleItemsInput = {
    create?: XOR<PurchaseCreateWithoutSaleItemsInput, PurchaseUncheckedCreateWithoutSaleItemsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutSaleItemsInput
    connect?: PurchaseWhereUniqueInput
  }

  export type SaleReturnCreateNestedManyWithoutSaleItemInput = {
    create?: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput> | SaleReturnCreateWithoutSaleItemInput[] | SaleReturnUncheckedCreateWithoutSaleItemInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutSaleItemInput | SaleReturnCreateOrConnectWithoutSaleItemInput[]
    createMany?: SaleReturnCreateManySaleItemInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedSaleItemsInput = {
    create?: XOR<UserCreateWithoutCreatedSaleItemsInput, UserUncheckedCreateWithoutCreatedSaleItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSaleItemsInput
    connect?: UserWhereUniqueInput
  }

  export type SaleReturnUncheckedCreateNestedManyWithoutSaleItemInput = {
    create?: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput> | SaleReturnCreateWithoutSaleItemInput[] | SaleReturnUncheckedCreateWithoutSaleItemInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutSaleItemInput | SaleReturnCreateOrConnectWithoutSaleItemInput[]
    createMany?: SaleReturnCreateManySaleItemInputEnvelope
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
  }

  export type SaleUpdateOneRequiredWithoutItemsNestedInput = {
    create?: XOR<SaleCreateWithoutItemsInput, SaleUncheckedCreateWithoutItemsInput>
    connectOrCreate?: SaleCreateOrConnectWithoutItemsInput
    upsert?: SaleUpsertWithoutItemsInput
    connect?: SaleWhereUniqueInput
    update?: XOR<XOR<SaleUpdateToOneWithWhereWithoutItemsInput, SaleUpdateWithoutItemsInput>, SaleUncheckedUpdateWithoutItemsInput>
  }

  export type PurchaseUpdateOneRequiredWithoutSaleItemsNestedInput = {
    create?: XOR<PurchaseCreateWithoutSaleItemsInput, PurchaseUncheckedCreateWithoutSaleItemsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutSaleItemsInput
    upsert?: PurchaseUpsertWithoutSaleItemsInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutSaleItemsInput, PurchaseUpdateWithoutSaleItemsInput>, PurchaseUncheckedUpdateWithoutSaleItemsInput>
  }

  export type SaleReturnUpdateManyWithoutSaleItemNestedInput = {
    create?: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput> | SaleReturnCreateWithoutSaleItemInput[] | SaleReturnUncheckedCreateWithoutSaleItemInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutSaleItemInput | SaleReturnCreateOrConnectWithoutSaleItemInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutSaleItemInput | SaleReturnUpsertWithWhereUniqueWithoutSaleItemInput[]
    createMany?: SaleReturnCreateManySaleItemInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutSaleItemInput | SaleReturnUpdateWithWhereUniqueWithoutSaleItemInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutSaleItemInput | SaleReturnUpdateManyWithWhereWithoutSaleItemInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedSaleItemsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedSaleItemsInput, UserUncheckedCreateWithoutCreatedSaleItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSaleItemsInput
    upsert?: UserUpsertWithoutCreatedSaleItemsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedSaleItemsInput, UserUpdateWithoutCreatedSaleItemsInput>, UserUncheckedUpdateWithoutCreatedSaleItemsInput>
  }

  export type SaleReturnUncheckedUpdateManyWithoutSaleItemNestedInput = {
    create?: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput> | SaleReturnCreateWithoutSaleItemInput[] | SaleReturnUncheckedCreateWithoutSaleItemInput[]
    connectOrCreate?: SaleReturnCreateOrConnectWithoutSaleItemInput | SaleReturnCreateOrConnectWithoutSaleItemInput[]
    upsert?: SaleReturnUpsertWithWhereUniqueWithoutSaleItemInput | SaleReturnUpsertWithWhereUniqueWithoutSaleItemInput[]
    createMany?: SaleReturnCreateManySaleItemInputEnvelope
    set?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    disconnect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    delete?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    connect?: SaleReturnWhereUniqueInput | SaleReturnWhereUniqueInput[]
    update?: SaleReturnUpdateWithWhereUniqueWithoutSaleItemInput | SaleReturnUpdateWithWhereUniqueWithoutSaleItemInput[]
    updateMany?: SaleReturnUpdateManyWithWhereWithoutSaleItemInput | SaleReturnUpdateManyWithWhereWithoutSaleItemInput[]
    deleteMany?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
  }

  export type CustomerCreateNestedOneWithoutCustomerReceiptsInput = {
    create?: XOR<CustomerCreateWithoutCustomerReceiptsInput, CustomerUncheckedCreateWithoutCustomerReceiptsInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutCustomerReceiptsInput
    connect?: CustomerWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedCustomerReceiptsInput = {
    create?: XOR<UserCreateWithoutCreatedCustomerReceiptsInput, UserUncheckedCreateWithoutCreatedCustomerReceiptsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCustomerReceiptsInput
    connect?: UserWhereUniqueInput
  }

  export type CustomerUpdateOneRequiredWithoutCustomerReceiptsNestedInput = {
    create?: XOR<CustomerCreateWithoutCustomerReceiptsInput, CustomerUncheckedCreateWithoutCustomerReceiptsInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutCustomerReceiptsInput
    upsert?: CustomerUpsertWithoutCustomerReceiptsInput
    connect?: CustomerWhereUniqueInput
    update?: XOR<XOR<CustomerUpdateToOneWithWhereWithoutCustomerReceiptsInput, CustomerUpdateWithoutCustomerReceiptsInput>, CustomerUncheckedUpdateWithoutCustomerReceiptsInput>
  }

  export type UserUpdateOneWithoutCreatedCustomerReceiptsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedCustomerReceiptsInput, UserUncheckedCreateWithoutCreatedCustomerReceiptsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCustomerReceiptsInput
    upsert?: UserUpsertWithoutCreatedCustomerReceiptsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedCustomerReceiptsInput, UserUpdateWithoutCreatedCustomerReceiptsInput>, UserUncheckedUpdateWithoutCreatedCustomerReceiptsInput>
  }

  export type PurchaseCreateNestedOneWithoutExpensesInput = {
    create?: XOR<PurchaseCreateWithoutExpensesInput, PurchaseUncheckedCreateWithoutExpensesInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutExpensesInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedExpensesInput = {
    create?: XOR<UserCreateWithoutCreatedExpensesInput, UserUncheckedCreateWithoutCreatedExpensesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedExpensesInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUpdateOneWithoutExpensesNestedInput = {
    create?: XOR<PurchaseCreateWithoutExpensesInput, PurchaseUncheckedCreateWithoutExpensesInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutExpensesInput
    upsert?: PurchaseUpsertWithoutExpensesInput
    disconnect?: PurchaseWhereInput | boolean
    delete?: PurchaseWhereInput | boolean
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutExpensesInput, PurchaseUpdateWithoutExpensesInput>, PurchaseUncheckedUpdateWithoutExpensesInput>
  }

  export type UserUpdateOneWithoutCreatedExpensesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedExpensesInput, UserUncheckedCreateWithoutCreatedExpensesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedExpensesInput
    upsert?: UserUpsertWithoutCreatedExpensesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedExpensesInput, UserUpdateWithoutCreatedExpensesInput>, UserUncheckedUpdateWithoutCreatedExpensesInput>
  }

  export type UserCreateNestedOneWithoutForgotPasswordInput = {
    create?: XOR<UserCreateWithoutForgotPasswordInput, UserUncheckedCreateWithoutForgotPasswordInput>
    connectOrCreate?: UserCreateOrConnectWithoutForgotPasswordInput
    connect?: UserWhereUniqueInput
  }

  export type UserUpdateOneRequiredWithoutForgotPasswordNestedInput = {
    create?: XOR<UserCreateWithoutForgotPasswordInput, UserUncheckedCreateWithoutForgotPasswordInput>
    connectOrCreate?: UserCreateOrConnectWithoutForgotPasswordInput
    upsert?: UserUpsertWithoutForgotPasswordInput
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutForgotPasswordInput, UserUpdateWithoutForgotPasswordInput>, UserUncheckedUpdateWithoutForgotPasswordInput>
  }

  export type PurchaseCreateNestedOneWithoutStockSpoilagesInput = {
    create?: XOR<PurchaseCreateWithoutStockSpoilagesInput, PurchaseUncheckedCreateWithoutStockSpoilagesInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutStockSpoilagesInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedStockSpoilagesInput = {
    create?: XOR<UserCreateWithoutCreatedStockSpoilagesInput, UserUncheckedCreateWithoutCreatedStockSpoilagesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedStockSpoilagesInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUpdateOneRequiredWithoutStockSpoilagesNestedInput = {
    create?: XOR<PurchaseCreateWithoutStockSpoilagesInput, PurchaseUncheckedCreateWithoutStockSpoilagesInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutStockSpoilagesInput
    upsert?: PurchaseUpsertWithoutStockSpoilagesInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutStockSpoilagesInput, PurchaseUpdateWithoutStockSpoilagesInput>, PurchaseUncheckedUpdateWithoutStockSpoilagesInput>
  }

  export type UserUpdateOneWithoutCreatedStockSpoilagesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedStockSpoilagesInput, UserUncheckedCreateWithoutCreatedStockSpoilagesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedStockSpoilagesInput
    upsert?: UserUpsertWithoutCreatedStockSpoilagesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedStockSpoilagesInput, UserUpdateWithoutCreatedStockSpoilagesInput>, UserUncheckedUpdateWithoutCreatedStockSpoilagesInput>
  }

  export type SaleItemCreateNestedOneWithoutSaleReturnsInput = {
    create?: XOR<SaleItemCreateWithoutSaleReturnsInput, SaleItemUncheckedCreateWithoutSaleReturnsInput>
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleReturnsInput
    connect?: SaleItemWhereUniqueInput
  }

  export type PurchaseCreateNestedOneWithoutSaleReturnsInput = {
    create?: XOR<PurchaseCreateWithoutSaleReturnsInput, PurchaseUncheckedCreateWithoutSaleReturnsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutSaleReturnsInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedSaleReturnsInput = {
    create?: XOR<UserCreateWithoutCreatedSaleReturnsInput, UserUncheckedCreateWithoutCreatedSaleReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSaleReturnsInput
    connect?: UserWhereUniqueInput
  }

  export type SaleItemUpdateOneRequiredWithoutSaleReturnsNestedInput = {
    create?: XOR<SaleItemCreateWithoutSaleReturnsInput, SaleItemUncheckedCreateWithoutSaleReturnsInput>
    connectOrCreate?: SaleItemCreateOrConnectWithoutSaleReturnsInput
    upsert?: SaleItemUpsertWithoutSaleReturnsInput
    connect?: SaleItemWhereUniqueInput
    update?: XOR<XOR<SaleItemUpdateToOneWithWhereWithoutSaleReturnsInput, SaleItemUpdateWithoutSaleReturnsInput>, SaleItemUncheckedUpdateWithoutSaleReturnsInput>
  }

  export type PurchaseUpdateOneRequiredWithoutSaleReturnsNestedInput = {
    create?: XOR<PurchaseCreateWithoutSaleReturnsInput, PurchaseUncheckedCreateWithoutSaleReturnsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutSaleReturnsInput
    upsert?: PurchaseUpsertWithoutSaleReturnsInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutSaleReturnsInput, PurchaseUpdateWithoutSaleReturnsInput>, PurchaseUncheckedUpdateWithoutSaleReturnsInput>
  }

  export type UserUpdateOneWithoutCreatedSaleReturnsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedSaleReturnsInput, UserUncheckedCreateWithoutCreatedSaleReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedSaleReturnsInput
    upsert?: UserUpsertWithoutCreatedSaleReturnsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedSaleReturnsInput, UserUpdateWithoutCreatedSaleReturnsInput>, UserUncheckedUpdateWithoutCreatedSaleReturnsInput>
  }

  export type PurchaseCreateNestedOneWithoutArrivalSettlementInput = {
    create?: XOR<PurchaseCreateWithoutArrivalSettlementInput, PurchaseUncheckedCreateWithoutArrivalSettlementInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutArrivalSettlementInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedArrivalSettlementsInput = {
    create?: XOR<UserCreateWithoutCreatedArrivalSettlementsInput, UserUncheckedCreateWithoutCreatedArrivalSettlementsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedArrivalSettlementsInput
    connect?: UserWhereUniqueInput
  }

  export type EnumSettlementStatusFieldUpdateOperationsInput = {
    set?: $Enums.SettlementStatus
  }

  export type NullableEnumPaymentModeFieldUpdateOperationsInput = {
    set?: $Enums.PaymentMode | null
  }

  export type PurchaseUpdateOneRequiredWithoutArrivalSettlementNestedInput = {
    create?: XOR<PurchaseCreateWithoutArrivalSettlementInput, PurchaseUncheckedCreateWithoutArrivalSettlementInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutArrivalSettlementInput
    upsert?: PurchaseUpsertWithoutArrivalSettlementInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutArrivalSettlementInput, PurchaseUpdateWithoutArrivalSettlementInput>, PurchaseUncheckedUpdateWithoutArrivalSettlementInput>
  }

  export type UserUpdateOneWithoutCreatedArrivalSettlementsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedArrivalSettlementsInput, UserUncheckedCreateWithoutCreatedArrivalSettlementsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedArrivalSettlementsInput
    upsert?: UserUpsertWithoutCreatedArrivalSettlementsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedArrivalSettlementsInput, UserUpdateWithoutCreatedArrivalSettlementsInput>, UserUncheckedUpdateWithoutCreatedArrivalSettlementsInput>
  }

  export type PurchaseCreateNestedOneWithoutArrivalCustomPattiInput = {
    create?: XOR<PurchaseCreateWithoutArrivalCustomPattiInput, PurchaseUncheckedCreateWithoutArrivalCustomPattiInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutArrivalCustomPattiInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedArrivalCustomPattisInput = {
    create?: XOR<UserCreateWithoutCreatedArrivalCustomPattisInput, UserUncheckedCreateWithoutCreatedArrivalCustomPattisInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedArrivalCustomPattisInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUpdateOneRequiredWithoutArrivalCustomPattiNestedInput = {
    create?: XOR<PurchaseCreateWithoutArrivalCustomPattiInput, PurchaseUncheckedCreateWithoutArrivalCustomPattiInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutArrivalCustomPattiInput
    upsert?: PurchaseUpsertWithoutArrivalCustomPattiInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutArrivalCustomPattiInput, PurchaseUpdateWithoutArrivalCustomPattiInput>, PurchaseUncheckedUpdateWithoutArrivalCustomPattiInput>
  }

  export type UserUpdateOneWithoutCreatedArrivalCustomPattisNestedInput = {
    create?: XOR<UserCreateWithoutCreatedArrivalCustomPattisInput, UserUncheckedCreateWithoutCreatedArrivalCustomPattisInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedArrivalCustomPattisInput
    upsert?: UserUpsertWithoutCreatedArrivalCustomPattisInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedArrivalCustomPattisInput, UserUpdateWithoutCreatedArrivalCustomPattisInput>, UserUncheckedUpdateWithoutCreatedArrivalCustomPattisInput>
  }

  export type CustomerCreateNestedOneWithoutQuotationsInput = {
    create?: XOR<CustomerCreateWithoutQuotationsInput, CustomerUncheckedCreateWithoutQuotationsInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutQuotationsInput
    connect?: CustomerWhereUniqueInput
  }

  export type QuotationItemCreateNestedManyWithoutQuotationInput = {
    create?: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput> | QuotationItemCreateWithoutQuotationInput[] | QuotationItemUncheckedCreateWithoutQuotationInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutQuotationInput | QuotationItemCreateOrConnectWithoutQuotationInput[]
    createMany?: QuotationItemCreateManyQuotationInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedQuotationsInput = {
    create?: XOR<UserCreateWithoutCreatedQuotationsInput, UserUncheckedCreateWithoutCreatedQuotationsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedQuotationsInput
    connect?: UserWhereUniqueInput
  }

  export type QuotationItemUncheckedCreateNestedManyWithoutQuotationInput = {
    create?: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput> | QuotationItemCreateWithoutQuotationInput[] | QuotationItemUncheckedCreateWithoutQuotationInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutQuotationInput | QuotationItemCreateOrConnectWithoutQuotationInput[]
    createMany?: QuotationItemCreateManyQuotationInputEnvelope
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
  }

  export type CustomerUpdateOneWithoutQuotationsNestedInput = {
    create?: XOR<CustomerCreateWithoutQuotationsInput, CustomerUncheckedCreateWithoutQuotationsInput>
    connectOrCreate?: CustomerCreateOrConnectWithoutQuotationsInput
    upsert?: CustomerUpsertWithoutQuotationsInput
    disconnect?: CustomerWhereInput | boolean
    delete?: CustomerWhereInput | boolean
    connect?: CustomerWhereUniqueInput
    update?: XOR<XOR<CustomerUpdateToOneWithWhereWithoutQuotationsInput, CustomerUpdateWithoutQuotationsInput>, CustomerUncheckedUpdateWithoutQuotationsInput>
  }

  export type QuotationItemUpdateManyWithoutQuotationNestedInput = {
    create?: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput> | QuotationItemCreateWithoutQuotationInput[] | QuotationItemUncheckedCreateWithoutQuotationInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutQuotationInput | QuotationItemCreateOrConnectWithoutQuotationInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutQuotationInput | QuotationItemUpsertWithWhereUniqueWithoutQuotationInput[]
    createMany?: QuotationItemCreateManyQuotationInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutQuotationInput | QuotationItemUpdateWithWhereUniqueWithoutQuotationInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutQuotationInput | QuotationItemUpdateManyWithWhereWithoutQuotationInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedQuotationsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedQuotationsInput, UserUncheckedCreateWithoutCreatedQuotationsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedQuotationsInput
    upsert?: UserUpsertWithoutCreatedQuotationsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedQuotationsInput, UserUpdateWithoutCreatedQuotationsInput>, UserUncheckedUpdateWithoutCreatedQuotationsInput>
  }

  export type QuotationItemUncheckedUpdateManyWithoutQuotationNestedInput = {
    create?: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput> | QuotationItemCreateWithoutQuotationInput[] | QuotationItemUncheckedCreateWithoutQuotationInput[]
    connectOrCreate?: QuotationItemCreateOrConnectWithoutQuotationInput | QuotationItemCreateOrConnectWithoutQuotationInput[]
    upsert?: QuotationItemUpsertWithWhereUniqueWithoutQuotationInput | QuotationItemUpsertWithWhereUniqueWithoutQuotationInput[]
    createMany?: QuotationItemCreateManyQuotationInputEnvelope
    set?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    disconnect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    delete?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    connect?: QuotationItemWhereUniqueInput | QuotationItemWhereUniqueInput[]
    update?: QuotationItemUpdateWithWhereUniqueWithoutQuotationInput | QuotationItemUpdateWithWhereUniqueWithoutQuotationInput[]
    updateMany?: QuotationItemUpdateManyWithWhereWithoutQuotationInput | QuotationItemUpdateManyWithWhereWithoutQuotationInput[]
    deleteMany?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
  }

  export type QuotationCreateNestedOneWithoutItemsInput = {
    create?: XOR<QuotationCreateWithoutItemsInput, QuotationUncheckedCreateWithoutItemsInput>
    connectOrCreate?: QuotationCreateOrConnectWithoutItemsInput
    connect?: QuotationWhereUniqueInput
  }

  export type VegetableCreateNestedOneWithoutQuotationItemsInput = {
    create?: XOR<VegetableCreateWithoutQuotationItemsInput, VegetableUncheckedCreateWithoutQuotationItemsInput>
    connectOrCreate?: VegetableCreateOrConnectWithoutQuotationItemsInput
    connect?: VegetableWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedQuotationItemsInput = {
    create?: XOR<UserCreateWithoutCreatedQuotationItemsInput, UserUncheckedCreateWithoutCreatedQuotationItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedQuotationItemsInput
    connect?: UserWhereUniqueInput
  }

  export type QuotationUpdateOneRequiredWithoutItemsNestedInput = {
    create?: XOR<QuotationCreateWithoutItemsInput, QuotationUncheckedCreateWithoutItemsInput>
    connectOrCreate?: QuotationCreateOrConnectWithoutItemsInput
    upsert?: QuotationUpsertWithoutItemsInput
    connect?: QuotationWhereUniqueInput
    update?: XOR<XOR<QuotationUpdateToOneWithWhereWithoutItemsInput, QuotationUpdateWithoutItemsInput>, QuotationUncheckedUpdateWithoutItemsInput>
  }

  export type VegetableUpdateOneWithoutQuotationItemsNestedInput = {
    create?: XOR<VegetableCreateWithoutQuotationItemsInput, VegetableUncheckedCreateWithoutQuotationItemsInput>
    connectOrCreate?: VegetableCreateOrConnectWithoutQuotationItemsInput
    upsert?: VegetableUpsertWithoutQuotationItemsInput
    disconnect?: VegetableWhereInput | boolean
    delete?: VegetableWhereInput | boolean
    connect?: VegetableWhereUniqueInput
    update?: XOR<XOR<VegetableUpdateToOneWithWhereWithoutQuotationItemsInput, VegetableUpdateWithoutQuotationItemsInput>, VegetableUncheckedUpdateWithoutQuotationItemsInput>
  }

  export type UserUpdateOneWithoutCreatedQuotationItemsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedQuotationItemsInput, UserUncheckedCreateWithoutCreatedQuotationItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedQuotationItemsInput
    upsert?: UserUpsertWithoutCreatedQuotationItemsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedQuotationItemsInput, UserUpdateWithoutCreatedQuotationItemsInput>, UserUncheckedUpdateWithoutCreatedQuotationItemsInput>
  }

  export type PurchaseCreateNestedOneWithoutPurchaseReturnsInput = {
    create?: XOR<PurchaseCreateWithoutPurchaseReturnsInput, PurchaseUncheckedCreateWithoutPurchaseReturnsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutPurchaseReturnsInput
    connect?: PurchaseWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedPurchaseReturnsInput = {
    create?: XOR<UserCreateWithoutCreatedPurchaseReturnsInput, UserUncheckedCreateWithoutCreatedPurchaseReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedPurchaseReturnsInput
    connect?: UserWhereUniqueInput
  }

  export type PurchaseUpdateOneRequiredWithoutPurchaseReturnsNestedInput = {
    create?: XOR<PurchaseCreateWithoutPurchaseReturnsInput, PurchaseUncheckedCreateWithoutPurchaseReturnsInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutPurchaseReturnsInput
    upsert?: PurchaseUpsertWithoutPurchaseReturnsInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutPurchaseReturnsInput, PurchaseUpdateWithoutPurchaseReturnsInput>, PurchaseUncheckedUpdateWithoutPurchaseReturnsInput>
  }

  export type UserUpdateOneWithoutCreatedPurchaseReturnsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedPurchaseReturnsInput, UserUncheckedCreateWithoutCreatedPurchaseReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedPurchaseReturnsInput
    upsert?: UserUpsertWithoutCreatedPurchaseReturnsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedPurchaseReturnsInput, UserUpdateWithoutCreatedPurchaseReturnsInput>, UserUncheckedUpdateWithoutCreatedPurchaseReturnsInput>
  }

  export type PurchaseCreateNestedOneWithoutRetailStocksInput = {
    create?: XOR<PurchaseCreateWithoutRetailStocksInput, PurchaseUncheckedCreateWithoutRetailStocksInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutRetailStocksInput
    connect?: PurchaseWhereUniqueInput
  }

  export type RetailSaleItemCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput> | RetailSaleItemCreateWithoutRetailStockInput[] | RetailSaleItemUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailStockInput | RetailSaleItemCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailSaleItemCreateManyRetailStockInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type RetailStockSpoilageCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput> | RetailStockSpoilageCreateWithoutRetailStockInput[] | RetailStockSpoilageUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutRetailStockInput | RetailStockSpoilageCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailStockSpoilageCreateManyRetailStockInputEnvelope
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
  }

  export type RetailStockReturnCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput> | RetailStockReturnCreateWithoutRetailStockInput[] | RetailStockReturnUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutRetailStockInput | RetailStockReturnCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailStockReturnCreateManyRetailStockInputEnvelope
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedRetailStocksInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStocksInput, UserUncheckedCreateWithoutCreatedRetailStocksInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStocksInput
    connect?: UserWhereUniqueInput
  }

  export type RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput> | RetailSaleItemCreateWithoutRetailStockInput[] | RetailSaleItemUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailStockInput | RetailSaleItemCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailSaleItemCreateManyRetailStockInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput> | RetailStockSpoilageCreateWithoutRetailStockInput[] | RetailStockSpoilageUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutRetailStockInput | RetailStockSpoilageCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailStockSpoilageCreateManyRetailStockInputEnvelope
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
  }

  export type RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput = {
    create?: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput> | RetailStockReturnCreateWithoutRetailStockInput[] | RetailStockReturnUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutRetailStockInput | RetailStockReturnCreateOrConnectWithoutRetailStockInput[]
    createMany?: RetailStockReturnCreateManyRetailStockInputEnvelope
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
  }

  export type PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput = {
    create?: XOR<PurchaseCreateWithoutRetailStocksInput, PurchaseUncheckedCreateWithoutRetailStocksInput>
    connectOrCreate?: PurchaseCreateOrConnectWithoutRetailStocksInput
    upsert?: PurchaseUpsertWithoutRetailStocksInput
    connect?: PurchaseWhereUniqueInput
    update?: XOR<XOR<PurchaseUpdateToOneWithWhereWithoutRetailStocksInput, PurchaseUpdateWithoutRetailStocksInput>, PurchaseUncheckedUpdateWithoutRetailStocksInput>
  }

  export type RetailSaleItemUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput> | RetailSaleItemCreateWithoutRetailStockInput[] | RetailSaleItemUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailStockInput | RetailSaleItemCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutRetailStockInput | RetailSaleItemUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailSaleItemCreateManyRetailStockInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutRetailStockInput | RetailSaleItemUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutRetailStockInput | RetailSaleItemUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput> | RetailStockSpoilageCreateWithoutRetailStockInput[] | RetailStockSpoilageUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutRetailStockInput | RetailStockSpoilageCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailStockSpoilageUpsertWithWhereUniqueWithoutRetailStockInput | RetailStockSpoilageUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailStockSpoilageCreateManyRetailStockInputEnvelope
    set?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    disconnect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    delete?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    update?: RetailStockSpoilageUpdateWithWhereUniqueWithoutRetailStockInput | RetailStockSpoilageUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailStockSpoilageUpdateManyWithWhereWithoutRetailStockInput | RetailStockSpoilageUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
  }

  export type RetailStockReturnUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput> | RetailStockReturnCreateWithoutRetailStockInput[] | RetailStockReturnUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutRetailStockInput | RetailStockReturnCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailStockReturnUpsertWithWhereUniqueWithoutRetailStockInput | RetailStockReturnUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailStockReturnCreateManyRetailStockInputEnvelope
    set?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    disconnect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    delete?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    update?: RetailStockReturnUpdateWithWhereUniqueWithoutRetailStockInput | RetailStockReturnUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailStockReturnUpdateManyWithWhereWithoutRetailStockInput | RetailStockReturnUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedRetailStocksNestedInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStocksInput, UserUncheckedCreateWithoutCreatedRetailStocksInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStocksInput
    upsert?: UserUpsertWithoutCreatedRetailStocksInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedRetailStocksInput, UserUpdateWithoutCreatedRetailStocksInput>, UserUncheckedUpdateWithoutCreatedRetailStocksInput>
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput> | RetailSaleItemCreateWithoutRetailStockInput[] | RetailSaleItemUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailStockInput | RetailSaleItemCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutRetailStockInput | RetailSaleItemUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailSaleItemCreateManyRetailStockInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutRetailStockInput | RetailSaleItemUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutRetailStockInput | RetailSaleItemUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput> | RetailStockSpoilageCreateWithoutRetailStockInput[] | RetailStockSpoilageUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockSpoilageCreateOrConnectWithoutRetailStockInput | RetailStockSpoilageCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailStockSpoilageUpsertWithWhereUniqueWithoutRetailStockInput | RetailStockSpoilageUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailStockSpoilageCreateManyRetailStockInputEnvelope
    set?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    disconnect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    delete?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    connect?: RetailStockSpoilageWhereUniqueInput | RetailStockSpoilageWhereUniqueInput[]
    update?: RetailStockSpoilageUpdateWithWhereUniqueWithoutRetailStockInput | RetailStockSpoilageUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailStockSpoilageUpdateManyWithWhereWithoutRetailStockInput | RetailStockSpoilageUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
  }

  export type RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput = {
    create?: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput> | RetailStockReturnCreateWithoutRetailStockInput[] | RetailStockReturnUncheckedCreateWithoutRetailStockInput[]
    connectOrCreate?: RetailStockReturnCreateOrConnectWithoutRetailStockInput | RetailStockReturnCreateOrConnectWithoutRetailStockInput[]
    upsert?: RetailStockReturnUpsertWithWhereUniqueWithoutRetailStockInput | RetailStockReturnUpsertWithWhereUniqueWithoutRetailStockInput[]
    createMany?: RetailStockReturnCreateManyRetailStockInputEnvelope
    set?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    disconnect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    delete?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    connect?: RetailStockReturnWhereUniqueInput | RetailStockReturnWhereUniqueInput[]
    update?: RetailStockReturnUpdateWithWhereUniqueWithoutRetailStockInput | RetailStockReturnUpdateWithWhereUniqueWithoutRetailStockInput[]
    updateMany?: RetailStockReturnUpdateManyWithWhereWithoutRetailStockInput | RetailStockReturnUpdateManyWithWhereWithoutRetailStockInput[]
    deleteMany?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
  }

  export type RetailStockCreateNestedOneWithoutRetailStockReturnsInput = {
    create?: XOR<RetailStockCreateWithoutRetailStockReturnsInput, RetailStockUncheckedCreateWithoutRetailStockReturnsInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailStockReturnsInput
    connect?: RetailStockWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedRetailStockReturnsInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStockReturnsInput, UserUncheckedCreateWithoutCreatedRetailStockReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStockReturnsInput
    connect?: UserWhereUniqueInput
  }

  export type RetailStockUpdateOneRequiredWithoutRetailStockReturnsNestedInput = {
    create?: XOR<RetailStockCreateWithoutRetailStockReturnsInput, RetailStockUncheckedCreateWithoutRetailStockReturnsInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailStockReturnsInput
    upsert?: RetailStockUpsertWithoutRetailStockReturnsInput
    connect?: RetailStockWhereUniqueInput
    update?: XOR<XOR<RetailStockUpdateToOneWithWhereWithoutRetailStockReturnsInput, RetailStockUpdateWithoutRetailStockReturnsInput>, RetailStockUncheckedUpdateWithoutRetailStockReturnsInput>
  }

  export type UserUpdateOneWithoutCreatedRetailStockReturnsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStockReturnsInput, UserUncheckedCreateWithoutCreatedRetailStockReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStockReturnsInput
    upsert?: UserUpsertWithoutCreatedRetailStockReturnsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedRetailStockReturnsInput, UserUpdateWithoutCreatedRetailStockReturnsInput>, UserUncheckedUpdateWithoutCreatedRetailStockReturnsInput>
  }

  export type RetailSaleItemCreateNestedManyWithoutRetailSaleInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput> | RetailSaleItemCreateWithoutRetailSaleInput[] | RetailSaleItemUncheckedCreateWithoutRetailSaleInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailSaleInput | RetailSaleItemCreateOrConnectWithoutRetailSaleInput[]
    createMany?: RetailSaleItemCreateManyRetailSaleInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedRetailSalesInput = {
    create?: XOR<UserCreateWithoutCreatedRetailSalesInput, UserUncheckedCreateWithoutCreatedRetailSalesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailSalesInput
    connect?: UserWhereUniqueInput
  }

  export type RetailSaleItemUncheckedCreateNestedManyWithoutRetailSaleInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput> | RetailSaleItemCreateWithoutRetailSaleInput[] | RetailSaleItemUncheckedCreateWithoutRetailSaleInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailSaleInput | RetailSaleItemCreateOrConnectWithoutRetailSaleInput[]
    createMany?: RetailSaleItemCreateManyRetailSaleInputEnvelope
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
  }

  export type RetailSaleItemUpdateManyWithoutRetailSaleNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput> | RetailSaleItemCreateWithoutRetailSaleInput[] | RetailSaleItemUncheckedCreateWithoutRetailSaleInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailSaleInput | RetailSaleItemCreateOrConnectWithoutRetailSaleInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutRetailSaleInput | RetailSaleItemUpsertWithWhereUniqueWithoutRetailSaleInput[]
    createMany?: RetailSaleItemCreateManyRetailSaleInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutRetailSaleInput | RetailSaleItemUpdateWithWhereUniqueWithoutRetailSaleInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutRetailSaleInput | RetailSaleItemUpdateManyWithWhereWithoutRetailSaleInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedRetailSalesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedRetailSalesInput, UserUncheckedCreateWithoutCreatedRetailSalesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailSalesInput
    upsert?: UserUpsertWithoutCreatedRetailSalesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedRetailSalesInput, UserUpdateWithoutCreatedRetailSalesInput>, UserUncheckedUpdateWithoutCreatedRetailSalesInput>
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutRetailSaleNestedInput = {
    create?: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput> | RetailSaleItemCreateWithoutRetailSaleInput[] | RetailSaleItemUncheckedCreateWithoutRetailSaleInput[]
    connectOrCreate?: RetailSaleItemCreateOrConnectWithoutRetailSaleInput | RetailSaleItemCreateOrConnectWithoutRetailSaleInput[]
    upsert?: RetailSaleItemUpsertWithWhereUniqueWithoutRetailSaleInput | RetailSaleItemUpsertWithWhereUniqueWithoutRetailSaleInput[]
    createMany?: RetailSaleItemCreateManyRetailSaleInputEnvelope
    set?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    disconnect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    delete?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    connect?: RetailSaleItemWhereUniqueInput | RetailSaleItemWhereUniqueInput[]
    update?: RetailSaleItemUpdateWithWhereUniqueWithoutRetailSaleInput | RetailSaleItemUpdateWithWhereUniqueWithoutRetailSaleInput[]
    updateMany?: RetailSaleItemUpdateManyWithWhereWithoutRetailSaleInput | RetailSaleItemUpdateManyWithWhereWithoutRetailSaleInput[]
    deleteMany?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
  }

  export type RetailSaleCreateNestedOneWithoutItemsInput = {
    create?: XOR<RetailSaleCreateWithoutItemsInput, RetailSaleUncheckedCreateWithoutItemsInput>
    connectOrCreate?: RetailSaleCreateOrConnectWithoutItemsInput
    connect?: RetailSaleWhereUniqueInput
  }

  export type RetailStockCreateNestedOneWithoutRetailSaleItemsInput = {
    create?: XOR<RetailStockCreateWithoutRetailSaleItemsInput, RetailStockUncheckedCreateWithoutRetailSaleItemsInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailSaleItemsInput
    connect?: RetailStockWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedRetailSaleItemsInput = {
    create?: XOR<UserCreateWithoutCreatedRetailSaleItemsInput, UserUncheckedCreateWithoutCreatedRetailSaleItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailSaleItemsInput
    connect?: UserWhereUniqueInput
  }

  export type RetailSaleUpdateOneRequiredWithoutItemsNestedInput = {
    create?: XOR<RetailSaleCreateWithoutItemsInput, RetailSaleUncheckedCreateWithoutItemsInput>
    connectOrCreate?: RetailSaleCreateOrConnectWithoutItemsInput
    upsert?: RetailSaleUpsertWithoutItemsInput
    connect?: RetailSaleWhereUniqueInput
    update?: XOR<XOR<RetailSaleUpdateToOneWithWhereWithoutItemsInput, RetailSaleUpdateWithoutItemsInput>, RetailSaleUncheckedUpdateWithoutItemsInput>
  }

  export type RetailStockUpdateOneRequiredWithoutRetailSaleItemsNestedInput = {
    create?: XOR<RetailStockCreateWithoutRetailSaleItemsInput, RetailStockUncheckedCreateWithoutRetailSaleItemsInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailSaleItemsInput
    upsert?: RetailStockUpsertWithoutRetailSaleItemsInput
    connect?: RetailStockWhereUniqueInput
    update?: XOR<XOR<RetailStockUpdateToOneWithWhereWithoutRetailSaleItemsInput, RetailStockUpdateWithoutRetailSaleItemsInput>, RetailStockUncheckedUpdateWithoutRetailSaleItemsInput>
  }

  export type UserUpdateOneWithoutCreatedRetailSaleItemsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedRetailSaleItemsInput, UserUncheckedCreateWithoutCreatedRetailSaleItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailSaleItemsInput
    upsert?: UserUpsertWithoutCreatedRetailSaleItemsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedRetailSaleItemsInput, UserUpdateWithoutCreatedRetailSaleItemsInput>, UserUncheckedUpdateWithoutCreatedRetailSaleItemsInput>
  }

  export type RetailStockCreateNestedOneWithoutRetailStockSpoilagesInput = {
    create?: XOR<RetailStockCreateWithoutRetailStockSpoilagesInput, RetailStockUncheckedCreateWithoutRetailStockSpoilagesInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailStockSpoilagesInput
    connect?: RetailStockWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedRetailStockSpoilagesInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedCreateWithoutCreatedRetailStockSpoilagesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStockSpoilagesInput
    connect?: UserWhereUniqueInput
  }

  export type RetailStockUpdateOneRequiredWithoutRetailStockSpoilagesNestedInput = {
    create?: XOR<RetailStockCreateWithoutRetailStockSpoilagesInput, RetailStockUncheckedCreateWithoutRetailStockSpoilagesInput>
    connectOrCreate?: RetailStockCreateOrConnectWithoutRetailStockSpoilagesInput
    upsert?: RetailStockUpsertWithoutRetailStockSpoilagesInput
    connect?: RetailStockWhereUniqueInput
    update?: XOR<XOR<RetailStockUpdateToOneWithWhereWithoutRetailStockSpoilagesInput, RetailStockUpdateWithoutRetailStockSpoilagesInput>, RetailStockUncheckedUpdateWithoutRetailStockSpoilagesInput>
  }

  export type UserUpdateOneWithoutCreatedRetailStockSpoilagesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedCreateWithoutCreatedRetailStockSpoilagesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedRetailStockSpoilagesInput
    upsert?: UserUpsertWithoutCreatedRetailStockSpoilagesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedRetailStockSpoilagesInput, UserUpdateWithoutCreatedRetailStockSpoilagesInput>, UserUncheckedUpdateWithoutCreatedRetailStockSpoilagesInput>
  }

  export type SupplierCreateNestedOneWithoutBoxReturnsInput = {
    create?: XOR<SupplierCreateWithoutBoxReturnsInput, SupplierUncheckedCreateWithoutBoxReturnsInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutBoxReturnsInput
    connect?: SupplierWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedBoxReturnsInput = {
    create?: XOR<UserCreateWithoutCreatedBoxReturnsInput, UserUncheckedCreateWithoutCreatedBoxReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedBoxReturnsInput
    connect?: UserWhereUniqueInput
  }

  export type SupplierUpdateOneRequiredWithoutBoxReturnsNestedInput = {
    create?: XOR<SupplierCreateWithoutBoxReturnsInput, SupplierUncheckedCreateWithoutBoxReturnsInput>
    connectOrCreate?: SupplierCreateOrConnectWithoutBoxReturnsInput
    upsert?: SupplierUpsertWithoutBoxReturnsInput
    connect?: SupplierWhereUniqueInput
    update?: XOR<XOR<SupplierUpdateToOneWithWhereWithoutBoxReturnsInput, SupplierUpdateWithoutBoxReturnsInput>, SupplierUncheckedUpdateWithoutBoxReturnsInput>
  }

  export type UserUpdateOneWithoutCreatedBoxReturnsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedBoxReturnsInput, UserUncheckedCreateWithoutCreatedBoxReturnsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedBoxReturnsInput
    upsert?: UserUpsertWithoutCreatedBoxReturnsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedBoxReturnsInput, UserUpdateWithoutCreatedBoxReturnsInput>, UserUncheckedUpdateWithoutCreatedBoxReturnsInput>
  }

  export type AttendanceCreateNestedManyWithoutEmployeeInput = {
    create?: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput> | AttendanceCreateWithoutEmployeeInput[] | AttendanceUncheckedCreateWithoutEmployeeInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutEmployeeInput | AttendanceCreateOrConnectWithoutEmployeeInput[]
    createMany?: AttendanceCreateManyEmployeeInputEnvelope
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedEmployeesInput = {
    create?: XOR<UserCreateWithoutCreatedEmployeesInput, UserUncheckedCreateWithoutCreatedEmployeesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedEmployeesInput
    connect?: UserWhereUniqueInput
  }

  export type AttendanceUncheckedCreateNestedManyWithoutEmployeeInput = {
    create?: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput> | AttendanceCreateWithoutEmployeeInput[] | AttendanceUncheckedCreateWithoutEmployeeInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutEmployeeInput | AttendanceCreateOrConnectWithoutEmployeeInput[]
    createMany?: AttendanceCreateManyEmployeeInputEnvelope
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
  }

  export type AttendanceUpdateManyWithoutEmployeeNestedInput = {
    create?: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput> | AttendanceCreateWithoutEmployeeInput[] | AttendanceUncheckedCreateWithoutEmployeeInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutEmployeeInput | AttendanceCreateOrConnectWithoutEmployeeInput[]
    upsert?: AttendanceUpsertWithWhereUniqueWithoutEmployeeInput | AttendanceUpsertWithWhereUniqueWithoutEmployeeInput[]
    createMany?: AttendanceCreateManyEmployeeInputEnvelope
    set?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    disconnect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    delete?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    update?: AttendanceUpdateWithWhereUniqueWithoutEmployeeInput | AttendanceUpdateWithWhereUniqueWithoutEmployeeInput[]
    updateMany?: AttendanceUpdateManyWithWhereWithoutEmployeeInput | AttendanceUpdateManyWithWhereWithoutEmployeeInput[]
    deleteMany?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedEmployeesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedEmployeesInput, UserUncheckedCreateWithoutCreatedEmployeesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedEmployeesInput
    upsert?: UserUpsertWithoutCreatedEmployeesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedEmployeesInput, UserUpdateWithoutCreatedEmployeesInput>, UserUncheckedUpdateWithoutCreatedEmployeesInput>
  }

  export type AttendanceUncheckedUpdateManyWithoutEmployeeNestedInput = {
    create?: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput> | AttendanceCreateWithoutEmployeeInput[] | AttendanceUncheckedCreateWithoutEmployeeInput[]
    connectOrCreate?: AttendanceCreateOrConnectWithoutEmployeeInput | AttendanceCreateOrConnectWithoutEmployeeInput[]
    upsert?: AttendanceUpsertWithWhereUniqueWithoutEmployeeInput | AttendanceUpsertWithWhereUniqueWithoutEmployeeInput[]
    createMany?: AttendanceCreateManyEmployeeInputEnvelope
    set?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    disconnect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    delete?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    connect?: AttendanceWhereUniqueInput | AttendanceWhereUniqueInput[]
    update?: AttendanceUpdateWithWhereUniqueWithoutEmployeeInput | AttendanceUpdateWithWhereUniqueWithoutEmployeeInput[]
    updateMany?: AttendanceUpdateManyWithWhereWithoutEmployeeInput | AttendanceUpdateManyWithWhereWithoutEmployeeInput[]
    deleteMany?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
  }

  export type EmployeeCreateNestedOneWithoutAttendancesInput = {
    create?: XOR<EmployeeCreateWithoutAttendancesInput, EmployeeUncheckedCreateWithoutAttendancesInput>
    connectOrCreate?: EmployeeCreateOrConnectWithoutAttendancesInput
    connect?: EmployeeWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedAttendancesInput = {
    create?: XOR<UserCreateWithoutCreatedAttendancesInput, UserUncheckedCreateWithoutCreatedAttendancesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedAttendancesInput
    connect?: UserWhereUniqueInput
  }

  export type EnumAttendanceStatusFieldUpdateOperationsInput = {
    set?: $Enums.AttendanceStatus
  }

  export type EmployeeUpdateOneRequiredWithoutAttendancesNestedInput = {
    create?: XOR<EmployeeCreateWithoutAttendancesInput, EmployeeUncheckedCreateWithoutAttendancesInput>
    connectOrCreate?: EmployeeCreateOrConnectWithoutAttendancesInput
    upsert?: EmployeeUpsertWithoutAttendancesInput
    connect?: EmployeeWhereUniqueInput
    update?: XOR<XOR<EmployeeUpdateToOneWithWhereWithoutAttendancesInput, EmployeeUpdateWithoutAttendancesInput>, EmployeeUncheckedUpdateWithoutAttendancesInput>
  }

  export type UserUpdateOneWithoutCreatedAttendancesNestedInput = {
    create?: XOR<UserCreateWithoutCreatedAttendancesInput, UserUncheckedCreateWithoutCreatedAttendancesInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedAttendancesInput
    upsert?: UserUpsertWithoutCreatedAttendancesInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedAttendancesInput, UserUpdateWithoutCreatedAttendancesInput>, UserUncheckedUpdateWithoutCreatedAttendancesInput>
  }

  export type UserCreateNestedOneWithoutAuditLogsInput = {
    create?: XOR<UserCreateWithoutAuditLogsInput, UserUncheckedCreateWithoutAuditLogsInput>
    connectOrCreate?: UserCreateOrConnectWithoutAuditLogsInput
    connect?: UserWhereUniqueInput
  }

  export type EnumAuditActionFieldUpdateOperationsInput = {
    set?: $Enums.AuditAction
  }

  export type UserUpdateOneWithoutAuditLogsNestedInput = {
    create?: XOR<UserCreateWithoutAuditLogsInput, UserUncheckedCreateWithoutAuditLogsInput>
    connectOrCreate?: UserCreateOrConnectWithoutAuditLogsInput
    upsert?: UserUpsertWithoutAuditLogsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutAuditLogsInput, UserUpdateWithoutAuditLogsInput>, UserUncheckedUpdateWithoutAuditLogsInput>
  }

  export type FastBillingItemCreateNestedManyWithoutFastBillingInput = {
    create?: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput> | FastBillingItemCreateWithoutFastBillingInput[] | FastBillingItemUncheckedCreateWithoutFastBillingInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutFastBillingInput | FastBillingItemCreateOrConnectWithoutFastBillingInput[]
    createMany?: FastBillingItemCreateManyFastBillingInputEnvelope
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
  }

  export type UserCreateNestedOneWithoutCreatedFastBillingsInput = {
    create?: XOR<UserCreateWithoutCreatedFastBillingsInput, UserUncheckedCreateWithoutCreatedFastBillingsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedFastBillingsInput
    connect?: UserWhereUniqueInput
  }

  export type FastBillingItemUncheckedCreateNestedManyWithoutFastBillingInput = {
    create?: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput> | FastBillingItemCreateWithoutFastBillingInput[] | FastBillingItemUncheckedCreateWithoutFastBillingInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutFastBillingInput | FastBillingItemCreateOrConnectWithoutFastBillingInput[]
    createMany?: FastBillingItemCreateManyFastBillingInputEnvelope
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
  }

  export type FastBillingItemUpdateManyWithoutFastBillingNestedInput = {
    create?: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput> | FastBillingItemCreateWithoutFastBillingInput[] | FastBillingItemUncheckedCreateWithoutFastBillingInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutFastBillingInput | FastBillingItemCreateOrConnectWithoutFastBillingInput[]
    upsert?: FastBillingItemUpsertWithWhereUniqueWithoutFastBillingInput | FastBillingItemUpsertWithWhereUniqueWithoutFastBillingInput[]
    createMany?: FastBillingItemCreateManyFastBillingInputEnvelope
    set?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    disconnect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    delete?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    update?: FastBillingItemUpdateWithWhereUniqueWithoutFastBillingInput | FastBillingItemUpdateWithWhereUniqueWithoutFastBillingInput[]
    updateMany?: FastBillingItemUpdateManyWithWhereWithoutFastBillingInput | FastBillingItemUpdateManyWithWhereWithoutFastBillingInput[]
    deleteMany?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
  }

  export type UserUpdateOneWithoutCreatedFastBillingsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedFastBillingsInput, UserUncheckedCreateWithoutCreatedFastBillingsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedFastBillingsInput
    upsert?: UserUpsertWithoutCreatedFastBillingsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedFastBillingsInput, UserUpdateWithoutCreatedFastBillingsInput>, UserUncheckedUpdateWithoutCreatedFastBillingsInput>
  }

  export type FastBillingItemUncheckedUpdateManyWithoutFastBillingNestedInput = {
    create?: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput> | FastBillingItemCreateWithoutFastBillingInput[] | FastBillingItemUncheckedCreateWithoutFastBillingInput[]
    connectOrCreate?: FastBillingItemCreateOrConnectWithoutFastBillingInput | FastBillingItemCreateOrConnectWithoutFastBillingInput[]
    upsert?: FastBillingItemUpsertWithWhereUniqueWithoutFastBillingInput | FastBillingItemUpsertWithWhereUniqueWithoutFastBillingInput[]
    createMany?: FastBillingItemCreateManyFastBillingInputEnvelope
    set?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    disconnect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    delete?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    connect?: FastBillingItemWhereUniqueInput | FastBillingItemWhereUniqueInput[]
    update?: FastBillingItemUpdateWithWhereUniqueWithoutFastBillingInput | FastBillingItemUpdateWithWhereUniqueWithoutFastBillingInput[]
    updateMany?: FastBillingItemUpdateManyWithWhereWithoutFastBillingInput | FastBillingItemUpdateManyWithWhereWithoutFastBillingInput[]
    deleteMany?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
  }

  export type FastBillingCreateNestedOneWithoutItemsInput = {
    create?: XOR<FastBillingCreateWithoutItemsInput, FastBillingUncheckedCreateWithoutItemsInput>
    connectOrCreate?: FastBillingCreateOrConnectWithoutItemsInput
    connect?: FastBillingWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedFastBillingItemsInput = {
    create?: XOR<UserCreateWithoutCreatedFastBillingItemsInput, UserUncheckedCreateWithoutCreatedFastBillingItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedFastBillingItemsInput
    connect?: UserWhereUniqueInput
  }

  export type FastBillingUpdateOneRequiredWithoutItemsNestedInput = {
    create?: XOR<FastBillingCreateWithoutItemsInput, FastBillingUncheckedCreateWithoutItemsInput>
    connectOrCreate?: FastBillingCreateOrConnectWithoutItemsInput
    upsert?: FastBillingUpsertWithoutItemsInput
    connect?: FastBillingWhereUniqueInput
    update?: XOR<XOR<FastBillingUpdateToOneWithWhereWithoutItemsInput, FastBillingUpdateWithoutItemsInput>, FastBillingUncheckedUpdateWithoutItemsInput>
  }

  export type UserUpdateOneWithoutCreatedFastBillingItemsNestedInput = {
    create?: XOR<UserCreateWithoutCreatedFastBillingItemsInput, UserUncheckedCreateWithoutCreatedFastBillingItemsInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedFastBillingItemsInput
    upsert?: UserUpsertWithoutCreatedFastBillingItemsInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedFastBillingItemsInput, UserUpdateWithoutCreatedFastBillingItemsInput>, UserUncheckedUpdateWithoutCreatedFastBillingItemsInput>
  }

  export type UserCreateNestedOneWithoutDeletedCashBankTransfersInput = {
    create?: XOR<UserCreateWithoutDeletedCashBankTransfersInput, UserUncheckedCreateWithoutDeletedCashBankTransfersInput>
    connectOrCreate?: UserCreateOrConnectWithoutDeletedCashBankTransfersInput
    connect?: UserWhereUniqueInput
  }

  export type UserCreateNestedOneWithoutCreatedCashBankTransfersInput = {
    create?: XOR<UserCreateWithoutCreatedCashBankTransfersInput, UserUncheckedCreateWithoutCreatedCashBankTransfersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCashBankTransfersInput
    connect?: UserWhereUniqueInput
  }

  export type UserUpdateOneWithoutDeletedCashBankTransfersNestedInput = {
    create?: XOR<UserCreateWithoutDeletedCashBankTransfersInput, UserUncheckedCreateWithoutDeletedCashBankTransfersInput>
    connectOrCreate?: UserCreateOrConnectWithoutDeletedCashBankTransfersInput
    upsert?: UserUpsertWithoutDeletedCashBankTransfersInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutDeletedCashBankTransfersInput, UserUpdateWithoutDeletedCashBankTransfersInput>, UserUncheckedUpdateWithoutDeletedCashBankTransfersInput>
  }

  export type UserUpdateOneWithoutCreatedCashBankTransfersNestedInput = {
    create?: XOR<UserCreateWithoutCreatedCashBankTransfersInput, UserUncheckedCreateWithoutCreatedCashBankTransfersInput>
    connectOrCreate?: UserCreateOrConnectWithoutCreatedCashBankTransfersInput
    upsert?: UserUpsertWithoutCreatedCashBankTransfersInput
    disconnect?: UserWhereInput | boolean
    delete?: UserWhereInput | boolean
    connect?: UserWhereUniqueInput
    update?: XOR<XOR<UserUpdateToOneWithWhereWithoutCreatedCashBankTransfersInput, UserUpdateWithoutCreatedCashBankTransfersInput>, UserUncheckedUpdateWithoutCreatedCashBankTransfersInput>
  }

  export type NestedBigIntFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    in?: bigint[] | number[]
    notIn?: bigint[] | number[]
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntFilter<$PrismaModel> | bigint | number
  }

  export type NestedStringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[]
    notIn?: string[]
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringFilter<$PrismaModel> | string
  }

  export type NestedDateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[]
    notIn?: Date[] | string[]
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeFilter<$PrismaModel> | Date | string
  }

  export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    in?: bigint[] | number[]
    notIn?: bigint[] | number[]
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedBigIntFilter<$PrismaModel>
    _min?: NestedBigIntFilter<$PrismaModel>
    _max?: NestedBigIntFilter<$PrismaModel>
  }

  export type NestedIntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[]
    notIn?: number[]
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }

  export type NestedFloatFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[]
    notIn?: number[]
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatFilter<$PrismaModel> | number
  }

  export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[]
    notIn?: string[]
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[]
    notIn?: Date[] | string[]
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedDateTimeFilter<$PrismaModel>
    _max?: NestedDateTimeFilter<$PrismaModel>
  }

  export type NestedStringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | null
    notIn?: string[] | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringNullableFilter<$PrismaModel> | string | null
  }

  export type NestedBoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | null
    notIn?: string[] | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    search?: string
    not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }

  export type NestedIntNullableFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel> | null
    in?: number[] | null
    notIn?: number[] | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableFilter<$PrismaModel> | number | null
  }

  export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type NestedBigIntNullableFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | null
    notIn?: bigint[] | number[] | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null
  }

  export type NestedBigIntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | null
    notIn?: bigint[] | number[] | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedBigIntNullableFilter<$PrismaModel>
    _min?: NestedBigIntNullableFilter<$PrismaModel>
    _max?: NestedBigIntNullableFilter<$PrismaModel>
  }

  export type NestedFloatNullableFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel> | null
    in?: number[] | null
    notIn?: number[] | null
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatNullableFilter<$PrismaModel> | number | null
  }

  export type NestedDecimalFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[]
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[]
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
  }

  export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | null
    notIn?: Date[] | string[] | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
  }

  export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[]
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[]
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedDecimalFilter<$PrismaModel>
    _sum?: NestedDecimalFilter<$PrismaModel>
    _min?: NestedDecimalFilter<$PrismaModel>
    _max?: NestedDecimalFilter<$PrismaModel>
  }

  export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | null
    notIn?: Date[] | string[] | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedDateTimeNullableFilter<$PrismaModel>
    _max?: NestedDateTimeNullableFilter<$PrismaModel>
  }

  export type NestedEnumPaymentModeFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel>
    in?: $Enums.PaymentMode[]
    notIn?: $Enums.PaymentMode[]
    not?: NestedEnumPaymentModeFilter<$PrismaModel> | $Enums.PaymentMode
  }

  export type NestedEnumSupplierPaymentTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.SupplierPaymentType | EnumSupplierPaymentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.SupplierPaymentType[]
    notIn?: $Enums.SupplierPaymentType[]
    not?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel> | $Enums.SupplierPaymentType
  }

  export type NestedEnumPaymentModeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel>
    in?: $Enums.PaymentMode[]
    notIn?: $Enums.PaymentMode[]
    not?: NestedEnumPaymentModeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMode
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPaymentModeFilter<$PrismaModel>
    _max?: NestedEnumPaymentModeFilter<$PrismaModel>
  }

  export type NestedEnumSupplierPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SupplierPaymentType | EnumSupplierPaymentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.SupplierPaymentType[]
    notIn?: $Enums.SupplierPaymentType[]
    not?: NestedEnumSupplierPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.SupplierPaymentType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel>
    _max?: NestedEnumSupplierPaymentTypeFilter<$PrismaModel>
  }

  export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[]
    notIn?: number[]
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedIntFilter<$PrismaModel>
    _min?: NestedIntFilter<$PrismaModel>
    _max?: NestedIntFilter<$PrismaModel>
  }

  export type NestedEnumPurchaseTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseType | EnumPurchaseTypeFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseType[]
    notIn?: $Enums.PurchaseType[]
    not?: NestedEnumPurchaseTypeFilter<$PrismaModel> | $Enums.PurchaseType
  }

  export type NestedEnumPurchaseStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseStatus | EnumPurchaseStatusFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseStatus[]
    notIn?: $Enums.PurchaseStatus[]
    not?: NestedEnumPurchaseStatusFilter<$PrismaModel> | $Enums.PurchaseStatus
  }

  export type NestedEnumPurchaseUnitFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseUnit | EnumPurchaseUnitFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseUnit[]
    notIn?: $Enums.PurchaseUnit[]
    not?: NestedEnumPurchaseUnitFilter<$PrismaModel> | $Enums.PurchaseUnit
  }

  export type NestedEnumRateTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.RateType | EnumRateTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RateType[]
    notIn?: $Enums.RateType[]
    not?: NestedEnumRateTypeFilter<$PrismaModel> | $Enums.RateType
  }

  export type NestedDecimalNullableFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
  }

  export type NestedEnumPurchaseTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseType | EnumPurchaseTypeFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseType[]
    notIn?: $Enums.PurchaseType[]
    not?: NestedEnumPurchaseTypeWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseTypeFilter<$PrismaModel>
    _max?: NestedEnumPurchaseTypeFilter<$PrismaModel>
  }

  export type NestedEnumPurchaseStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseStatus | EnumPurchaseStatusFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseStatus[]
    notIn?: $Enums.PurchaseStatus[]
    not?: NestedEnumPurchaseStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseStatusFilter<$PrismaModel>
    _max?: NestedEnumPurchaseStatusFilter<$PrismaModel>
  }

  export type NestedEnumPurchaseUnitWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PurchaseUnit | EnumPurchaseUnitFieldRefInput<$PrismaModel>
    in?: $Enums.PurchaseUnit[]
    notIn?: $Enums.PurchaseUnit[]
    not?: NestedEnumPurchaseUnitWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseUnit
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumPurchaseUnitFilter<$PrismaModel>
    _max?: NestedEnumPurchaseUnitFilter<$PrismaModel>
  }

  export type NestedEnumRateTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.RateType | EnumRateTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RateType[]
    notIn?: $Enums.RateType[]
    not?: NestedEnumRateTypeWithAggregatesFilter<$PrismaModel> | $Enums.RateType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumRateTypeFilter<$PrismaModel>
    _max?: NestedEnumRateTypeFilter<$PrismaModel>
  }

  export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedDecimalNullableFilter<$PrismaModel>
    _sum?: NestedDecimalNullableFilter<$PrismaModel>
    _min?: NestedDecimalNullableFilter<$PrismaModel>
    _max?: NestedDecimalNullableFilter<$PrismaModel>
  }

  export type NestedEnumSalePaymentStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.SalePaymentStatus | EnumSalePaymentStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SalePaymentStatus[]
    notIn?: $Enums.SalePaymentStatus[]
    not?: NestedEnumSalePaymentStatusFilter<$PrismaModel> | $Enums.SalePaymentStatus
  }

  export type NestedEnumSalePaymentStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SalePaymentStatus | EnumSalePaymentStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SalePaymentStatus[]
    notIn?: $Enums.SalePaymentStatus[]
    not?: NestedEnumSalePaymentStatusWithAggregatesFilter<$PrismaModel> | $Enums.SalePaymentStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSalePaymentStatusFilter<$PrismaModel>
    _max?: NestedEnumSalePaymentStatusFilter<$PrismaModel>
  }
  export type NestedJsonNullableFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type NestedEnumSettlementStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.SettlementStatus | EnumSettlementStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SettlementStatus[]
    notIn?: $Enums.SettlementStatus[]
    not?: NestedEnumSettlementStatusFilter<$PrismaModel> | $Enums.SettlementStatus
  }

  export type NestedEnumPaymentModeNullableFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel> | null
    in?: $Enums.PaymentMode[] | null
    notIn?: $Enums.PaymentMode[] | null
    not?: NestedEnumPaymentModeNullableFilter<$PrismaModel> | $Enums.PaymentMode | null
  }

  export type NestedEnumSettlementStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.SettlementStatus | EnumSettlementStatusFieldRefInput<$PrismaModel>
    in?: $Enums.SettlementStatus[]
    notIn?: $Enums.SettlementStatus[]
    not?: NestedEnumSettlementStatusWithAggregatesFilter<$PrismaModel> | $Enums.SettlementStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumSettlementStatusFilter<$PrismaModel>
    _max?: NestedEnumSettlementStatusFilter<$PrismaModel>
  }

  export type NestedEnumPaymentModeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.PaymentMode | EnumPaymentModeFieldRefInput<$PrismaModel> | null
    in?: $Enums.PaymentMode[] | null
    notIn?: $Enums.PaymentMode[] | null
    not?: NestedEnumPaymentModeNullableWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMode | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedEnumPaymentModeNullableFilter<$PrismaModel>
    _max?: NestedEnumPaymentModeNullableFilter<$PrismaModel>
  }
  export type NestedJsonFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue
    lte?: InputJsonValue
    gt?: InputJsonValue
    gte?: InputJsonValue
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type NestedEnumAttendanceStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.AttendanceStatus | EnumAttendanceStatusFieldRefInput<$PrismaModel>
    in?: $Enums.AttendanceStatus[]
    notIn?: $Enums.AttendanceStatus[]
    not?: NestedEnumAttendanceStatusFilter<$PrismaModel> | $Enums.AttendanceStatus
  }

  export type NestedEnumAttendanceStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.AttendanceStatus | EnumAttendanceStatusFieldRefInput<$PrismaModel>
    in?: $Enums.AttendanceStatus[]
    notIn?: $Enums.AttendanceStatus[]
    not?: NestedEnumAttendanceStatusWithAggregatesFilter<$PrismaModel> | $Enums.AttendanceStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumAttendanceStatusFilter<$PrismaModel>
    _max?: NestedEnumAttendanceStatusFilter<$PrismaModel>
  }

  export type NestedEnumAuditActionFilter<$PrismaModel = never> = {
    equals?: $Enums.AuditAction | EnumAuditActionFieldRefInput<$PrismaModel>
    in?: $Enums.AuditAction[]
    notIn?: $Enums.AuditAction[]
    not?: NestedEnumAuditActionFilter<$PrismaModel> | $Enums.AuditAction
  }

  export type NestedEnumAuditActionWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.AuditAction | EnumAuditActionFieldRefInput<$PrismaModel>
    in?: $Enums.AuditAction[]
    notIn?: $Enums.AuditAction[]
    not?: NestedEnumAuditActionWithAggregatesFilter<$PrismaModel> | $Enums.AuditAction
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumAuditActionFilter<$PrismaModel>
    _max?: NestedEnumAuditActionFilter<$PrismaModel>
  }

  export type UserCreateWithoutRoleInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutRoleInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutRoleInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput>
  }

  export type UserCreateManyRoleInputEnvelope = {
    data: UserCreateManyRoleInput | UserCreateManyRoleInput[]
    skipDuplicates?: boolean
  }

  export type UserUpsertWithWhereUniqueWithoutRoleInput = {
    where: UserWhereUniqueInput
    update: XOR<UserUpdateWithoutRoleInput, UserUncheckedUpdateWithoutRoleInput>
    create: XOR<UserCreateWithoutRoleInput, UserUncheckedCreateWithoutRoleInput>
  }

  export type UserUpdateWithWhereUniqueWithoutRoleInput = {
    where: UserWhereUniqueInput
    data: XOR<UserUpdateWithoutRoleInput, UserUncheckedUpdateWithoutRoleInput>
  }

  export type UserUpdateManyWithWhereWithoutRoleInput = {
    where: UserScalarWhereInput
    data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyWithoutRoleInput>
  }

  export type UserScalarWhereInput = {
    AND?: UserScalarWhereInput | UserScalarWhereInput[]
    OR?: UserScalarWhereInput[]
    NOT?: UserScalarWhereInput | UserScalarWhereInput[]
    id?: BigIntFilter<"User"> | bigint | number
    name?: StringFilter<"User"> | string
    email?: StringFilter<"User"> | string
    mobileNo?: StringNullableFilter<"User"> | string | null
    password?: StringFilter<"User"> | string
    roleId?: BigIntFilter<"User"> | bigint | number
    createdAt?: DateTimeFilter<"User"> | Date | string
    updatedAt?: DateTimeFilter<"User"> | Date | string
    status?: BoolFilter<"User"> | boolean
    profile?: StringNullableFilter<"User"> | string | null
  }

  export type RoleCreateWithoutUsersInput = {
    id?: bigint | number
    name: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RoleUncheckedCreateWithoutUsersInput = {
    id?: bigint | number
    name: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RoleCreateOrConnectWithoutUsersInput = {
    where: RoleWhereUniqueInput
    create: XOR<RoleCreateWithoutUsersInput, RoleUncheckedCreateWithoutUsersInput>
  }

  export type ForgotPasswordCreateWithoutUserInput = {
    otp: string
    expiresAt: Date | string
    attempts?: number
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ForgotPasswordUncheckedCreateWithoutUserInput = {
    otp: string
    expiresAt: Date | string
    attempts?: number
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ForgotPasswordCreateOrConnectWithoutUserInput = {
    where: ForgotPasswordWhereUniqueInput
    create: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
  }

  export type StateCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    districts?: DistrictCreateNestedManyWithoutStateInput
    customers?: CustomerCreateNestedManyWithoutStateInput
    suppliers?: SupplierCreateNestedManyWithoutStateInput
  }

  export type StateUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    districts?: DistrictUncheckedCreateNestedManyWithoutStateInput
    customers?: CustomerUncheckedCreateNestedManyWithoutStateInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutStateInput
  }

  export type StateCreateOrConnectWithoutCreatedByUserInput = {
    where: StateWhereUniqueInput
    create: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput>
  }

  export type StateCreateManyCreatedByUserInputEnvelope = {
    data: StateCreateManyCreatedByUserInput | StateCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type DistrictCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    state: StateCreateNestedOneWithoutDistrictsInput
    customers?: CustomerCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierCreateNestedManyWithoutDistrictInput
  }

  export type DistrictUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    customers?: CustomerUncheckedCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutDistrictInput
  }

  export type DistrictCreateOrConnectWithoutCreatedByUserInput = {
    where: DistrictWhereUniqueInput
    create: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput>
  }

  export type DistrictCreateManyCreatedByUserInputEnvelope = {
    data: DistrictCreateManyCreatedByUserInput | DistrictCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type VegetableCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    purchases?: PurchaseCreateNestedManyWithoutVegetableInput
    quotationItems?: QuotationItemCreateNestedManyWithoutVegetableInput
  }

  export type VegetableUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    purchases?: PurchaseUncheckedCreateNestedManyWithoutVegetableInput
    quotationItems?: QuotationItemUncheckedCreateNestedManyWithoutVegetableInput
  }

  export type VegetableCreateOrConnectWithoutCreatedByUserInput = {
    where: VegetableWhereUniqueInput
    create: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput>
  }

  export type VegetableCreateManyCreatedByUserInputEnvelope = {
    data: VegetableCreateManyCreatedByUserInput | VegetableCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type CustomerCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    district: DistrictCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
  }

  export type CustomerUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutCreatedByUserInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CustomerCreateManyCreatedByUserInputEnvelope = {
    data: CustomerCreateManyCreatedByUserInput | CustomerCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type SupplierCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    district: DistrictCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
  }

  export type SupplierUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutCreatedByUserInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SupplierCreateManyCreatedByUserInputEnvelope = {
    data: SupplierCreateManyCreatedByUserInput | SupplierCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type SupplierPaymentCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier: SupplierCreateNestedOneWithoutSupplierPaymentsInput
  }

  export type SupplierPaymentUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    supplierId: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type SupplierPaymentCreateOrConnectWithoutCreatedByUserInput = {
    where: SupplierPaymentWhereUniqueInput
    create: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SupplierPaymentCreateManyCreatedByUserInputEnvelope = {
    data: SupplierPaymentCreateManyCreatedByUserInput | SupplierPaymentCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type UpiCreateWithoutCreatedByUserInput = {
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UpiUncheckedCreateWithoutCreatedByUserInput = {
    id?: number
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UpiCreateOrConnectWithoutCreatedByUserInput = {
    where: UpiWhereUniqueInput
    create: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput>
  }

  export type UpiCreateManyCreatedByUserInputEnvelope = {
    data: UpiCreateManyCreatedByUserInput | UpiCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type PurchaseCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutCreatedByUserInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput>
  }

  export type PurchaseCreateManyCreatedByUserInputEnvelope = {
    data: PurchaseCreateManyCreatedByUserInput | PurchaseCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type ShopCreateWithoutCreatedByUserInput = {
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ShopUncheckedCreateWithoutCreatedByUserInput = {
    id?: number
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ShopCreateOrConnectWithoutCreatedByUserInput = {
    where: ShopWhereUniqueInput
    create: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ShopCreateManyCreatedByUserInputEnvelope = {
    data: ShopCreateManyCreatedByUserInput | ShopCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type SaleCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    customer?: CustomerCreateNestedOneWithoutSalesInput
    items?: SaleItemCreateNestedManyWithoutSaleInput
  }

  export type SaleUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    customerId?: bigint | number | null
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    items?: SaleItemUncheckedCreateNestedManyWithoutSaleInput
  }

  export type SaleCreateOrConnectWithoutCreatedByUserInput = {
    where: SaleWhereUniqueInput
    create: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleCreateManyCreatedByUserInputEnvelope = {
    data: SaleCreateManyCreatedByUserInput | SaleCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type SaleItemCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    sale: SaleCreateNestedOneWithoutItemsInput
    purchase: PurchaseCreateNestedOneWithoutSaleItemsInput
    saleReturns?: SaleReturnCreateNestedManyWithoutSaleItemInput
  }

  export type SaleItemUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    saleId: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutSaleItemInput
  }

  export type SaleItemCreateOrConnectWithoutCreatedByUserInput = {
    where: SaleItemWhereUniqueInput
    create: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleItemCreateManyCreatedByUserInputEnvelope = {
    data: SaleItemCreateManyCreatedByUserInput | SaleItemCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type CustomerReceiptCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    customer: CustomerCreateNestedOneWithoutCustomerReceiptsInput
  }

  export type CustomerReceiptUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    customerId: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type CustomerReceiptCreateOrConnectWithoutCreatedByUserInput = {
    where: CustomerReceiptWhereUniqueInput
    create: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CustomerReceiptCreateManyCreatedByUserInputEnvelope = {
    data: CustomerReceiptCreateManyCreatedByUserInput | CustomerReceiptCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type ExpenseCreateWithoutCreatedByUserInput = {
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase?: PurchaseCreateNestedOneWithoutExpensesInput
  }

  export type ExpenseUncheckedCreateWithoutCreatedByUserInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    purchaseId?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ExpenseCreateOrConnectWithoutCreatedByUserInput = {
    where: ExpenseWhereUniqueInput
    create: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ExpenseCreateManyCreatedByUserInputEnvelope = {
    data: ExpenseCreateManyCreatedByUserInput | ExpenseCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type StockSpoilageCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutStockSpoilagesInput
  }

  export type StockSpoilageUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type StockSpoilageCreateOrConnectWithoutCreatedByUserInput = {
    where: StockSpoilageWhereUniqueInput
    create: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput>
  }

  export type StockSpoilageCreateManyCreatedByUserInputEnvelope = {
    data: StockSpoilageCreateManyCreatedByUserInput | StockSpoilageCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type SaleReturnCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    saleItem: SaleItemCreateNestedOneWithoutSaleReturnsInput
    purchase: PurchaseCreateNestedOneWithoutSaleReturnsInput
  }

  export type SaleReturnUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    saleItemId: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type SaleReturnCreateOrConnectWithoutCreatedByUserInput = {
    where: SaleReturnWhereUniqueInput
    create: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleReturnCreateManyCreatedByUserInputEnvelope = {
    data: SaleReturnCreateManyCreatedByUserInput | SaleReturnCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type QuotationCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    customer?: CustomerCreateNestedOneWithoutQuotationsInput
    items?: QuotationItemCreateNestedManyWithoutQuotationInput
  }

  export type QuotationUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    quotationNo: string
    customerId?: bigint | number | null
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    items?: QuotationItemUncheckedCreateNestedManyWithoutQuotationInput
  }

  export type QuotationCreateOrConnectWithoutCreatedByUserInput = {
    where: QuotationWhereUniqueInput
    create: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput>
  }

  export type QuotationCreateManyCreatedByUserInputEnvelope = {
    data: QuotationCreateManyCreatedByUserInput | QuotationCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type QuotationItemCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    quotation: QuotationCreateNestedOneWithoutItemsInput
    vegetable?: VegetableCreateNestedOneWithoutQuotationItemsInput
  }

  export type QuotationItemUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type QuotationItemCreateOrConnectWithoutCreatedByUserInput = {
    where: QuotationItemWhereUniqueInput
    create: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type QuotationItemCreateManyCreatedByUserInputEnvelope = {
    data: QuotationItemCreateManyCreatedByUserInput | QuotationItemCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type PurchaseReturnCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutPurchaseReturnsInput
  }

  export type PurchaseReturnUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type PurchaseReturnCreateOrConnectWithoutCreatedByUserInput = {
    where: PurchaseReturnWhereUniqueInput
    create: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type PurchaseReturnCreateManyCreatedByUserInputEnvelope = {
    data: PurchaseReturnCreateManyCreatedByUserInput | PurchaseReturnCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchase: PurchaseCreateNestedOneWithoutRetailStocksInput
    retailSaleItems?: RetailSaleItemCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    retailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockCreateOrConnectWithoutCreatedByUserInput = {
    where: RetailStockWhereUniqueInput
    create: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockCreateManyCreatedByUserInputEnvelope = {
    data: RetailStockCreateManyCreatedByUserInput | RetailStockCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type RetailSaleCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    items?: RetailSaleItemCreateNestedManyWithoutRetailSaleInput
  }

  export type RetailSaleUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    items?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailSaleInput
  }

  export type RetailSaleCreateOrConnectWithoutCreatedByUserInput = {
    where: RetailSaleWhereUniqueInput
    create: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailSaleCreateManyCreatedByUserInputEnvelope = {
    data: RetailSaleCreateManyCreatedByUserInput | RetailSaleCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type RetailSaleItemCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    retailSale: RetailSaleCreateNestedOneWithoutItemsInput
    retailStock: RetailStockCreateNestedOneWithoutRetailSaleItemsInput
  }

  export type RetailSaleItemUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailSaleItemCreateOrConnectWithoutCreatedByUserInput = {
    where: RetailSaleItemWhereUniqueInput
    create: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailSaleItemCreateManyCreatedByUserInputEnvelope = {
    data: RetailSaleItemCreateManyCreatedByUserInput | RetailSaleItemCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockSpoilageCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    retailStock: RetailStockCreateNestedOneWithoutRetailStockSpoilagesInput
  }

  export type RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    retailStockId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailStockSpoilageCreateOrConnectWithoutCreatedByUserInput = {
    where: RetailStockSpoilageWhereUniqueInput
    create: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockSpoilageCreateManyCreatedByUserInputEnvelope = {
    data: RetailStockSpoilageCreateManyCreatedByUserInput | RetailStockSpoilageCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockReturnCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    retailStock: RetailStockCreateNestedOneWithoutRetailStockReturnsInput
  }

  export type RetailStockReturnUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    retailStockId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailStockReturnCreateOrConnectWithoutCreatedByUserInput = {
    where: RetailStockReturnWhereUniqueInput
    create: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockReturnCreateManyCreatedByUserInputEnvelope = {
    data: RetailStockReturnCreateManyCreatedByUserInput | RetailStockReturnCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type BoxReturnCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    supplier: SupplierCreateNestedOneWithoutBoxReturnsInput
  }

  export type BoxReturnUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    supplierId: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type BoxReturnCreateOrConnectWithoutCreatedByUserInput = {
    where: BoxReturnWhereUniqueInput
    create: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type BoxReturnCreateManyCreatedByUserInputEnvelope = {
    data: BoxReturnCreateManyCreatedByUserInput | BoxReturnCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type EmployeeCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    attendances?: AttendanceCreateNestedManyWithoutEmployeeInput
  }

  export type EmployeeUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    attendances?: AttendanceUncheckedCreateNestedManyWithoutEmployeeInput
  }

  export type EmployeeCreateOrConnectWithoutCreatedByUserInput = {
    where: EmployeeWhereUniqueInput
    create: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput>
  }

  export type EmployeeCreateManyCreatedByUserInputEnvelope = {
    data: EmployeeCreateManyCreatedByUserInput | EmployeeCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type AttendanceCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    employee: EmployeeCreateNestedOneWithoutAttendancesInput
  }

  export type AttendanceUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    employeeId: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type AttendanceCreateOrConnectWithoutCreatedByUserInput = {
    where: AttendanceWhereUniqueInput
    create: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput>
  }

  export type AttendanceCreateManyCreatedByUserInputEnvelope = {
    data: AttendanceCreateManyCreatedByUserInput | AttendanceCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type ArrivalSettlementCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutArrivalSettlementInput
  }

  export type ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ArrivalSettlementCreateOrConnectWithoutCreatedByUserInput = {
    where: ArrivalSettlementWhereUniqueInput
    create: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ArrivalSettlementCreateManyCreatedByUserInputEnvelope = {
    data: ArrivalSettlementCreateManyCreatedByUserInput | ArrivalSettlementCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type ArrivalCustomPattiCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutArrivalCustomPattiInput
  }

  export type ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ArrivalCustomPattiCreateOrConnectWithoutCreatedByUserInput = {
    where: ArrivalCustomPattiWhereUniqueInput
    create: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ArrivalCustomPattiCreateManyCreatedByUserInputEnvelope = {
    data: ArrivalCustomPattiCreateManyCreatedByUserInput | ArrivalCustomPattiCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type FastBillingCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    items?: FastBillingItemCreateNestedManyWithoutFastBillingInput
  }

  export type FastBillingUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    items?: FastBillingItemUncheckedCreateNestedManyWithoutFastBillingInput
  }

  export type FastBillingCreateOrConnectWithoutCreatedByUserInput = {
    where: FastBillingWhereUniqueInput
    create: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput>
  }

  export type FastBillingCreateManyCreatedByUserInputEnvelope = {
    data: FastBillingCreateManyCreatedByUserInput | FastBillingCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type FastBillingItemCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    fastBilling: FastBillingCreateNestedOneWithoutItemsInput
  }

  export type FastBillingItemUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    fastBillingId: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FastBillingItemCreateOrConnectWithoutCreatedByUserInput = {
    where: FastBillingItemWhereUniqueInput
    create: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type FastBillingItemCreateManyCreatedByUserInputEnvelope = {
    data: FastBillingItemCreateManyCreatedByUserInput | FastBillingItemCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type CashBankTransferCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedByUser?: UserCreateNestedOneWithoutDeletedCashBankTransfersInput
  }

  export type CashBankTransferUncheckedCreateWithoutCreatedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    deletedBy?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankTransferCreateOrConnectWithoutCreatedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    create: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CashBankTransferCreateManyCreatedByUserInputEnvelope = {
    data: CashBankTransferCreateManyCreatedByUserInput | CashBankTransferCreateManyCreatedByUserInput[]
    skipDuplicates?: boolean
  }

  export type CashBankTransferCreateWithoutDeletedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedCashBankTransfersInput
  }

  export type CashBankTransferUncheckedCreateWithoutDeletedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type CashBankTransferCreateOrConnectWithoutDeletedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    create: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput>
  }

  export type CashBankTransferCreateManyDeletedByUserInputEnvelope = {
    data: CashBankTransferCreateManyDeletedByUserInput | CashBankTransferCreateManyDeletedByUserInput[]
    skipDuplicates?: boolean
  }

  export type AuditLogCreateWithoutUserInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type AuditLogUncheckedCreateWithoutUserInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type AuditLogCreateOrConnectWithoutUserInput = {
    where: AuditLogWhereUniqueInput
    create: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput>
  }

  export type AuditLogCreateManyUserInputEnvelope = {
    data: AuditLogCreateManyUserInput | AuditLogCreateManyUserInput[]
    skipDuplicates?: boolean
  }

  export type RoleUpsertWithoutUsersInput = {
    update: XOR<RoleUpdateWithoutUsersInput, RoleUncheckedUpdateWithoutUsersInput>
    create: XOR<RoleCreateWithoutUsersInput, RoleUncheckedCreateWithoutUsersInput>
    where?: RoleWhereInput
  }

  export type RoleUpdateToOneWithWhereWithoutUsersInput = {
    where?: RoleWhereInput
    data: XOR<RoleUpdateWithoutUsersInput, RoleUncheckedUpdateWithoutUsersInput>
  }

  export type RoleUpdateWithoutUsersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RoleUncheckedUpdateWithoutUsersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ForgotPasswordUpsertWithoutUserInput = {
    update: XOR<ForgotPasswordUpdateWithoutUserInput, ForgotPasswordUncheckedUpdateWithoutUserInput>
    create: XOR<ForgotPasswordCreateWithoutUserInput, ForgotPasswordUncheckedCreateWithoutUserInput>
    where?: ForgotPasswordWhereInput
  }

  export type ForgotPasswordUpdateToOneWithWhereWithoutUserInput = {
    where?: ForgotPasswordWhereInput
    data: XOR<ForgotPasswordUpdateWithoutUserInput, ForgotPasswordUncheckedUpdateWithoutUserInput>
  }

  export type ForgotPasswordUpdateWithoutUserInput = {
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ForgotPasswordUncheckedUpdateWithoutUserInput = {
    otp?: StringFieldUpdateOperationsInput | string
    expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
    attempts?: IntFieldUpdateOperationsInput | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StateUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: StateWhereUniqueInput
    update: XOR<StateUpdateWithoutCreatedByUserInput, StateUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<StateCreateWithoutCreatedByUserInput, StateUncheckedCreateWithoutCreatedByUserInput>
  }

  export type StateUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: StateWhereUniqueInput
    data: XOR<StateUpdateWithoutCreatedByUserInput, StateUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type StateUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: StateScalarWhereInput
    data: XOR<StateUpdateManyMutationInput, StateUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type StateScalarWhereInput = {
    AND?: StateScalarWhereInput | StateScalarWhereInput[]
    OR?: StateScalarWhereInput[]
    NOT?: StateScalarWhereInput | StateScalarWhereInput[]
    id?: BigIntFilter<"State"> | bigint | number
    name?: StringFilter<"State"> | string
    tamilName?: StringNullableFilter<"State"> | string | null
    status?: BoolFilter<"State"> | boolean
    createdAt?: DateTimeFilter<"State"> | Date | string
    updatedAt?: DateTimeFilter<"State"> | Date | string
    createdBy?: BigIntNullableFilter<"State"> | bigint | number | null
  }

  export type DistrictUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: DistrictWhereUniqueInput
    update: XOR<DistrictUpdateWithoutCreatedByUserInput, DistrictUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<DistrictCreateWithoutCreatedByUserInput, DistrictUncheckedCreateWithoutCreatedByUserInput>
  }

  export type DistrictUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: DistrictWhereUniqueInput
    data: XOR<DistrictUpdateWithoutCreatedByUserInput, DistrictUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type DistrictUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: DistrictScalarWhereInput
    data: XOR<DistrictUpdateManyMutationInput, DistrictUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type DistrictScalarWhereInput = {
    AND?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
    OR?: DistrictScalarWhereInput[]
    NOT?: DistrictScalarWhereInput | DistrictScalarWhereInput[]
    id?: BigIntFilter<"District"> | bigint | number
    stateId?: BigIntFilter<"District"> | bigint | number
    name?: StringFilter<"District"> | string
    tamilName?: StringNullableFilter<"District"> | string | null
    status?: BoolFilter<"District"> | boolean
    createdAt?: DateTimeFilter<"District"> | Date | string
    updatedAt?: DateTimeFilter<"District"> | Date | string
    createdBy?: BigIntNullableFilter<"District"> | bigint | number | null
  }

  export type VegetableUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: VegetableWhereUniqueInput
    update: XOR<VegetableUpdateWithoutCreatedByUserInput, VegetableUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<VegetableCreateWithoutCreatedByUserInput, VegetableUncheckedCreateWithoutCreatedByUserInput>
  }

  export type VegetableUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: VegetableWhereUniqueInput
    data: XOR<VegetableUpdateWithoutCreatedByUserInput, VegetableUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type VegetableUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: VegetableScalarWhereInput
    data: XOR<VegetableUpdateManyMutationInput, VegetableUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type VegetableScalarWhereInput = {
    AND?: VegetableScalarWhereInput | VegetableScalarWhereInput[]
    OR?: VegetableScalarWhereInput[]
    NOT?: VegetableScalarWhereInput | VegetableScalarWhereInput[]
    id?: BigIntFilter<"Vegetable"> | bigint | number
    name?: StringFilter<"Vegetable"> | string
    tamilName?: StringNullableFilter<"Vegetable"> | string | null
    hindiName?: StringNullableFilter<"Vegetable"> | string | null
    kannadaName?: StringNullableFilter<"Vegetable"> | string | null
    malayalamName?: StringNullableFilter<"Vegetable"> | string | null
    teluguName?: StringNullableFilter<"Vegetable"> | string | null
    status?: BoolFilter<"Vegetable"> | boolean
    createdAt?: DateTimeFilter<"Vegetable"> | Date | string
    updatedAt?: DateTimeFilter<"Vegetable"> | Date | string
    hsnCode?: StringNullableFilter<"Vegetable"> | string | null
    isFlexible?: BoolFilter<"Vegetable"> | boolean
    createdBy?: BigIntNullableFilter<"Vegetable"> | bigint | number | null
  }

  export type CustomerUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: CustomerWhereUniqueInput
    update: XOR<CustomerUpdateWithoutCreatedByUserInput, CustomerUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<CustomerCreateWithoutCreatedByUserInput, CustomerUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CustomerUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: CustomerWhereUniqueInput
    data: XOR<CustomerUpdateWithoutCreatedByUserInput, CustomerUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type CustomerUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: CustomerScalarWhereInput
    data: XOR<CustomerUpdateManyMutationInput, CustomerUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type CustomerScalarWhereInput = {
    AND?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
    OR?: CustomerScalarWhereInput[]
    NOT?: CustomerScalarWhereInput | CustomerScalarWhereInput[]
    id?: BigIntFilter<"Customer"> | bigint | number
    name?: StringFilter<"Customer"> | string
    tamilName?: StringNullableFilter<"Customer"> | string | null
    mobileNo?: StringFilter<"Customer"> | string
    address?: StringNullableFilter<"Customer"> | string | null
    stateId?: BigIntFilter<"Customer"> | bigint | number
    districtId?: BigIntFilter<"Customer"> | bigint | number
    openingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Customer"> | boolean
    createdAt?: DateTimeFilter<"Customer"> | Date | string
    updatedAt?: DateTimeFilter<"Customer"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Customer"> | bigint | number | null
  }

  export type SupplierUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: SupplierWhereUniqueInput
    update: XOR<SupplierUpdateWithoutCreatedByUserInput, SupplierUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<SupplierCreateWithoutCreatedByUserInput, SupplierUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SupplierUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: SupplierWhereUniqueInput
    data: XOR<SupplierUpdateWithoutCreatedByUserInput, SupplierUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type SupplierUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: SupplierScalarWhereInput
    data: XOR<SupplierUpdateManyMutationInput, SupplierUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type SupplierScalarWhereInput = {
    AND?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
    OR?: SupplierScalarWhereInput[]
    NOT?: SupplierScalarWhereInput | SupplierScalarWhereInput[]
    id?: BigIntFilter<"Supplier"> | bigint | number
    name?: StringFilter<"Supplier"> | string
    tamilName?: StringNullableFilter<"Supplier"> | string | null
    mobileNo?: StringFilter<"Supplier"> | string
    address?: StringNullableFilter<"Supplier"> | string | null
    stateId?: BigIntFilter<"Supplier"> | bigint | number
    districtId?: BigIntFilter<"Supplier"> | bigint | number
    openingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFilter<"Supplier"> | Decimal | DecimalJsLike | number | string
    status?: BoolFilter<"Supplier"> | boolean
    createdAt?: DateTimeFilter<"Supplier"> | Date | string
    updatedAt?: DateTimeFilter<"Supplier"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Supplier"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Supplier"> | bigint | number | null
  }

  export type SupplierPaymentUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: SupplierPaymentWhereUniqueInput
    update: XOR<SupplierPaymentUpdateWithoutCreatedByUserInput, SupplierPaymentUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<SupplierPaymentCreateWithoutCreatedByUserInput, SupplierPaymentUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SupplierPaymentUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: SupplierPaymentWhereUniqueInput
    data: XOR<SupplierPaymentUpdateWithoutCreatedByUserInput, SupplierPaymentUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type SupplierPaymentUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: SupplierPaymentScalarWhereInput
    data: XOR<SupplierPaymentUpdateManyMutationInput, SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type SupplierPaymentScalarWhereInput = {
    AND?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
    OR?: SupplierPaymentScalarWhereInput[]
    NOT?: SupplierPaymentScalarWhereInput | SupplierPaymentScalarWhereInput[]
    id?: BigIntFilter<"SupplierPayment"> | bigint | number
    supplierId?: BigIntFilter<"SupplierPayment"> | bigint | number
    paymentDate?: DateTimeFilter<"SupplierPayment"> | Date | string
    amount?: DecimalFilter<"SupplierPayment"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"SupplierPayment"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"SupplierPayment"> | string | null
    remarks?: StringNullableFilter<"SupplierPayment"> | string | null
    type?: EnumSupplierPaymentTypeFilter<"SupplierPayment"> | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFilter<"SupplierPayment"> | boolean
    createdAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    updatedAt?: DateTimeFilter<"SupplierPayment"> | Date | string
    deletedAt?: DateTimeNullableFilter<"SupplierPayment"> | Date | string | null
    createdBy?: BigIntNullableFilter<"SupplierPayment"> | bigint | number | null
  }

  export type UpiUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: UpiWhereUniqueInput
    update: XOR<UpiUpdateWithoutCreatedByUserInput, UpiUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<UpiCreateWithoutCreatedByUserInput, UpiUncheckedCreateWithoutCreatedByUserInput>
  }

  export type UpiUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: UpiWhereUniqueInput
    data: XOR<UpiUpdateWithoutCreatedByUserInput, UpiUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type UpiUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: UpiScalarWhereInput
    data: XOR<UpiUpdateManyMutationInput, UpiUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type UpiScalarWhereInput = {
    AND?: UpiScalarWhereInput | UpiScalarWhereInput[]
    OR?: UpiScalarWhereInput[]
    NOT?: UpiScalarWhereInput | UpiScalarWhereInput[]
    id?: IntFilter<"Upi"> | number
    upiId?: StringFilter<"Upi"> | string
    createdAt?: DateTimeFilter<"Upi"> | Date | string
    updatedAt?: DateTimeFilter<"Upi"> | Date | string
    createdBy?: BigIntNullableFilter<"Upi"> | bigint | number | null
  }

  export type PurchaseUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: PurchaseWhereUniqueInput
    update: XOR<PurchaseUpdateWithoutCreatedByUserInput, PurchaseUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<PurchaseCreateWithoutCreatedByUserInput, PurchaseUncheckedCreateWithoutCreatedByUserInput>
  }

  export type PurchaseUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: PurchaseWhereUniqueInput
    data: XOR<PurchaseUpdateWithoutCreatedByUserInput, PurchaseUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type PurchaseUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: PurchaseScalarWhereInput
    data: XOR<PurchaseUpdateManyMutationInput, PurchaseUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type PurchaseScalarWhereInput = {
    AND?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
    OR?: PurchaseScalarWhereInput[]
    NOT?: PurchaseScalarWhereInput | PurchaseScalarWhereInput[]
    id?: BigIntFilter<"Purchase"> | bigint | number
    purchaseDate?: DateTimeFilter<"Purchase"> | Date | string
    billNo?: StringNullableFilter<"Purchase"> | string | null
    supplierId?: BigIntNullableFilter<"Purchase"> | bigint | number | null
    cashSupplierName?: StringNullableFilter<"Purchase"> | string | null
    vegetableId?: BigIntFilter<"Purchase"> | bigint | number
    lotNo?: StringFilter<"Purchase"> | string
    purchaseType?: EnumPurchaseTypeFilter<"Purchase"> | $Enums.PurchaseType
    status?: EnumPurchaseStatusFilter<"Purchase"> | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFilter<"Purchase"> | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFilter<"Purchase"> | $Enums.RateType
    bags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    weightPerBag?: DecimalNullableFilter<"Purchase"> | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    freight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    arrivalDate?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    placeOfDespatch?: StringNullableFilter<"Purchase"> | string | null
    placeOfArrival?: StringNullableFilter<"Purchase"> | string | null
    truckNo?: StringNullableFilter<"Purchase"> | string | null
    agentName?: StringNullableFilter<"Purchase"> | string | null
    advanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFilter<"Purchase"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"Purchase"> | string | null
    closedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdAt?: DateTimeFilter<"Purchase"> | Date | string
    updatedAt?: DateTimeFilter<"Purchase"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Purchase"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Purchase"> | bigint | number | null
  }

  export type ShopUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: ShopWhereUniqueInput
    update: XOR<ShopUpdateWithoutCreatedByUserInput, ShopUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<ShopCreateWithoutCreatedByUserInput, ShopUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ShopUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: ShopWhereUniqueInput
    data: XOR<ShopUpdateWithoutCreatedByUserInput, ShopUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type ShopUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: ShopScalarWhereInput
    data: XOR<ShopUpdateManyMutationInput, ShopUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type ShopScalarWhereInput = {
    AND?: ShopScalarWhereInput | ShopScalarWhereInput[]
    OR?: ShopScalarWhereInput[]
    NOT?: ShopScalarWhereInput | ShopScalarWhereInput[]
    id?: IntFilter<"Shop"> | number
    shopName?: StringFilter<"Shop"> | string
    shortName?: StringNullableFilter<"Shop"> | string | null
    address?: StringFilter<"Shop"> | string
    mobile?: StringFilter<"Shop"> | string
    mobile2?: StringNullableFilter<"Shop"> | string | null
    mapUrl?: StringNullableFilter<"Shop"> | string | null
    godName1?: StringNullableFilter<"Shop"> | string | null
    godName2?: StringNullableFilter<"Shop"> | string | null
    godName3?: StringNullableFilter<"Shop"> | string | null
    logo?: StringNullableFilter<"Shop"> | string | null
    godImage1?: StringNullableFilter<"Shop"> | string | null
    godImage2?: StringNullableFilter<"Shop"> | string | null
    authorizedSign?: StringNullableFilter<"Shop"> | string | null
    createdAt?: DateTimeFilter<"Shop"> | Date | string
    updatedAt?: DateTimeFilter<"Shop"> | Date | string
    createdBy?: BigIntNullableFilter<"Shop"> | bigint | number | null
  }

  export type SaleUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleWhereUniqueInput
    update: XOR<SaleUpdateWithoutCreatedByUserInput, SaleUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<SaleCreateWithoutCreatedByUserInput, SaleUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleWhereUniqueInput
    data: XOR<SaleUpdateWithoutCreatedByUserInput, SaleUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type SaleUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: SaleScalarWhereInput
    data: XOR<SaleUpdateManyMutationInput, SaleUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type SaleScalarWhereInput = {
    AND?: SaleScalarWhereInput | SaleScalarWhereInput[]
    OR?: SaleScalarWhereInput[]
    NOT?: SaleScalarWhereInput | SaleScalarWhereInput[]
    id?: BigIntFilter<"Sale"> | bigint | number
    invoiceNo?: StringFilter<"Sale"> | string
    customerId?: BigIntNullableFilter<"Sale"> | bigint | number | null
    walkInName?: StringNullableFilter<"Sale"> | string | null
    walkInMobile?: StringNullableFilter<"Sale"> | string | null
    invoiceDate?: DateTimeFilter<"Sale"> | Date | string
    subTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"Sale"> | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFilter<"Sale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"Sale"> | string | null
    images?: JsonNullableFilter<"Sale">
    invoiceDownloadToken?: StringFilter<"Sale"> | string
    isWhatsappMessageSent?: BoolFilter<"Sale"> | boolean
    createdAt?: DateTimeFilter<"Sale"> | Date | string
    updatedAt?: DateTimeFilter<"Sale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Sale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Sale"> | bigint | number | null
  }

  export type SaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleItemWhereUniqueInput
    update: XOR<SaleItemUpdateWithoutCreatedByUserInput, SaleItemUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<SaleItemCreateWithoutCreatedByUserInput, SaleItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleItemWhereUniqueInput
    data: XOR<SaleItemUpdateWithoutCreatedByUserInput, SaleItemUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type SaleItemUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: SaleItemScalarWhereInput
    data: XOR<SaleItemUpdateManyMutationInput, SaleItemUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type SaleItemScalarWhereInput = {
    AND?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
    OR?: SaleItemScalarWhereInput[]
    NOT?: SaleItemScalarWhereInput | SaleItemScalarWhereInput[]
    id?: BigIntFilter<"SaleItem"> | bigint | number
    saleId?: BigIntFilter<"SaleItem"> | bigint | number
    purchaseId?: BigIntFilter<"SaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"SaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"SaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"SaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"SaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleItem"> | bigint | number | null
  }

  export type CustomerReceiptUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: CustomerReceiptWhereUniqueInput
    update: XOR<CustomerReceiptUpdateWithoutCreatedByUserInput, CustomerReceiptUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<CustomerReceiptCreateWithoutCreatedByUserInput, CustomerReceiptUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CustomerReceiptUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: CustomerReceiptWhereUniqueInput
    data: XOR<CustomerReceiptUpdateWithoutCreatedByUserInput, CustomerReceiptUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type CustomerReceiptUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: CustomerReceiptScalarWhereInput
    data: XOR<CustomerReceiptUpdateManyMutationInput, CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type CustomerReceiptScalarWhereInput = {
    AND?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
    OR?: CustomerReceiptScalarWhereInput[]
    NOT?: CustomerReceiptScalarWhereInput | CustomerReceiptScalarWhereInput[]
    id?: BigIntFilter<"CustomerReceipt"> | bigint | number
    customerId?: BigIntFilter<"CustomerReceipt"> | bigint | number
    receiptDate?: DateTimeFilter<"CustomerReceipt"> | Date | string
    amount?: DecimalFilter<"CustomerReceipt"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"CustomerReceipt"> | $Enums.PaymentMode
    referenceNo?: StringNullableFilter<"CustomerReceipt"> | string | null
    remarks?: StringNullableFilter<"CustomerReceipt"> | string | null
    isWhatsappMessageSent?: BoolFilter<"CustomerReceipt"> | boolean
    createdAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    updatedAt?: DateTimeFilter<"CustomerReceipt"> | Date | string
    deletedAt?: DateTimeNullableFilter<"CustomerReceipt"> | Date | string | null
    createdBy?: BigIntNullableFilter<"CustomerReceipt"> | bigint | number | null
  }

  export type ExpenseUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: ExpenseWhereUniqueInput
    update: XOR<ExpenseUpdateWithoutCreatedByUserInput, ExpenseUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<ExpenseCreateWithoutCreatedByUserInput, ExpenseUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ExpenseUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: ExpenseWhereUniqueInput
    data: XOR<ExpenseUpdateWithoutCreatedByUserInput, ExpenseUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type ExpenseUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: ExpenseScalarWhereInput
    data: XOR<ExpenseUpdateManyMutationInput, ExpenseUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type ExpenseScalarWhereInput = {
    AND?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
    OR?: ExpenseScalarWhereInput[]
    NOT?: ExpenseScalarWhereInput | ExpenseScalarWhereInput[]
    id?: IntFilter<"Expense"> | number
    expenseDate?: DateTimeFilter<"Expense"> | Date | string
    category?: StringFilter<"Expense"> | string
    amount?: DecimalFilter<"Expense"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFilter<"Expense"> | $Enums.PaymentMode
    remarks?: StringNullableFilter<"Expense"> | string | null
    purchaseId?: BigIntNullableFilter<"Expense"> | bigint | number | null
    createdAt?: DateTimeFilter<"Expense"> | Date | string
    updatedAt?: DateTimeFilter<"Expense"> | Date | string
    createdBy?: BigIntNullableFilter<"Expense"> | bigint | number | null
  }

  export type StockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: StockSpoilageWhereUniqueInput
    update: XOR<StockSpoilageUpdateWithoutCreatedByUserInput, StockSpoilageUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<StockSpoilageCreateWithoutCreatedByUserInput, StockSpoilageUncheckedCreateWithoutCreatedByUserInput>
  }

  export type StockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: StockSpoilageWhereUniqueInput
    data: XOR<StockSpoilageUpdateWithoutCreatedByUserInput, StockSpoilageUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type StockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: StockSpoilageScalarWhereInput
    data: XOR<StockSpoilageUpdateManyMutationInput, StockSpoilageUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type StockSpoilageScalarWhereInput = {
    AND?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
    OR?: StockSpoilageScalarWhereInput[]
    NOT?: StockSpoilageScalarWhereInput | StockSpoilageScalarWhereInput[]
    id?: BigIntFilter<"StockSpoilage"> | bigint | number
    purchaseId?: BigIntFilter<"StockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"StockSpoilage"> | Date | string
    quantity?: DecimalFilter<"StockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"StockSpoilage"> | string | null
    remarks?: StringNullableFilter<"StockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"StockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"StockSpoilage"> | bigint | number | null
  }

  export type SaleReturnUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleReturnWhereUniqueInput
    update: XOR<SaleReturnUpdateWithoutCreatedByUserInput, SaleReturnUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<SaleReturnCreateWithoutCreatedByUserInput, SaleReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type SaleReturnUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: SaleReturnWhereUniqueInput
    data: XOR<SaleReturnUpdateWithoutCreatedByUserInput, SaleReturnUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type SaleReturnUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: SaleReturnScalarWhereInput
    data: XOR<SaleReturnUpdateManyMutationInput, SaleReturnUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type SaleReturnScalarWhereInput = {
    AND?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
    OR?: SaleReturnScalarWhereInput[]
    NOT?: SaleReturnScalarWhereInput | SaleReturnScalarWhereInput[]
    id?: BigIntFilter<"SaleReturn"> | bigint | number
    saleItemId?: BigIntFilter<"SaleReturn"> | bigint | number
    purchaseId?: BigIntFilter<"SaleReturn"> | bigint | number
    returnDate?: DateTimeFilter<"SaleReturn"> | Date | string
    quantity?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFilter<"SaleReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"SaleReturn"> | string | null
    remarks?: StringNullableFilter<"SaleReturn"> | string | null
    createdAt?: DateTimeFilter<"SaleReturn"> | Date | string
    updatedAt?: DateTimeFilter<"SaleReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"SaleReturn"> | bigint | number | null
  }

  export type QuotationUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: QuotationWhereUniqueInput
    update: XOR<QuotationUpdateWithoutCreatedByUserInput, QuotationUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<QuotationCreateWithoutCreatedByUserInput, QuotationUncheckedCreateWithoutCreatedByUserInput>
  }

  export type QuotationUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: QuotationWhereUniqueInput
    data: XOR<QuotationUpdateWithoutCreatedByUserInput, QuotationUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type QuotationUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: QuotationScalarWhereInput
    data: XOR<QuotationUpdateManyMutationInput, QuotationUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type QuotationScalarWhereInput = {
    AND?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
    OR?: QuotationScalarWhereInput[]
    NOT?: QuotationScalarWhereInput | QuotationScalarWhereInput[]
    id?: BigIntFilter<"Quotation"> | bigint | number
    quotationNo?: StringFilter<"Quotation"> | string
    customerId?: BigIntNullableFilter<"Quotation"> | bigint | number | null
    customerName?: StringFilter<"Quotation"> | string
    quotationDate?: DateTimeFilter<"Quotation"> | Date | string
    amount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFilter<"Quotation"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"Quotation"> | Date | string
    updatedAt?: DateTimeFilter<"Quotation"> | Date | string
    createdBy?: BigIntNullableFilter<"Quotation"> | bigint | number | null
  }

  export type QuotationItemUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: QuotationItemWhereUniqueInput
    update: XOR<QuotationItemUpdateWithoutCreatedByUserInput, QuotationItemUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<QuotationItemCreateWithoutCreatedByUserInput, QuotationItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type QuotationItemUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: QuotationItemWhereUniqueInput
    data: XOR<QuotationItemUpdateWithoutCreatedByUserInput, QuotationItemUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type QuotationItemUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: QuotationItemScalarWhereInput
    data: XOR<QuotationItemUpdateManyMutationInput, QuotationItemUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type QuotationItemScalarWhereInput = {
    AND?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
    OR?: QuotationItemScalarWhereInput[]
    NOT?: QuotationItemScalarWhereInput | QuotationItemScalarWhereInput[]
    id?: BigIntFilter<"QuotationItem"> | bigint | number
    quotationId?: BigIntFilter<"QuotationItem"> | bigint | number
    vegetableId?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
    vegName?: StringFilter<"QuotationItem"> | string
    hsnCode?: StringNullableFilter<"QuotationItem"> | string | null
    quantity?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    unit?: StringFilter<"QuotationItem"> | string
    price?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    amount?: DecimalFilter<"QuotationItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"QuotationItem"> | Date | string
    updatedAt?: DateTimeFilter<"QuotationItem"> | Date | string
    createdBy?: BigIntNullableFilter<"QuotationItem"> | bigint | number | null
  }

  export type PurchaseReturnUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: PurchaseReturnWhereUniqueInput
    update: XOR<PurchaseReturnUpdateWithoutCreatedByUserInput, PurchaseReturnUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<PurchaseReturnCreateWithoutCreatedByUserInput, PurchaseReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type PurchaseReturnUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: PurchaseReturnWhereUniqueInput
    data: XOR<PurchaseReturnUpdateWithoutCreatedByUserInput, PurchaseReturnUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type PurchaseReturnUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: PurchaseReturnScalarWhereInput
    data: XOR<PurchaseReturnUpdateManyMutationInput, PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type PurchaseReturnScalarWhereInput = {
    AND?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
    OR?: PurchaseReturnScalarWhereInput[]
    NOT?: PurchaseReturnScalarWhereInput | PurchaseReturnScalarWhereInput[]
    id?: BigIntFilter<"PurchaseReturn"> | bigint | number
    purchaseId?: BigIntFilter<"PurchaseReturn"> | bigint | number
    returnDate?: DateTimeFilter<"PurchaseReturn"> | Date | string
    quantity?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFilter<"PurchaseReturn"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"PurchaseReturn"> | string | null
    remarks?: StringNullableFilter<"PurchaseReturn"> | string | null
    createdAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    updatedAt?: DateTimeFilter<"PurchaseReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"PurchaseReturn"> | bigint | number | null
  }

  export type RetailStockUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockWhereUniqueInput
    update: XOR<RetailStockUpdateWithoutCreatedByUserInput, RetailStockUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<RetailStockCreateWithoutCreatedByUserInput, RetailStockUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockWhereUniqueInput
    data: XOR<RetailStockUpdateWithoutCreatedByUserInput, RetailStockUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type RetailStockUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: RetailStockScalarWhereInput
    data: XOR<RetailStockUpdateManyMutationInput, RetailStockUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type RetailStockScalarWhereInput = {
    AND?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
    OR?: RetailStockScalarWhereInput[]
    NOT?: RetailStockScalarWhereInput | RetailStockScalarWhereInput[]
    id?: BigIntFilter<"RetailStock"> | bigint | number
    purchaseId?: BigIntFilter<"RetailStock"> | bigint | number
    lotNo?: StringFilter<"RetailStock"> | string
    allocatedUnit?: EnumPurchaseUnitFilter<"RetailStock"> | $Enums.PurchaseUnit
    allocatedQty?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalNullableFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailStock"> | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFilter<"RetailStock"> | Date | string
    remarks?: StringNullableFilter<"RetailStock"> | string | null
    createdAt?: DateTimeFilter<"RetailStock"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStock"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailStock"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailStock"> | bigint | number | null
  }

  export type RetailSaleUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailSaleWhereUniqueInput
    update: XOR<RetailSaleUpdateWithoutCreatedByUserInput, RetailSaleUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<RetailSaleCreateWithoutCreatedByUserInput, RetailSaleUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailSaleUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailSaleWhereUniqueInput
    data: XOR<RetailSaleUpdateWithoutCreatedByUserInput, RetailSaleUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type RetailSaleUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: RetailSaleScalarWhereInput
    data: XOR<RetailSaleUpdateManyMutationInput, RetailSaleUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type RetailSaleScalarWhereInput = {
    AND?: RetailSaleScalarWhereInput | RetailSaleScalarWhereInput[]
    OR?: RetailSaleScalarWhereInput[]
    NOT?: RetailSaleScalarWhereInput | RetailSaleScalarWhereInput[]
    id?: BigIntFilter<"RetailSale"> | bigint | number
    invoiceNo?: StringFilter<"RetailSale"> | string
    walkInName?: StringNullableFilter<"RetailSale"> | string | null
    walkInMobile?: StringNullableFilter<"RetailSale"> | string | null
    invoiceDate?: DateTimeFilter<"RetailSale"> | Date | string
    subTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    discount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"RetailSale"> | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeNullableFilter<"RetailSale"> | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFilter<"RetailSale"> | $Enums.SalePaymentStatus
    remarks?: StringNullableFilter<"RetailSale"> | string | null
    movedToWholesale?: BoolFilter<"RetailSale"> | boolean
    createdAt?: DateTimeFilter<"RetailSale"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSale"> | Date | string
    deletedAt?: DateTimeNullableFilter<"RetailSale"> | Date | string | null
    createdBy?: BigIntNullableFilter<"RetailSale"> | bigint | number | null
  }

  export type RetailSaleItemUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailSaleItemWhereUniqueInput
    update: XOR<RetailSaleItemUpdateWithoutCreatedByUserInput, RetailSaleItemUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<RetailSaleItemCreateWithoutCreatedByUserInput, RetailSaleItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailSaleItemUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailSaleItemWhereUniqueInput
    data: XOR<RetailSaleItemUpdateWithoutCreatedByUserInput, RetailSaleItemUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type RetailSaleItemUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: RetailSaleItemScalarWhereInput
    data: XOR<RetailSaleItemUpdateManyMutationInput, RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type RetailSaleItemScalarWhereInput = {
    AND?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
    OR?: RetailSaleItemScalarWhereInput[]
    NOT?: RetailSaleItemScalarWhereInput | RetailSaleItemScalarWhereInput[]
    id?: BigIntFilter<"RetailSaleItem"> | bigint | number
    retailSaleId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    retailStockId?: BigIntFilter<"RetailSaleItem"> | bigint | number
    saleUnit?: EnumPurchaseUnitFilter<"RetailSaleItem"> | $Enums.PurchaseUnit
    quantity?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    total?: DecimalFilter<"RetailSaleItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    updatedAt?: DateTimeFilter<"RetailSaleItem"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailSaleItem"> | bigint | number | null
  }

  export type RetailStockSpoilageUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockSpoilageWhereUniqueInput
    update: XOR<RetailStockSpoilageUpdateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<RetailStockSpoilageCreateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockSpoilageUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockSpoilageWhereUniqueInput
    data: XOR<RetailStockSpoilageUpdateWithoutCreatedByUserInput, RetailStockSpoilageUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type RetailStockSpoilageUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: RetailStockSpoilageScalarWhereInput
    data: XOR<RetailStockSpoilageUpdateManyMutationInput, RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type RetailStockSpoilageScalarWhereInput = {
    AND?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
    OR?: RetailStockSpoilageScalarWhereInput[]
    NOT?: RetailStockSpoilageScalarWhereInput | RetailStockSpoilageScalarWhereInput[]
    id?: BigIntFilter<"RetailStockSpoilage"> | bigint | number
    retailStockId?: BigIntFilter<"RetailStockSpoilage"> | bigint | number
    spoilageDate?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    quantity?: DecimalFilter<"RetailStockSpoilage"> | Decimal | DecimalJsLike | number | string
    reason?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    remarks?: StringNullableFilter<"RetailStockSpoilage"> | string | null
    createdAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockSpoilage"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockSpoilage"> | bigint | number | null
  }

  export type RetailStockReturnUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockReturnWhereUniqueInput
    update: XOR<RetailStockReturnUpdateWithoutCreatedByUserInput, RetailStockReturnUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<RetailStockReturnCreateWithoutCreatedByUserInput, RetailStockReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type RetailStockReturnUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: RetailStockReturnWhereUniqueInput
    data: XOR<RetailStockReturnUpdateWithoutCreatedByUserInput, RetailStockReturnUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type RetailStockReturnUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: RetailStockReturnScalarWhereInput
    data: XOR<RetailStockReturnUpdateManyMutationInput, RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type RetailStockReturnScalarWhereInput = {
    AND?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
    OR?: RetailStockReturnScalarWhereInput[]
    NOT?: RetailStockReturnScalarWhereInput | RetailStockReturnScalarWhereInput[]
    id?: BigIntFilter<"RetailStockReturn"> | bigint | number
    retailStockId?: BigIntFilter<"RetailStockReturn"> | bigint | number
    returnDate?: DateTimeFilter<"RetailStockReturn"> | Date | string
    quantity?: DecimalFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string
    bags?: DecimalNullableFilter<"RetailStockReturn"> | Decimal | DecimalJsLike | number | string | null
    reason?: StringNullableFilter<"RetailStockReturn"> | string | null
    remarks?: StringNullableFilter<"RetailStockReturn"> | string | null
    createdAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    updatedAt?: DateTimeFilter<"RetailStockReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"RetailStockReturn"> | bigint | number | null
  }

  export type BoxReturnUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: BoxReturnWhereUniqueInput
    update: XOR<BoxReturnUpdateWithoutCreatedByUserInput, BoxReturnUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<BoxReturnCreateWithoutCreatedByUserInput, BoxReturnUncheckedCreateWithoutCreatedByUserInput>
  }

  export type BoxReturnUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: BoxReturnWhereUniqueInput
    data: XOR<BoxReturnUpdateWithoutCreatedByUserInput, BoxReturnUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type BoxReturnUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: BoxReturnScalarWhereInput
    data: XOR<BoxReturnUpdateManyMutationInput, BoxReturnUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type BoxReturnScalarWhereInput = {
    AND?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
    OR?: BoxReturnScalarWhereInput[]
    NOT?: BoxReturnScalarWhereInput | BoxReturnScalarWhereInput[]
    id?: BigIntFilter<"BoxReturn"> | bigint | number
    supplierId?: BigIntFilter<"BoxReturn"> | bigint | number
    returnDate?: DateTimeFilter<"BoxReturn"> | Date | string
    boxCount?: DecimalFilter<"BoxReturn"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"BoxReturn"> | string | null
    signature?: StringNullableFilter<"BoxReturn"> | string | null
    createdAt?: DateTimeFilter<"BoxReturn"> | Date | string
    updatedAt?: DateTimeFilter<"BoxReturn"> | Date | string
    createdBy?: BigIntNullableFilter<"BoxReturn"> | bigint | number | null
  }

  export type EmployeeUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: EmployeeWhereUniqueInput
    update: XOR<EmployeeUpdateWithoutCreatedByUserInput, EmployeeUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<EmployeeCreateWithoutCreatedByUserInput, EmployeeUncheckedCreateWithoutCreatedByUserInput>
  }

  export type EmployeeUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: EmployeeWhereUniqueInput
    data: XOR<EmployeeUpdateWithoutCreatedByUserInput, EmployeeUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type EmployeeUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: EmployeeScalarWhereInput
    data: XOR<EmployeeUpdateManyMutationInput, EmployeeUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type EmployeeScalarWhereInput = {
    AND?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[]
    OR?: EmployeeScalarWhereInput[]
    NOT?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[]
    id?: BigIntFilter<"Employee"> | bigint | number
    employeeCode?: StringFilter<"Employee"> | string
    name?: StringFilter<"Employee"> | string
    mobile?: StringNullableFilter<"Employee"> | string | null
    designation?: StringNullableFilter<"Employee"> | string | null
    status?: BoolFilter<"Employee"> | boolean
    createdAt?: DateTimeFilter<"Employee"> | Date | string
    updatedAt?: DateTimeFilter<"Employee"> | Date | string
    deletedAt?: DateTimeNullableFilter<"Employee"> | Date | string | null
    createdBy?: BigIntNullableFilter<"Employee"> | bigint | number | null
  }

  export type AttendanceUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: AttendanceWhereUniqueInput
    update: XOR<AttendanceUpdateWithoutCreatedByUserInput, AttendanceUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<AttendanceCreateWithoutCreatedByUserInput, AttendanceUncheckedCreateWithoutCreatedByUserInput>
  }

  export type AttendanceUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: AttendanceWhereUniqueInput
    data: XOR<AttendanceUpdateWithoutCreatedByUserInput, AttendanceUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type AttendanceUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: AttendanceScalarWhereInput
    data: XOR<AttendanceUpdateManyMutationInput, AttendanceUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type AttendanceScalarWhereInput = {
    AND?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
    OR?: AttendanceScalarWhereInput[]
    NOT?: AttendanceScalarWhereInput | AttendanceScalarWhereInput[]
    id?: BigIntFilter<"Attendance"> | bigint | number
    employeeId?: BigIntFilter<"Attendance"> | bigint | number
    date?: DateTimeFilter<"Attendance"> | Date | string
    status?: EnumAttendanceStatusFilter<"Attendance"> | $Enums.AttendanceStatus
    remarks?: StringNullableFilter<"Attendance"> | string | null
    createdAt?: DateTimeFilter<"Attendance"> | Date | string
    updatedAt?: DateTimeFilter<"Attendance"> | Date | string
    createdBy?: BigIntNullableFilter<"Attendance"> | bigint | number | null
  }

  export type ArrivalSettlementUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: ArrivalSettlementWhereUniqueInput
    update: XOR<ArrivalSettlementUpdateWithoutCreatedByUserInput, ArrivalSettlementUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<ArrivalSettlementCreateWithoutCreatedByUserInput, ArrivalSettlementUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ArrivalSettlementUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: ArrivalSettlementWhereUniqueInput
    data: XOR<ArrivalSettlementUpdateWithoutCreatedByUserInput, ArrivalSettlementUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type ArrivalSettlementUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: ArrivalSettlementScalarWhereInput
    data: XOR<ArrivalSettlementUpdateManyMutationInput, ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type ArrivalSettlementScalarWhereInput = {
    AND?: ArrivalSettlementScalarWhereInput | ArrivalSettlementScalarWhereInput[]
    OR?: ArrivalSettlementScalarWhereInput[]
    NOT?: ArrivalSettlementScalarWhereInput | ArrivalSettlementScalarWhereInput[]
    id?: BigIntFilter<"ArrivalSettlement"> | bigint | number
    purchaseId?: BigIntFilter<"ArrivalSettlement"> | bigint | number
    settlementNo?: StringFilter<"ArrivalSettlement"> | string
    settlementDate?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    totalWeightSold?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFilter<"ArrivalSettlement"> | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFilter<"ArrivalSettlement"> | $Enums.SettlementStatus
    paymentMode?: EnumPaymentModeNullableFilter<"ArrivalSettlement"> | $Enums.PaymentMode | null
    remarks?: StringNullableFilter<"ArrivalSettlement"> | string | null
    createdAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalSettlement"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalSettlement"> | bigint | number | null
  }

  export type ArrivalCustomPattiUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: ArrivalCustomPattiWhereUniqueInput
    update: XOR<ArrivalCustomPattiUpdateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<ArrivalCustomPattiCreateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedCreateWithoutCreatedByUserInput>
  }

  export type ArrivalCustomPattiUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: ArrivalCustomPattiWhereUniqueInput
    data: XOR<ArrivalCustomPattiUpdateWithoutCreatedByUserInput, ArrivalCustomPattiUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type ArrivalCustomPattiUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: ArrivalCustomPattiScalarWhereInput
    data: XOR<ArrivalCustomPattiUpdateManyMutationInput, ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type ArrivalCustomPattiScalarWhereInput = {
    AND?: ArrivalCustomPattiScalarWhereInput | ArrivalCustomPattiScalarWhereInput[]
    OR?: ArrivalCustomPattiScalarWhereInput[]
    NOT?: ArrivalCustomPattiScalarWhereInput | ArrivalCustomPattiScalarWhereInput[]
    id?: BigIntFilter<"ArrivalCustomPatti"> | bigint | number
    purchaseId?: BigIntFilter<"ArrivalCustomPatti"> | bigint | number
    pattiNo?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    settlementDate?: DateTimeNullableFilter<"ArrivalCustomPatti"> | Date | string | null
    items?: JsonFilter<"ArrivalCustomPatti">
    totalWeightSold?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFilter<"ArrivalCustomPatti"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"ArrivalCustomPatti"> | string | null
    createdAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    updatedAt?: DateTimeFilter<"ArrivalCustomPatti"> | Date | string
    createdBy?: BigIntNullableFilter<"ArrivalCustomPatti"> | bigint | number | null
  }

  export type FastBillingUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: FastBillingWhereUniqueInput
    update: XOR<FastBillingUpdateWithoutCreatedByUserInput, FastBillingUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<FastBillingCreateWithoutCreatedByUserInput, FastBillingUncheckedCreateWithoutCreatedByUserInput>
  }

  export type FastBillingUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: FastBillingWhereUniqueInput
    data: XOR<FastBillingUpdateWithoutCreatedByUserInput, FastBillingUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type FastBillingUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: FastBillingScalarWhereInput
    data: XOR<FastBillingUpdateManyMutationInput, FastBillingUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type FastBillingScalarWhereInput = {
    AND?: FastBillingScalarWhereInput | FastBillingScalarWhereInput[]
    OR?: FastBillingScalarWhereInput[]
    NOT?: FastBillingScalarWhereInput | FastBillingScalarWhereInput[]
    id?: BigIntFilter<"FastBilling"> | bigint | number
    billNo?: StringFilter<"FastBilling"> | string
    billDate?: DateTimeFilter<"FastBilling"> | Date | string
    customerName?: StringFilter<"FastBilling"> | string
    totalAmount?: DecimalFilter<"FastBilling"> | Decimal | DecimalJsLike | number | string
    remarks?: StringNullableFilter<"FastBilling"> | string | null
    createdAt?: DateTimeFilter<"FastBilling"> | Date | string
    updatedAt?: DateTimeFilter<"FastBilling"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBilling"> | bigint | number | null
  }

  export type FastBillingItemUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: FastBillingItemWhereUniqueInput
    update: XOR<FastBillingItemUpdateWithoutCreatedByUserInput, FastBillingItemUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<FastBillingItemCreateWithoutCreatedByUserInput, FastBillingItemUncheckedCreateWithoutCreatedByUserInput>
  }

  export type FastBillingItemUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: FastBillingItemWhereUniqueInput
    data: XOR<FastBillingItemUpdateWithoutCreatedByUserInput, FastBillingItemUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type FastBillingItemUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: FastBillingItemScalarWhereInput
    data: XOR<FastBillingItemUpdateManyMutationInput, FastBillingItemUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type FastBillingItemScalarWhereInput = {
    AND?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
    OR?: FastBillingItemScalarWhereInput[]
    NOT?: FastBillingItemScalarWhereInput | FastBillingItemScalarWhereInput[]
    id?: BigIntFilter<"FastBillingItem"> | bigint | number
    fastBillingId?: BigIntFilter<"FastBillingItem"> | bigint | number
    vegetableName?: StringFilter<"FastBillingItem"> | string
    quantity?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    unit?: StringFilter<"FastBillingItem"> | string
    rateType?: StringNullableFilter<"FastBillingItem"> | string | null
    numberOfBoxes?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalNullableFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFilter<"FastBillingItem"> | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    updatedAt?: DateTimeFilter<"FastBillingItem"> | Date | string
    createdBy?: BigIntNullableFilter<"FastBillingItem"> | bigint | number | null
  }

  export type CashBankTransferUpsertWithWhereUniqueWithoutCreatedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    update: XOR<CashBankTransferUpdateWithoutCreatedByUserInput, CashBankTransferUncheckedUpdateWithoutCreatedByUserInput>
    create: XOR<CashBankTransferCreateWithoutCreatedByUserInput, CashBankTransferUncheckedCreateWithoutCreatedByUserInput>
  }

  export type CashBankTransferUpdateWithWhereUniqueWithoutCreatedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    data: XOR<CashBankTransferUpdateWithoutCreatedByUserInput, CashBankTransferUncheckedUpdateWithoutCreatedByUserInput>
  }

  export type CashBankTransferUpdateManyWithWhereWithoutCreatedByUserInput = {
    where: CashBankTransferScalarWhereInput
    data: XOR<CashBankTransferUpdateManyMutationInput, CashBankTransferUncheckedUpdateManyWithoutCreatedByUserInput>
  }

  export type CashBankTransferScalarWhereInput = {
    AND?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
    OR?: CashBankTransferScalarWhereInput[]
    NOT?: CashBankTransferScalarWhereInput | CashBankTransferScalarWhereInput[]
    id?: BigIntFilter<"CashBankTransfer"> | bigint | number
    transferDate?: DateTimeFilter<"CashBankTransfer"> | Date | string
    amount?: DecimalFilter<"CashBankTransfer"> | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFilter<"CashBankTransfer"> | string
    toAccount?: StringFilter<"CashBankTransfer"> | string
    referenceNo?: StringNullableFilter<"CashBankTransfer"> | string | null
    remarks?: StringNullableFilter<"CashBankTransfer"> | string | null
    deletedAt?: DateTimeNullableFilter<"CashBankTransfer"> | Date | string | null
    deletedBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
    createdAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    updatedAt?: DateTimeFilter<"CashBankTransfer"> | Date | string
    createdBy?: BigIntNullableFilter<"CashBankTransfer"> | bigint | number | null
  }

  export type CashBankTransferUpsertWithWhereUniqueWithoutDeletedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    update: XOR<CashBankTransferUpdateWithoutDeletedByUserInput, CashBankTransferUncheckedUpdateWithoutDeletedByUserInput>
    create: XOR<CashBankTransferCreateWithoutDeletedByUserInput, CashBankTransferUncheckedCreateWithoutDeletedByUserInput>
  }

  export type CashBankTransferUpdateWithWhereUniqueWithoutDeletedByUserInput = {
    where: CashBankTransferWhereUniqueInput
    data: XOR<CashBankTransferUpdateWithoutDeletedByUserInput, CashBankTransferUncheckedUpdateWithoutDeletedByUserInput>
  }

  export type CashBankTransferUpdateManyWithWhereWithoutDeletedByUserInput = {
    where: CashBankTransferScalarWhereInput
    data: XOR<CashBankTransferUpdateManyMutationInput, CashBankTransferUncheckedUpdateManyWithoutDeletedByUserInput>
  }

  export type AuditLogUpsertWithWhereUniqueWithoutUserInput = {
    where: AuditLogWhereUniqueInput
    update: XOR<AuditLogUpdateWithoutUserInput, AuditLogUncheckedUpdateWithoutUserInput>
    create: XOR<AuditLogCreateWithoutUserInput, AuditLogUncheckedCreateWithoutUserInput>
  }

  export type AuditLogUpdateWithWhereUniqueWithoutUserInput = {
    where: AuditLogWhereUniqueInput
    data: XOR<AuditLogUpdateWithoutUserInput, AuditLogUncheckedUpdateWithoutUserInput>
  }

  export type AuditLogUpdateManyWithWhereWithoutUserInput = {
    where: AuditLogScalarWhereInput
    data: XOR<AuditLogUpdateManyMutationInput, AuditLogUncheckedUpdateManyWithoutUserInput>
  }

  export type AuditLogScalarWhereInput = {
    AND?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[]
    OR?: AuditLogScalarWhereInput[]
    NOT?: AuditLogScalarWhereInput | AuditLogScalarWhereInput[]
    id?: BigIntFilter<"AuditLog"> | bigint | number
    entityName?: StringFilter<"AuditLog"> | string
    entityId?: BigIntFilter<"AuditLog"> | bigint | number
    action?: EnumAuditActionFilter<"AuditLog"> | $Enums.AuditAction
    oldValues?: JsonFilter<"AuditLog">
    newValues?: JsonNullableFilter<"AuditLog">
    createdAt?: DateTimeFilter<"AuditLog"> | Date | string
    userId?: BigIntNullableFilter<"AuditLog"> | bigint | number | null
  }

  export type DistrictCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    customers?: CustomerCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierCreateNestedManyWithoutDistrictInput
    createdByUser?: UserCreateNestedOneWithoutCreatedDistrictsInput
  }

  export type DistrictUncheckedCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    customers?: CustomerUncheckedCreateNestedManyWithoutDistrictInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutDistrictInput
  }

  export type DistrictCreateOrConnectWithoutStateInput = {
    where: DistrictWhereUniqueInput
    create: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput>
  }

  export type DistrictCreateManyStateInputEnvelope = {
    data: DistrictCreateManyStateInput | DistrictCreateManyStateInput[]
    skipDuplicates?: boolean
  }

  export type CustomerCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    district: DistrictCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutStateInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput>
  }

  export type CustomerCreateManyStateInputEnvelope = {
    data: CustomerCreateManyStateInput | CustomerCreateManyStateInput[]
    skipDuplicates?: boolean
  }

  export type SupplierCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    district: DistrictCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateWithoutStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutStateInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput>
  }

  export type SupplierCreateManyStateInputEnvelope = {
    data: SupplierCreateManyStateInput | SupplierCreateManyStateInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedStatesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedStatesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedStatesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedStatesInput, UserUncheckedCreateWithoutCreatedStatesInput>
  }

  export type DistrictUpsertWithWhereUniqueWithoutStateInput = {
    where: DistrictWhereUniqueInput
    update: XOR<DistrictUpdateWithoutStateInput, DistrictUncheckedUpdateWithoutStateInput>
    create: XOR<DistrictCreateWithoutStateInput, DistrictUncheckedCreateWithoutStateInput>
  }

  export type DistrictUpdateWithWhereUniqueWithoutStateInput = {
    where: DistrictWhereUniqueInput
    data: XOR<DistrictUpdateWithoutStateInput, DistrictUncheckedUpdateWithoutStateInput>
  }

  export type DistrictUpdateManyWithWhereWithoutStateInput = {
    where: DistrictScalarWhereInput
    data: XOR<DistrictUpdateManyMutationInput, DistrictUncheckedUpdateManyWithoutStateInput>
  }

  export type CustomerUpsertWithWhereUniqueWithoutStateInput = {
    where: CustomerWhereUniqueInput
    update: XOR<CustomerUpdateWithoutStateInput, CustomerUncheckedUpdateWithoutStateInput>
    create: XOR<CustomerCreateWithoutStateInput, CustomerUncheckedCreateWithoutStateInput>
  }

  export type CustomerUpdateWithWhereUniqueWithoutStateInput = {
    where: CustomerWhereUniqueInput
    data: XOR<CustomerUpdateWithoutStateInput, CustomerUncheckedUpdateWithoutStateInput>
  }

  export type CustomerUpdateManyWithWhereWithoutStateInput = {
    where: CustomerScalarWhereInput
    data: XOR<CustomerUpdateManyMutationInput, CustomerUncheckedUpdateManyWithoutStateInput>
  }

  export type SupplierUpsertWithWhereUniqueWithoutStateInput = {
    where: SupplierWhereUniqueInput
    update: XOR<SupplierUpdateWithoutStateInput, SupplierUncheckedUpdateWithoutStateInput>
    create: XOR<SupplierCreateWithoutStateInput, SupplierUncheckedCreateWithoutStateInput>
  }

  export type SupplierUpdateWithWhereUniqueWithoutStateInput = {
    where: SupplierWhereUniqueInput
    data: XOR<SupplierUpdateWithoutStateInput, SupplierUncheckedUpdateWithoutStateInput>
  }

  export type SupplierUpdateManyWithWhereWithoutStateInput = {
    where: SupplierScalarWhereInput
    data: XOR<SupplierUpdateManyMutationInput, SupplierUncheckedUpdateManyWithoutStateInput>
  }

  export type UserUpsertWithoutCreatedStatesInput = {
    update: XOR<UserUpdateWithoutCreatedStatesInput, UserUncheckedUpdateWithoutCreatedStatesInput>
    create: XOR<UserCreateWithoutCreatedStatesInput, UserUncheckedCreateWithoutCreatedStatesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedStatesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedStatesInput, UserUncheckedUpdateWithoutCreatedStatesInput>
  }

  export type UserUpdateWithoutCreatedStatesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedStatesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type StateCreateWithoutDistrictsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    customers?: CustomerCreateNestedManyWithoutStateInput
    suppliers?: SupplierCreateNestedManyWithoutStateInput
    createdByUser?: UserCreateNestedOneWithoutCreatedStatesInput
  }

  export type StateUncheckedCreateWithoutDistrictsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    customers?: CustomerUncheckedCreateNestedManyWithoutStateInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutStateInput
  }

  export type StateCreateOrConnectWithoutDistrictsInput = {
    where: StateWhereUniqueInput
    create: XOR<StateCreateWithoutDistrictsInput, StateUncheckedCreateWithoutDistrictsInput>
  }

  export type CustomerCreateWithoutDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateWithoutDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutDistrictInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput>
  }

  export type CustomerCreateManyDistrictInputEnvelope = {
    data: CustomerCreateManyDistrictInput | CustomerCreateManyDistrictInput[]
    skipDuplicates?: boolean
  }

  export type SupplierCreateWithoutDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateWithoutDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutDistrictInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput>
  }

  export type SupplierCreateManyDistrictInputEnvelope = {
    data: SupplierCreateManyDistrictInput | SupplierCreateManyDistrictInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedDistrictsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedDistrictsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedDistrictsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedDistrictsInput, UserUncheckedCreateWithoutCreatedDistrictsInput>
  }

  export type StateUpsertWithoutDistrictsInput = {
    update: XOR<StateUpdateWithoutDistrictsInput, StateUncheckedUpdateWithoutDistrictsInput>
    create: XOR<StateCreateWithoutDistrictsInput, StateUncheckedCreateWithoutDistrictsInput>
    where?: StateWhereInput
  }

  export type StateUpdateToOneWithWhereWithoutDistrictsInput = {
    where?: StateWhereInput
    data: XOR<StateUpdateWithoutDistrictsInput, StateUncheckedUpdateWithoutDistrictsInput>
  }

  export type StateUpdateWithoutDistrictsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customers?: CustomerUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUpdateManyWithoutStateNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedStatesNestedInput
  }

  export type StateUncheckedUpdateWithoutDistrictsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customers?: CustomerUncheckedUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutStateNestedInput
  }

  export type CustomerUpsertWithWhereUniqueWithoutDistrictInput = {
    where: CustomerWhereUniqueInput
    update: XOR<CustomerUpdateWithoutDistrictInput, CustomerUncheckedUpdateWithoutDistrictInput>
    create: XOR<CustomerCreateWithoutDistrictInput, CustomerUncheckedCreateWithoutDistrictInput>
  }

  export type CustomerUpdateWithWhereUniqueWithoutDistrictInput = {
    where: CustomerWhereUniqueInput
    data: XOR<CustomerUpdateWithoutDistrictInput, CustomerUncheckedUpdateWithoutDistrictInput>
  }

  export type CustomerUpdateManyWithWhereWithoutDistrictInput = {
    where: CustomerScalarWhereInput
    data: XOR<CustomerUpdateManyMutationInput, CustomerUncheckedUpdateManyWithoutDistrictInput>
  }

  export type SupplierUpsertWithWhereUniqueWithoutDistrictInput = {
    where: SupplierWhereUniqueInput
    update: XOR<SupplierUpdateWithoutDistrictInput, SupplierUncheckedUpdateWithoutDistrictInput>
    create: XOR<SupplierCreateWithoutDistrictInput, SupplierUncheckedCreateWithoutDistrictInput>
  }

  export type SupplierUpdateWithWhereUniqueWithoutDistrictInput = {
    where: SupplierWhereUniqueInput
    data: XOR<SupplierUpdateWithoutDistrictInput, SupplierUncheckedUpdateWithoutDistrictInput>
  }

  export type SupplierUpdateManyWithWhereWithoutDistrictInput = {
    where: SupplierScalarWhereInput
    data: XOR<SupplierUpdateManyMutationInput, SupplierUncheckedUpdateManyWithoutDistrictInput>
  }

  export type UserUpsertWithoutCreatedDistrictsInput = {
    update: XOR<UserUpdateWithoutCreatedDistrictsInput, UserUncheckedUpdateWithoutCreatedDistrictsInput>
    create: XOR<UserCreateWithoutCreatedDistrictsInput, UserUncheckedCreateWithoutCreatedDistrictsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedDistrictsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedDistrictsInput, UserUncheckedUpdateWithoutCreatedDistrictsInput>
  }

  export type UserUpdateWithoutCreatedDistrictsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedDistrictsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutVegetableInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutVegetableInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutVegetableInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput>
  }

  export type PurchaseCreateManyVegetableInputEnvelope = {
    data: PurchaseCreateManyVegetableInput | PurchaseCreateManyVegetableInput[]
    skipDuplicates?: boolean
  }

  export type QuotationItemCreateWithoutVegetableInput = {
    id?: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    quotation: QuotationCreateNestedOneWithoutItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationItemsInput
  }

  export type QuotationItemUncheckedCreateWithoutVegetableInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationItemCreateOrConnectWithoutVegetableInput = {
    where: QuotationItemWhereUniqueInput
    create: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput>
  }

  export type QuotationItemCreateManyVegetableInputEnvelope = {
    data: QuotationItemCreateManyVegetableInput | QuotationItemCreateManyVegetableInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedVegetablesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedVegetablesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedVegetablesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedVegetablesInput, UserUncheckedCreateWithoutCreatedVegetablesInput>
  }

  export type PurchaseUpsertWithWhereUniqueWithoutVegetableInput = {
    where: PurchaseWhereUniqueInput
    update: XOR<PurchaseUpdateWithoutVegetableInput, PurchaseUncheckedUpdateWithoutVegetableInput>
    create: XOR<PurchaseCreateWithoutVegetableInput, PurchaseUncheckedCreateWithoutVegetableInput>
  }

  export type PurchaseUpdateWithWhereUniqueWithoutVegetableInput = {
    where: PurchaseWhereUniqueInput
    data: XOR<PurchaseUpdateWithoutVegetableInput, PurchaseUncheckedUpdateWithoutVegetableInput>
  }

  export type PurchaseUpdateManyWithWhereWithoutVegetableInput = {
    where: PurchaseScalarWhereInput
    data: XOR<PurchaseUpdateManyMutationInput, PurchaseUncheckedUpdateManyWithoutVegetableInput>
  }

  export type QuotationItemUpsertWithWhereUniqueWithoutVegetableInput = {
    where: QuotationItemWhereUniqueInput
    update: XOR<QuotationItemUpdateWithoutVegetableInput, QuotationItemUncheckedUpdateWithoutVegetableInput>
    create: XOR<QuotationItemCreateWithoutVegetableInput, QuotationItemUncheckedCreateWithoutVegetableInput>
  }

  export type QuotationItemUpdateWithWhereUniqueWithoutVegetableInput = {
    where: QuotationItemWhereUniqueInput
    data: XOR<QuotationItemUpdateWithoutVegetableInput, QuotationItemUncheckedUpdateWithoutVegetableInput>
  }

  export type QuotationItemUpdateManyWithWhereWithoutVegetableInput = {
    where: QuotationItemScalarWhereInput
    data: XOR<QuotationItemUpdateManyMutationInput, QuotationItemUncheckedUpdateManyWithoutVegetableInput>
  }

  export type UserUpsertWithoutCreatedVegetablesInput = {
    update: XOR<UserUpdateWithoutCreatedVegetablesInput, UserUncheckedUpdateWithoutCreatedVegetablesInput>
    create: XOR<UserCreateWithoutCreatedVegetablesInput, UserUncheckedCreateWithoutCreatedVegetablesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedVegetablesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedVegetablesInput, UserUncheckedUpdateWithoutCreatedVegetablesInput>
  }

  export type UserUpdateWithoutCreatedVegetablesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedVegetablesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type StateCreateWithoutCustomersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    districts?: DistrictCreateNestedManyWithoutStateInput
    suppliers?: SupplierCreateNestedManyWithoutStateInput
    createdByUser?: UserCreateNestedOneWithoutCreatedStatesInput
  }

  export type StateUncheckedCreateWithoutCustomersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    districts?: DistrictUncheckedCreateNestedManyWithoutStateInput
    suppliers?: SupplierUncheckedCreateNestedManyWithoutStateInput
  }

  export type StateCreateOrConnectWithoutCustomersInput = {
    where: StateWhereUniqueInput
    create: XOR<StateCreateWithoutCustomersInput, StateUncheckedCreateWithoutCustomersInput>
  }

  export type DistrictCreateWithoutCustomersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    state: StateCreateNestedOneWithoutDistrictsInput
    suppliers?: SupplierCreateNestedManyWithoutDistrictInput
    createdByUser?: UserCreateNestedOneWithoutCreatedDistrictsInput
  }

  export type DistrictUncheckedCreateWithoutCustomersInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    suppliers?: SupplierUncheckedCreateNestedManyWithoutDistrictInput
  }

  export type DistrictCreateOrConnectWithoutCustomersInput = {
    where: DistrictWhereUniqueInput
    create: XOR<DistrictCreateWithoutCustomersInput, DistrictUncheckedCreateWithoutCustomersInput>
  }

  export type SaleCreateWithoutCustomerInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    items?: SaleItemCreateNestedManyWithoutSaleInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSalesInput
  }

  export type SaleUncheckedCreateWithoutCustomerInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    items?: SaleItemUncheckedCreateNestedManyWithoutSaleInput
  }

  export type SaleCreateOrConnectWithoutCustomerInput = {
    where: SaleWhereUniqueInput
    create: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput>
  }

  export type SaleCreateManyCustomerInputEnvelope = {
    data: SaleCreateManyCustomerInput | SaleCreateManyCustomerInput[]
    skipDuplicates?: boolean
  }

  export type CustomerReceiptCreateWithoutCustomerInput = {
    id?: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomerReceiptsInput
  }

  export type CustomerReceiptUncheckedCreateWithoutCustomerInput = {
    id?: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerReceiptCreateOrConnectWithoutCustomerInput = {
    where: CustomerReceiptWhereUniqueInput
    create: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput>
  }

  export type CustomerReceiptCreateManyCustomerInputEnvelope = {
    data: CustomerReceiptCreateManyCustomerInput | CustomerReceiptCreateManyCustomerInput[]
    skipDuplicates?: boolean
  }

  export type QuotationCreateWithoutCustomerInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    items?: QuotationItemCreateNestedManyWithoutQuotationInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationsInput
  }

  export type QuotationUncheckedCreateWithoutCustomerInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    items?: QuotationItemUncheckedCreateNestedManyWithoutQuotationInput
  }

  export type QuotationCreateOrConnectWithoutCustomerInput = {
    where: QuotationWhereUniqueInput
    create: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput>
  }

  export type QuotationCreateManyCustomerInputEnvelope = {
    data: QuotationCreateManyCustomerInput | QuotationCreateManyCustomerInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedCustomersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedCustomersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedCustomersInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedCustomersInput, UserUncheckedCreateWithoutCreatedCustomersInput>
  }

  export type StateUpsertWithoutCustomersInput = {
    update: XOR<StateUpdateWithoutCustomersInput, StateUncheckedUpdateWithoutCustomersInput>
    create: XOR<StateCreateWithoutCustomersInput, StateUncheckedCreateWithoutCustomersInput>
    where?: StateWhereInput
  }

  export type StateUpdateToOneWithWhereWithoutCustomersInput = {
    where?: StateWhereInput
    data: XOR<StateUpdateWithoutCustomersInput, StateUncheckedUpdateWithoutCustomersInput>
  }

  export type StateUpdateWithoutCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    districts?: DistrictUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUpdateManyWithoutStateNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedStatesNestedInput
  }

  export type StateUncheckedUpdateWithoutCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    districts?: DistrictUncheckedUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutStateNestedInput
  }

  export type DistrictUpsertWithoutCustomersInput = {
    update: XOR<DistrictUpdateWithoutCustomersInput, DistrictUncheckedUpdateWithoutCustomersInput>
    create: XOR<DistrictCreateWithoutCustomersInput, DistrictUncheckedCreateWithoutCustomersInput>
    where?: DistrictWhereInput
  }

  export type DistrictUpdateToOneWithWhereWithoutCustomersInput = {
    where?: DistrictWhereInput
    data: XOR<DistrictUpdateWithoutCustomersInput, DistrictUncheckedUpdateWithoutCustomersInput>
  }

  export type DistrictUpdateWithoutCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    state?: StateUpdateOneRequiredWithoutDistrictsNestedInput
    suppliers?: SupplierUpdateManyWithoutDistrictNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedDistrictsNestedInput
  }

  export type DistrictUncheckedUpdateWithoutCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    suppliers?: SupplierUncheckedUpdateManyWithoutDistrictNestedInput
  }

  export type SaleUpsertWithWhereUniqueWithoutCustomerInput = {
    where: SaleWhereUniqueInput
    update: XOR<SaleUpdateWithoutCustomerInput, SaleUncheckedUpdateWithoutCustomerInput>
    create: XOR<SaleCreateWithoutCustomerInput, SaleUncheckedCreateWithoutCustomerInput>
  }

  export type SaleUpdateWithWhereUniqueWithoutCustomerInput = {
    where: SaleWhereUniqueInput
    data: XOR<SaleUpdateWithoutCustomerInput, SaleUncheckedUpdateWithoutCustomerInput>
  }

  export type SaleUpdateManyWithWhereWithoutCustomerInput = {
    where: SaleScalarWhereInput
    data: XOR<SaleUpdateManyMutationInput, SaleUncheckedUpdateManyWithoutCustomerInput>
  }

  export type CustomerReceiptUpsertWithWhereUniqueWithoutCustomerInput = {
    where: CustomerReceiptWhereUniqueInput
    update: XOR<CustomerReceiptUpdateWithoutCustomerInput, CustomerReceiptUncheckedUpdateWithoutCustomerInput>
    create: XOR<CustomerReceiptCreateWithoutCustomerInput, CustomerReceiptUncheckedCreateWithoutCustomerInput>
  }

  export type CustomerReceiptUpdateWithWhereUniqueWithoutCustomerInput = {
    where: CustomerReceiptWhereUniqueInput
    data: XOR<CustomerReceiptUpdateWithoutCustomerInput, CustomerReceiptUncheckedUpdateWithoutCustomerInput>
  }

  export type CustomerReceiptUpdateManyWithWhereWithoutCustomerInput = {
    where: CustomerReceiptScalarWhereInput
    data: XOR<CustomerReceiptUpdateManyMutationInput, CustomerReceiptUncheckedUpdateManyWithoutCustomerInput>
  }

  export type QuotationUpsertWithWhereUniqueWithoutCustomerInput = {
    where: QuotationWhereUniqueInput
    update: XOR<QuotationUpdateWithoutCustomerInput, QuotationUncheckedUpdateWithoutCustomerInput>
    create: XOR<QuotationCreateWithoutCustomerInput, QuotationUncheckedCreateWithoutCustomerInput>
  }

  export type QuotationUpdateWithWhereUniqueWithoutCustomerInput = {
    where: QuotationWhereUniqueInput
    data: XOR<QuotationUpdateWithoutCustomerInput, QuotationUncheckedUpdateWithoutCustomerInput>
  }

  export type QuotationUpdateManyWithWhereWithoutCustomerInput = {
    where: QuotationScalarWhereInput
    data: XOR<QuotationUpdateManyMutationInput, QuotationUncheckedUpdateManyWithoutCustomerInput>
  }

  export type UserUpsertWithoutCreatedCustomersInput = {
    update: XOR<UserUpdateWithoutCreatedCustomersInput, UserUncheckedUpdateWithoutCreatedCustomersInput>
    create: XOR<UserCreateWithoutCreatedCustomersInput, UserUncheckedCreateWithoutCreatedCustomersInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedCustomersInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedCustomersInput, UserUncheckedUpdateWithoutCreatedCustomersInput>
  }

  export type UserUpdateWithoutCreatedCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedCustomersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type StateCreateWithoutSuppliersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    districts?: DistrictCreateNestedManyWithoutStateInput
    customers?: CustomerCreateNestedManyWithoutStateInput
    createdByUser?: UserCreateNestedOneWithoutCreatedStatesInput
  }

  export type StateUncheckedCreateWithoutSuppliersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    districts?: DistrictUncheckedCreateNestedManyWithoutStateInput
    customers?: CustomerUncheckedCreateNestedManyWithoutStateInput
  }

  export type StateCreateOrConnectWithoutSuppliersInput = {
    where: StateWhereUniqueInput
    create: XOR<StateCreateWithoutSuppliersInput, StateUncheckedCreateWithoutSuppliersInput>
  }

  export type DistrictCreateWithoutSuppliersInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    state: StateCreateNestedOneWithoutDistrictsInput
    customers?: CustomerCreateNestedManyWithoutDistrictInput
    createdByUser?: UserCreateNestedOneWithoutCreatedDistrictsInput
  }

  export type DistrictUncheckedCreateWithoutSuppliersInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    customers?: CustomerUncheckedCreateNestedManyWithoutDistrictInput
  }

  export type DistrictCreateOrConnectWithoutSuppliersInput = {
    where: DistrictWhereUniqueInput
    create: XOR<DistrictCreateWithoutSuppliersInput, DistrictUncheckedCreateWithoutSuppliersInput>
  }

  export type PurchaseCreateWithoutSupplierInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutSupplierInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutSupplierInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput>
  }

  export type PurchaseCreateManySupplierInputEnvelope = {
    data: PurchaseCreateManySupplierInput | PurchaseCreateManySupplierInput[]
    skipDuplicates?: boolean
  }

  export type SupplierPaymentCreateWithoutSupplierInput = {
    id?: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdByUser?: UserCreateNestedOneWithoutCreatedSupplierPaymentsInput
  }

  export type SupplierPaymentUncheckedCreateWithoutSupplierInput = {
    id?: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierPaymentCreateOrConnectWithoutSupplierInput = {
    where: SupplierPaymentWhereUniqueInput
    create: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput>
  }

  export type SupplierPaymentCreateManySupplierInputEnvelope = {
    data: SupplierPaymentCreateManySupplierInput | SupplierPaymentCreateManySupplierInput[]
    skipDuplicates?: boolean
  }

  export type BoxReturnCreateWithoutSupplierInput = {
    id?: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedBoxReturnsInput
  }

  export type BoxReturnUncheckedCreateWithoutSupplierInput = {
    id?: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type BoxReturnCreateOrConnectWithoutSupplierInput = {
    where: BoxReturnWhereUniqueInput
    create: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput>
  }

  export type BoxReturnCreateManySupplierInputEnvelope = {
    data: BoxReturnCreateManySupplierInput | BoxReturnCreateManySupplierInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedSuppliersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedSuppliersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedSuppliersInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedSuppliersInput, UserUncheckedCreateWithoutCreatedSuppliersInput>
  }

  export type StateUpsertWithoutSuppliersInput = {
    update: XOR<StateUpdateWithoutSuppliersInput, StateUncheckedUpdateWithoutSuppliersInput>
    create: XOR<StateCreateWithoutSuppliersInput, StateUncheckedCreateWithoutSuppliersInput>
    where?: StateWhereInput
  }

  export type StateUpdateToOneWithWhereWithoutSuppliersInput = {
    where?: StateWhereInput
    data: XOR<StateUpdateWithoutSuppliersInput, StateUncheckedUpdateWithoutSuppliersInput>
  }

  export type StateUpdateWithoutSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    districts?: DistrictUpdateManyWithoutStateNestedInput
    customers?: CustomerUpdateManyWithoutStateNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedStatesNestedInput
  }

  export type StateUncheckedUpdateWithoutSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    districts?: DistrictUncheckedUpdateManyWithoutStateNestedInput
    customers?: CustomerUncheckedUpdateManyWithoutStateNestedInput
  }

  export type DistrictUpsertWithoutSuppliersInput = {
    update: XOR<DistrictUpdateWithoutSuppliersInput, DistrictUncheckedUpdateWithoutSuppliersInput>
    create: XOR<DistrictCreateWithoutSuppliersInput, DistrictUncheckedCreateWithoutSuppliersInput>
    where?: DistrictWhereInput
  }

  export type DistrictUpdateToOneWithWhereWithoutSuppliersInput = {
    where?: DistrictWhereInput
    data: XOR<DistrictUpdateWithoutSuppliersInput, DistrictUncheckedUpdateWithoutSuppliersInput>
  }

  export type DistrictUpdateWithoutSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    state?: StateUpdateOneRequiredWithoutDistrictsNestedInput
    customers?: CustomerUpdateManyWithoutDistrictNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedDistrictsNestedInput
  }

  export type DistrictUncheckedUpdateWithoutSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customers?: CustomerUncheckedUpdateManyWithoutDistrictNestedInput
  }

  export type PurchaseUpsertWithWhereUniqueWithoutSupplierInput = {
    where: PurchaseWhereUniqueInput
    update: XOR<PurchaseUpdateWithoutSupplierInput, PurchaseUncheckedUpdateWithoutSupplierInput>
    create: XOR<PurchaseCreateWithoutSupplierInput, PurchaseUncheckedCreateWithoutSupplierInput>
  }

  export type PurchaseUpdateWithWhereUniqueWithoutSupplierInput = {
    where: PurchaseWhereUniqueInput
    data: XOR<PurchaseUpdateWithoutSupplierInput, PurchaseUncheckedUpdateWithoutSupplierInput>
  }

  export type PurchaseUpdateManyWithWhereWithoutSupplierInput = {
    where: PurchaseScalarWhereInput
    data: XOR<PurchaseUpdateManyMutationInput, PurchaseUncheckedUpdateManyWithoutSupplierInput>
  }

  export type SupplierPaymentUpsertWithWhereUniqueWithoutSupplierInput = {
    where: SupplierPaymentWhereUniqueInput
    update: XOR<SupplierPaymentUpdateWithoutSupplierInput, SupplierPaymentUncheckedUpdateWithoutSupplierInput>
    create: XOR<SupplierPaymentCreateWithoutSupplierInput, SupplierPaymentUncheckedCreateWithoutSupplierInput>
  }

  export type SupplierPaymentUpdateWithWhereUniqueWithoutSupplierInput = {
    where: SupplierPaymentWhereUniqueInput
    data: XOR<SupplierPaymentUpdateWithoutSupplierInput, SupplierPaymentUncheckedUpdateWithoutSupplierInput>
  }

  export type SupplierPaymentUpdateManyWithWhereWithoutSupplierInput = {
    where: SupplierPaymentScalarWhereInput
    data: XOR<SupplierPaymentUpdateManyMutationInput, SupplierPaymentUncheckedUpdateManyWithoutSupplierInput>
  }

  export type BoxReturnUpsertWithWhereUniqueWithoutSupplierInput = {
    where: BoxReturnWhereUniqueInput
    update: XOR<BoxReturnUpdateWithoutSupplierInput, BoxReturnUncheckedUpdateWithoutSupplierInput>
    create: XOR<BoxReturnCreateWithoutSupplierInput, BoxReturnUncheckedCreateWithoutSupplierInput>
  }

  export type BoxReturnUpdateWithWhereUniqueWithoutSupplierInput = {
    where: BoxReturnWhereUniqueInput
    data: XOR<BoxReturnUpdateWithoutSupplierInput, BoxReturnUncheckedUpdateWithoutSupplierInput>
  }

  export type BoxReturnUpdateManyWithWhereWithoutSupplierInput = {
    where: BoxReturnScalarWhereInput
    data: XOR<BoxReturnUpdateManyMutationInput, BoxReturnUncheckedUpdateManyWithoutSupplierInput>
  }

  export type UserUpsertWithoutCreatedSuppliersInput = {
    update: XOR<UserUpdateWithoutCreatedSuppliersInput, UserUncheckedUpdateWithoutCreatedSuppliersInput>
    create: XOR<UserCreateWithoutCreatedSuppliersInput, UserUncheckedCreateWithoutCreatedSuppliersInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedSuppliersInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedSuppliersInput, UserUncheckedUpdateWithoutCreatedSuppliersInput>
  }

  export type UserUpdateWithoutCreatedSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedSuppliersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type SupplierCreateWithoutSupplierPaymentsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    district: DistrictCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateWithoutSupplierPaymentsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutSupplierPaymentsInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutSupplierPaymentsInput, SupplierUncheckedCreateWithoutSupplierPaymentsInput>
  }

  export type UserCreateWithoutCreatedSupplierPaymentsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedSupplierPaymentsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedSupplierPaymentsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedSupplierPaymentsInput, UserUncheckedCreateWithoutCreatedSupplierPaymentsInput>
  }

  export type SupplierUpsertWithoutSupplierPaymentsInput = {
    update: XOR<SupplierUpdateWithoutSupplierPaymentsInput, SupplierUncheckedUpdateWithoutSupplierPaymentsInput>
    create: XOR<SupplierCreateWithoutSupplierPaymentsInput, SupplierUncheckedCreateWithoutSupplierPaymentsInput>
    where?: SupplierWhereInput
  }

  export type SupplierUpdateToOneWithWhereWithoutSupplierPaymentsInput = {
    where?: SupplierWhereInput
    data: XOR<SupplierUpdateWithoutSupplierPaymentsInput, SupplierUncheckedUpdateWithoutSupplierPaymentsInput>
  }

  export type SupplierUpdateWithoutSupplierPaymentsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateWithoutSupplierPaymentsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type UserUpsertWithoutCreatedSupplierPaymentsInput = {
    update: XOR<UserUpdateWithoutCreatedSupplierPaymentsInput, UserUncheckedUpdateWithoutCreatedSupplierPaymentsInput>
    create: XOR<UserCreateWithoutCreatedSupplierPaymentsInput, UserUncheckedCreateWithoutCreatedSupplierPaymentsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedSupplierPaymentsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedSupplierPaymentsInput, UserUncheckedUpdateWithoutCreatedSupplierPaymentsInput>
  }

  export type UserUpdateWithoutCreatedSupplierPaymentsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedSupplierPaymentsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateWithoutCreatedUpisInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedUpisInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedUpisInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedUpisInput, UserUncheckedCreateWithoutCreatedUpisInput>
  }

  export type UserUpsertWithoutCreatedUpisInput = {
    update: XOR<UserUpdateWithoutCreatedUpisInput, UserUncheckedUpdateWithoutCreatedUpisInput>
    create: XOR<UserCreateWithoutCreatedUpisInput, UserUncheckedCreateWithoutCreatedUpisInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedUpisInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedUpisInput, UserUncheckedUpdateWithoutCreatedUpisInput>
  }

  export type UserUpdateWithoutCreatedUpisInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedUpisInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type SupplierCreateWithoutPurchasesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    district: DistrictCreateNestedOneWithoutSuppliersInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateWithoutPurchasesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
    boxReturns?: BoxReturnUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutPurchasesInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutPurchasesInput, SupplierUncheckedCreateWithoutPurchasesInput>
  }

  export type VegetableCreateWithoutPurchasesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    quotationItems?: QuotationItemCreateNestedManyWithoutVegetableInput
    createdByUser?: UserCreateNestedOneWithoutCreatedVegetablesInput
  }

  export type VegetableUncheckedCreateWithoutPurchasesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    createdBy?: bigint | number | null
    quotationItems?: QuotationItemUncheckedCreateNestedManyWithoutVegetableInput
  }

  export type VegetableCreateOrConnectWithoutPurchasesInput = {
    where: VegetableWhereUniqueInput
    create: XOR<VegetableCreateWithoutPurchasesInput, VegetableUncheckedCreateWithoutPurchasesInput>
  }

  export type ArrivalSettlementCreateWithoutPurchaseInput = {
    id?: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedArrivalSettlementsInput
  }

  export type ArrivalSettlementUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalSettlementCreateOrConnectWithoutPurchaseInput = {
    where: ArrivalSettlementWhereUniqueInput
    create: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
  }

  export type ArrivalCustomPattiCreateWithoutPurchaseInput = {
    id?: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedArrivalCustomPattisInput
  }

  export type ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ArrivalCustomPattiCreateOrConnectWithoutPurchaseInput = {
    where: ArrivalCustomPattiWhereUniqueInput
    create: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
  }

  export type SaleItemCreateWithoutPurchaseInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    sale: SaleCreateNestedOneWithoutItemsInput
    saleReturns?: SaleReturnCreateNestedManyWithoutSaleItemInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleItemsInput
  }

  export type SaleItemUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    saleId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutSaleItemInput
  }

  export type SaleItemCreateOrConnectWithoutPurchaseInput = {
    where: SaleItemWhereUniqueInput
    create: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput>
  }

  export type SaleItemCreateManyPurchaseInputEnvelope = {
    data: SaleItemCreateManyPurchaseInput | SaleItemCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type StockSpoilageCreateWithoutPurchaseInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedStockSpoilagesInput
  }

  export type StockSpoilageUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type StockSpoilageCreateOrConnectWithoutPurchaseInput = {
    where: StockSpoilageWhereUniqueInput
    create: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput>
  }

  export type StockSpoilageCreateManyPurchaseInputEnvelope = {
    data: StockSpoilageCreateManyPurchaseInput | StockSpoilageCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type SaleReturnCreateWithoutPurchaseInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    saleItem: SaleItemCreateNestedOneWithoutSaleReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleReturnsInput
  }

  export type SaleReturnUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    saleItemId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnCreateOrConnectWithoutPurchaseInput = {
    where: SaleReturnWhereUniqueInput
    create: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput>
  }

  export type SaleReturnCreateManyPurchaseInputEnvelope = {
    data: SaleReturnCreateManyPurchaseInput | SaleReturnCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type PurchaseReturnCreateWithoutPurchaseInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchaseReturnsInput
  }

  export type PurchaseReturnUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseReturnCreateOrConnectWithoutPurchaseInput = {
    where: PurchaseReturnWhereUniqueInput
    create: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput>
  }

  export type PurchaseReturnCreateManyPurchaseInputEnvelope = {
    data: PurchaseReturnCreateManyPurchaseInput | PurchaseReturnCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockCreateWithoutPurchaseInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    retailSaleItems?: RetailSaleItemCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnCreateNestedManyWithoutRetailStockInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStocksInput
  }

  export type RetailStockUncheckedCreateWithoutPurchaseInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockCreateOrConnectWithoutPurchaseInput = {
    where: RetailStockWhereUniqueInput
    create: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput>
  }

  export type RetailStockCreateManyPurchaseInputEnvelope = {
    data: RetailStockCreateManyPurchaseInput | RetailStockCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type ExpenseCreateWithoutPurchaseInput = {
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedExpensesInput
  }

  export type ExpenseUncheckedCreateWithoutPurchaseInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type ExpenseCreateOrConnectWithoutPurchaseInput = {
    where: ExpenseWhereUniqueInput
    create: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput>
  }

  export type ExpenseCreateManyPurchaseInputEnvelope = {
    data: ExpenseCreateManyPurchaseInput | ExpenseCreateManyPurchaseInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedPurchasesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedPurchasesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedPurchasesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedPurchasesInput, UserUncheckedCreateWithoutCreatedPurchasesInput>
  }

  export type SupplierUpsertWithoutPurchasesInput = {
    update: XOR<SupplierUpdateWithoutPurchasesInput, SupplierUncheckedUpdateWithoutPurchasesInput>
    create: XOR<SupplierCreateWithoutPurchasesInput, SupplierUncheckedCreateWithoutPurchasesInput>
    where?: SupplierWhereInput
  }

  export type SupplierUpdateToOneWithWhereWithoutPurchasesInput = {
    where?: SupplierWhereInput
    data: XOR<SupplierUpdateWithoutPurchasesInput, SupplierUncheckedUpdateWithoutPurchasesInput>
  }

  export type SupplierUpdateWithoutPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateWithoutPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type VegetableUpsertWithoutPurchasesInput = {
    update: XOR<VegetableUpdateWithoutPurchasesInput, VegetableUncheckedUpdateWithoutPurchasesInput>
    create: XOR<VegetableCreateWithoutPurchasesInput, VegetableUncheckedCreateWithoutPurchasesInput>
    where?: VegetableWhereInput
  }

  export type VegetableUpdateToOneWithWhereWithoutPurchasesInput = {
    where?: VegetableWhereInput
    data: XOR<VegetableUpdateWithoutPurchasesInput, VegetableUncheckedUpdateWithoutPurchasesInput>
  }

  export type VegetableUpdateWithoutPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    quotationItems?: QuotationItemUpdateManyWithoutVegetableNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedVegetablesNestedInput
  }

  export type VegetableUncheckedUpdateWithoutPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    quotationItems?: QuotationItemUncheckedUpdateManyWithoutVegetableNestedInput
  }

  export type ArrivalSettlementUpsertWithoutPurchaseInput = {
    update: XOR<ArrivalSettlementUpdateWithoutPurchaseInput, ArrivalSettlementUncheckedUpdateWithoutPurchaseInput>
    create: XOR<ArrivalSettlementCreateWithoutPurchaseInput, ArrivalSettlementUncheckedCreateWithoutPurchaseInput>
    where?: ArrivalSettlementWhereInput
  }

  export type ArrivalSettlementUpdateToOneWithWhereWithoutPurchaseInput = {
    where?: ArrivalSettlementWhereInput
    data: XOR<ArrivalSettlementUpdateWithoutPurchaseInput, ArrivalSettlementUncheckedUpdateWithoutPurchaseInput>
  }

  export type ArrivalSettlementUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedArrivalSettlementsNestedInput
  }

  export type ArrivalSettlementUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ArrivalCustomPattiUpsertWithoutPurchaseInput = {
    update: XOR<ArrivalCustomPattiUpdateWithoutPurchaseInput, ArrivalCustomPattiUncheckedUpdateWithoutPurchaseInput>
    create: XOR<ArrivalCustomPattiCreateWithoutPurchaseInput, ArrivalCustomPattiUncheckedCreateWithoutPurchaseInput>
    where?: ArrivalCustomPattiWhereInput
  }

  export type ArrivalCustomPattiUpdateToOneWithWhereWithoutPurchaseInput = {
    where?: ArrivalCustomPattiWhereInput
    data: XOR<ArrivalCustomPattiUpdateWithoutPurchaseInput, ArrivalCustomPattiUncheckedUpdateWithoutPurchaseInput>
  }

  export type ArrivalCustomPattiUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedArrivalCustomPattisNestedInput
  }

  export type ArrivalCustomPattiUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleItemUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: SaleItemWhereUniqueInput
    update: XOR<SaleItemUpdateWithoutPurchaseInput, SaleItemUncheckedUpdateWithoutPurchaseInput>
    create: XOR<SaleItemCreateWithoutPurchaseInput, SaleItemUncheckedCreateWithoutPurchaseInput>
  }

  export type SaleItemUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: SaleItemWhereUniqueInput
    data: XOR<SaleItemUpdateWithoutPurchaseInput, SaleItemUncheckedUpdateWithoutPurchaseInput>
  }

  export type SaleItemUpdateManyWithWhereWithoutPurchaseInput = {
    where: SaleItemScalarWhereInput
    data: XOR<SaleItemUpdateManyMutationInput, SaleItemUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type StockSpoilageUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: StockSpoilageWhereUniqueInput
    update: XOR<StockSpoilageUpdateWithoutPurchaseInput, StockSpoilageUncheckedUpdateWithoutPurchaseInput>
    create: XOR<StockSpoilageCreateWithoutPurchaseInput, StockSpoilageUncheckedCreateWithoutPurchaseInput>
  }

  export type StockSpoilageUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: StockSpoilageWhereUniqueInput
    data: XOR<StockSpoilageUpdateWithoutPurchaseInput, StockSpoilageUncheckedUpdateWithoutPurchaseInput>
  }

  export type StockSpoilageUpdateManyWithWhereWithoutPurchaseInput = {
    where: StockSpoilageScalarWhereInput
    data: XOR<StockSpoilageUpdateManyMutationInput, StockSpoilageUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type SaleReturnUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: SaleReturnWhereUniqueInput
    update: XOR<SaleReturnUpdateWithoutPurchaseInput, SaleReturnUncheckedUpdateWithoutPurchaseInput>
    create: XOR<SaleReturnCreateWithoutPurchaseInput, SaleReturnUncheckedCreateWithoutPurchaseInput>
  }

  export type SaleReturnUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: SaleReturnWhereUniqueInput
    data: XOR<SaleReturnUpdateWithoutPurchaseInput, SaleReturnUncheckedUpdateWithoutPurchaseInput>
  }

  export type SaleReturnUpdateManyWithWhereWithoutPurchaseInput = {
    where: SaleReturnScalarWhereInput
    data: XOR<SaleReturnUpdateManyMutationInput, SaleReturnUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type PurchaseReturnUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: PurchaseReturnWhereUniqueInput
    update: XOR<PurchaseReturnUpdateWithoutPurchaseInput, PurchaseReturnUncheckedUpdateWithoutPurchaseInput>
    create: XOR<PurchaseReturnCreateWithoutPurchaseInput, PurchaseReturnUncheckedCreateWithoutPurchaseInput>
  }

  export type PurchaseReturnUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: PurchaseReturnWhereUniqueInput
    data: XOR<PurchaseReturnUpdateWithoutPurchaseInput, PurchaseReturnUncheckedUpdateWithoutPurchaseInput>
  }

  export type PurchaseReturnUpdateManyWithWhereWithoutPurchaseInput = {
    where: PurchaseReturnScalarWhereInput
    data: XOR<PurchaseReturnUpdateManyMutationInput, PurchaseReturnUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type RetailStockUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: RetailStockWhereUniqueInput
    update: XOR<RetailStockUpdateWithoutPurchaseInput, RetailStockUncheckedUpdateWithoutPurchaseInput>
    create: XOR<RetailStockCreateWithoutPurchaseInput, RetailStockUncheckedCreateWithoutPurchaseInput>
  }

  export type RetailStockUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: RetailStockWhereUniqueInput
    data: XOR<RetailStockUpdateWithoutPurchaseInput, RetailStockUncheckedUpdateWithoutPurchaseInput>
  }

  export type RetailStockUpdateManyWithWhereWithoutPurchaseInput = {
    where: RetailStockScalarWhereInput
    data: XOR<RetailStockUpdateManyMutationInput, RetailStockUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type ExpenseUpsertWithWhereUniqueWithoutPurchaseInput = {
    where: ExpenseWhereUniqueInput
    update: XOR<ExpenseUpdateWithoutPurchaseInput, ExpenseUncheckedUpdateWithoutPurchaseInput>
    create: XOR<ExpenseCreateWithoutPurchaseInput, ExpenseUncheckedCreateWithoutPurchaseInput>
  }

  export type ExpenseUpdateWithWhereUniqueWithoutPurchaseInput = {
    where: ExpenseWhereUniqueInput
    data: XOR<ExpenseUpdateWithoutPurchaseInput, ExpenseUncheckedUpdateWithoutPurchaseInput>
  }

  export type ExpenseUpdateManyWithWhereWithoutPurchaseInput = {
    where: ExpenseScalarWhereInput
    data: XOR<ExpenseUpdateManyMutationInput, ExpenseUncheckedUpdateManyWithoutPurchaseInput>
  }

  export type UserUpsertWithoutCreatedPurchasesInput = {
    update: XOR<UserUpdateWithoutCreatedPurchasesInput, UserUncheckedUpdateWithoutCreatedPurchasesInput>
    create: XOR<UserCreateWithoutCreatedPurchasesInput, UserUncheckedCreateWithoutCreatedPurchasesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedPurchasesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedPurchasesInput, UserUncheckedUpdateWithoutCreatedPurchasesInput>
  }

  export type UserUpdateWithoutCreatedPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedPurchasesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateWithoutCreatedShopsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedShopsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedShopsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedShopsInput, UserUncheckedCreateWithoutCreatedShopsInput>
  }

  export type UserUpsertWithoutCreatedShopsInput = {
    update: XOR<UserUpdateWithoutCreatedShopsInput, UserUncheckedUpdateWithoutCreatedShopsInput>
    create: XOR<UserCreateWithoutCreatedShopsInput, UserUncheckedCreateWithoutCreatedShopsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedShopsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedShopsInput, UserUncheckedUpdateWithoutCreatedShopsInput>
  }

  export type UserUpdateWithoutCreatedShopsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedShopsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type CustomerCreateWithoutSalesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    district: DistrictCreateNestedOneWithoutCustomersInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateWithoutSalesInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutSalesInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutSalesInput, CustomerUncheckedCreateWithoutSalesInput>
  }

  export type SaleItemCreateWithoutSaleInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutSaleItemsInput
    saleReturns?: SaleReturnCreateNestedManyWithoutSaleItemInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleItemsInput
  }

  export type SaleItemUncheckedCreateWithoutSaleInput = {
    id?: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutSaleItemInput
  }

  export type SaleItemCreateOrConnectWithoutSaleInput = {
    where: SaleItemWhereUniqueInput
    create: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput>
  }

  export type SaleItemCreateManySaleInputEnvelope = {
    data: SaleItemCreateManySaleInput | SaleItemCreateManySaleInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedSalesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedSalesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedSalesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedSalesInput, UserUncheckedCreateWithoutCreatedSalesInput>
  }

  export type CustomerUpsertWithoutSalesInput = {
    update: XOR<CustomerUpdateWithoutSalesInput, CustomerUncheckedUpdateWithoutSalesInput>
    create: XOR<CustomerCreateWithoutSalesInput, CustomerUncheckedCreateWithoutSalesInput>
    where?: CustomerWhereInput
  }

  export type CustomerUpdateToOneWithWhereWithoutSalesInput = {
    where?: CustomerWhereInput
    data: XOR<CustomerUpdateWithoutSalesInput, CustomerUncheckedUpdateWithoutSalesInput>
  }

  export type CustomerUpdateWithoutSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateWithoutSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type SaleItemUpsertWithWhereUniqueWithoutSaleInput = {
    where: SaleItemWhereUniqueInput
    update: XOR<SaleItemUpdateWithoutSaleInput, SaleItemUncheckedUpdateWithoutSaleInput>
    create: XOR<SaleItemCreateWithoutSaleInput, SaleItemUncheckedCreateWithoutSaleInput>
  }

  export type SaleItemUpdateWithWhereUniqueWithoutSaleInput = {
    where: SaleItemWhereUniqueInput
    data: XOR<SaleItemUpdateWithoutSaleInput, SaleItemUncheckedUpdateWithoutSaleInput>
  }

  export type SaleItemUpdateManyWithWhereWithoutSaleInput = {
    where: SaleItemScalarWhereInput
    data: XOR<SaleItemUpdateManyMutationInput, SaleItemUncheckedUpdateManyWithoutSaleInput>
  }

  export type UserUpsertWithoutCreatedSalesInput = {
    update: XOR<UserUpdateWithoutCreatedSalesInput, UserUncheckedUpdateWithoutCreatedSalesInput>
    create: XOR<UserCreateWithoutCreatedSalesInput, UserUncheckedCreateWithoutCreatedSalesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedSalesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedSalesInput, UserUncheckedUpdateWithoutCreatedSalesInput>
  }

  export type UserUpdateWithoutCreatedSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type SaleCreateWithoutItemsInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    customer?: CustomerCreateNestedOneWithoutSalesInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSalesInput
  }

  export type SaleUncheckedCreateWithoutItemsInput = {
    id?: bigint | number
    invoiceNo: string
    customerId?: bigint | number | null
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SaleCreateOrConnectWithoutItemsInput = {
    where: SaleWhereUniqueInput
    create: XOR<SaleCreateWithoutItemsInput, SaleUncheckedCreateWithoutItemsInput>
  }

  export type PurchaseCreateWithoutSaleItemsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutSaleItemsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutSaleItemsInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutSaleItemsInput, PurchaseUncheckedCreateWithoutSaleItemsInput>
  }

  export type SaleReturnCreateWithoutSaleItemInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    purchase: PurchaseCreateNestedOneWithoutSaleReturnsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleReturnsInput
  }

  export type SaleReturnUncheckedCreateWithoutSaleItemInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnCreateOrConnectWithoutSaleItemInput = {
    where: SaleReturnWhereUniqueInput
    create: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput>
  }

  export type SaleReturnCreateManySaleItemInputEnvelope = {
    data: SaleReturnCreateManySaleItemInput | SaleReturnCreateManySaleItemInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedSaleItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedSaleItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedSaleItemsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedSaleItemsInput, UserUncheckedCreateWithoutCreatedSaleItemsInput>
  }

  export type SaleUpsertWithoutItemsInput = {
    update: XOR<SaleUpdateWithoutItemsInput, SaleUncheckedUpdateWithoutItemsInput>
    create: XOR<SaleCreateWithoutItemsInput, SaleUncheckedCreateWithoutItemsInput>
    where?: SaleWhereInput
  }

  export type SaleUpdateToOneWithWhereWithoutItemsInput = {
    where?: SaleWhereInput
    data: XOR<SaleUpdateWithoutItemsInput, SaleUncheckedUpdateWithoutItemsInput>
  }

  export type SaleUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    customer?: CustomerUpdateOneWithoutSalesNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSalesNestedInput
  }

  export type SaleUncheckedUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseUpsertWithoutSaleItemsInput = {
    update: XOR<PurchaseUpdateWithoutSaleItemsInput, PurchaseUncheckedUpdateWithoutSaleItemsInput>
    create: XOR<PurchaseCreateWithoutSaleItemsInput, PurchaseUncheckedCreateWithoutSaleItemsInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutSaleItemsInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutSaleItemsInput, PurchaseUncheckedUpdateWithoutSaleItemsInput>
  }

  export type PurchaseUpdateWithoutSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type SaleReturnUpsertWithWhereUniqueWithoutSaleItemInput = {
    where: SaleReturnWhereUniqueInput
    update: XOR<SaleReturnUpdateWithoutSaleItemInput, SaleReturnUncheckedUpdateWithoutSaleItemInput>
    create: XOR<SaleReturnCreateWithoutSaleItemInput, SaleReturnUncheckedCreateWithoutSaleItemInput>
  }

  export type SaleReturnUpdateWithWhereUniqueWithoutSaleItemInput = {
    where: SaleReturnWhereUniqueInput
    data: XOR<SaleReturnUpdateWithoutSaleItemInput, SaleReturnUncheckedUpdateWithoutSaleItemInput>
  }

  export type SaleReturnUpdateManyWithWhereWithoutSaleItemInput = {
    where: SaleReturnScalarWhereInput
    data: XOR<SaleReturnUpdateManyMutationInput, SaleReturnUncheckedUpdateManyWithoutSaleItemInput>
  }

  export type UserUpsertWithoutCreatedSaleItemsInput = {
    update: XOR<UserUpdateWithoutCreatedSaleItemsInput, UserUncheckedUpdateWithoutCreatedSaleItemsInput>
    create: XOR<UserCreateWithoutCreatedSaleItemsInput, UserUncheckedCreateWithoutCreatedSaleItemsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedSaleItemsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedSaleItemsInput, UserUncheckedUpdateWithoutCreatedSaleItemsInput>
  }

  export type UserUpdateWithoutCreatedSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type CustomerCreateWithoutCustomerReceiptsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    district: DistrictCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    quotations?: QuotationCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateWithoutCustomerReceiptsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    quotations?: QuotationUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutCustomerReceiptsInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutCustomerReceiptsInput, CustomerUncheckedCreateWithoutCustomerReceiptsInput>
  }

  export type UserCreateWithoutCreatedCustomerReceiptsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedCustomerReceiptsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedCustomerReceiptsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedCustomerReceiptsInput, UserUncheckedCreateWithoutCreatedCustomerReceiptsInput>
  }

  export type CustomerUpsertWithoutCustomerReceiptsInput = {
    update: XOR<CustomerUpdateWithoutCustomerReceiptsInput, CustomerUncheckedUpdateWithoutCustomerReceiptsInput>
    create: XOR<CustomerCreateWithoutCustomerReceiptsInput, CustomerUncheckedCreateWithoutCustomerReceiptsInput>
    where?: CustomerWhereInput
  }

  export type CustomerUpdateToOneWithWhereWithoutCustomerReceiptsInput = {
    where?: CustomerWhereInput
    data: XOR<CustomerUpdateWithoutCustomerReceiptsInput, CustomerUncheckedUpdateWithoutCustomerReceiptsInput>
  }

  export type CustomerUpdateWithoutCustomerReceiptsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateWithoutCustomerReceiptsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type UserUpsertWithoutCreatedCustomerReceiptsInput = {
    update: XOR<UserUpdateWithoutCreatedCustomerReceiptsInput, UserUncheckedUpdateWithoutCreatedCustomerReceiptsInput>
    create: XOR<UserCreateWithoutCreatedCustomerReceiptsInput, UserUncheckedCreateWithoutCreatedCustomerReceiptsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedCustomerReceiptsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedCustomerReceiptsInput, UserUncheckedUpdateWithoutCreatedCustomerReceiptsInput>
  }

  export type UserUpdateWithoutCreatedCustomerReceiptsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedCustomerReceiptsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutExpensesInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutExpensesInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutExpensesInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutExpensesInput, PurchaseUncheckedCreateWithoutExpensesInput>
  }

  export type UserCreateWithoutCreatedExpensesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedExpensesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedExpensesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedExpensesInput, UserUncheckedCreateWithoutCreatedExpensesInput>
  }

  export type PurchaseUpsertWithoutExpensesInput = {
    update: XOR<PurchaseUpdateWithoutExpensesInput, PurchaseUncheckedUpdateWithoutExpensesInput>
    create: XOR<PurchaseCreateWithoutExpensesInput, PurchaseUncheckedCreateWithoutExpensesInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutExpensesInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutExpensesInput, PurchaseUncheckedUpdateWithoutExpensesInput>
  }

  export type PurchaseUpdateWithoutExpensesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutExpensesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedExpensesInput = {
    update: XOR<UserUpdateWithoutCreatedExpensesInput, UserUncheckedUpdateWithoutCreatedExpensesInput>
    create: XOR<UserCreateWithoutCreatedExpensesInput, UserUncheckedCreateWithoutCreatedExpensesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedExpensesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedExpensesInput, UserUncheckedUpdateWithoutCreatedExpensesInput>
  }

  export type UserUpdateWithoutCreatedExpensesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedExpensesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateWithoutForgotPasswordInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutForgotPasswordInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutForgotPasswordInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutForgotPasswordInput, UserUncheckedCreateWithoutForgotPasswordInput>
  }

  export type UserUpsertWithoutForgotPasswordInput = {
    update: XOR<UserUpdateWithoutForgotPasswordInput, UserUncheckedUpdateWithoutForgotPasswordInput>
    create: XOR<UserCreateWithoutForgotPasswordInput, UserUncheckedCreateWithoutForgotPasswordInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutForgotPasswordInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutForgotPasswordInput, UserUncheckedUpdateWithoutForgotPasswordInput>
  }

  export type UserUpdateWithoutForgotPasswordInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutForgotPasswordInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutStockSpoilagesInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutStockSpoilagesInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutStockSpoilagesInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutStockSpoilagesInput, PurchaseUncheckedCreateWithoutStockSpoilagesInput>
  }

  export type UserCreateWithoutCreatedStockSpoilagesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedStockSpoilagesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedStockSpoilagesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedStockSpoilagesInput, UserUncheckedCreateWithoutCreatedStockSpoilagesInput>
  }

  export type PurchaseUpsertWithoutStockSpoilagesInput = {
    update: XOR<PurchaseUpdateWithoutStockSpoilagesInput, PurchaseUncheckedUpdateWithoutStockSpoilagesInput>
    create: XOR<PurchaseCreateWithoutStockSpoilagesInput, PurchaseUncheckedCreateWithoutStockSpoilagesInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutStockSpoilagesInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutStockSpoilagesInput, PurchaseUncheckedUpdateWithoutStockSpoilagesInput>
  }

  export type PurchaseUpdateWithoutStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedStockSpoilagesInput = {
    update: XOR<UserUpdateWithoutCreatedStockSpoilagesInput, UserUncheckedUpdateWithoutCreatedStockSpoilagesInput>
    create: XOR<UserCreateWithoutCreatedStockSpoilagesInput, UserUncheckedCreateWithoutCreatedStockSpoilagesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedStockSpoilagesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedStockSpoilagesInput, UserUncheckedUpdateWithoutCreatedStockSpoilagesInput>
  }

  export type UserUpdateWithoutCreatedStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type SaleItemCreateWithoutSaleReturnsInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    sale: SaleCreateNestedOneWithoutItemsInput
    purchase: PurchaseCreateNestedOneWithoutSaleItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSaleItemsInput
  }

  export type SaleItemUncheckedCreateWithoutSaleReturnsInput = {
    id?: bigint | number
    saleId: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleItemCreateOrConnectWithoutSaleReturnsInput = {
    where: SaleItemWhereUniqueInput
    create: XOR<SaleItemCreateWithoutSaleReturnsInput, SaleItemUncheckedCreateWithoutSaleReturnsInput>
  }

  export type PurchaseCreateWithoutSaleReturnsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutSaleReturnsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutSaleReturnsInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutSaleReturnsInput, PurchaseUncheckedCreateWithoutSaleReturnsInput>
  }

  export type UserCreateWithoutCreatedSaleReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedSaleReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedSaleReturnsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedSaleReturnsInput, UserUncheckedCreateWithoutCreatedSaleReturnsInput>
  }

  export type SaleItemUpsertWithoutSaleReturnsInput = {
    update: XOR<SaleItemUpdateWithoutSaleReturnsInput, SaleItemUncheckedUpdateWithoutSaleReturnsInput>
    create: XOR<SaleItemCreateWithoutSaleReturnsInput, SaleItemUncheckedCreateWithoutSaleReturnsInput>
    where?: SaleItemWhereInput
  }

  export type SaleItemUpdateToOneWithWhereWithoutSaleReturnsInput = {
    where?: SaleItemWhereInput
    data: XOR<SaleItemUpdateWithoutSaleReturnsInput, SaleItemUncheckedUpdateWithoutSaleReturnsInput>
  }

  export type SaleItemUpdateWithoutSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    sale?: SaleUpdateOneRequiredWithoutItemsNestedInput
    purchase?: PurchaseUpdateOneRequiredWithoutSaleItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleItemsNestedInput
  }

  export type SaleItemUncheckedUpdateWithoutSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseUpsertWithoutSaleReturnsInput = {
    update: XOR<PurchaseUpdateWithoutSaleReturnsInput, PurchaseUncheckedUpdateWithoutSaleReturnsInput>
    create: XOR<PurchaseCreateWithoutSaleReturnsInput, PurchaseUncheckedCreateWithoutSaleReturnsInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutSaleReturnsInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutSaleReturnsInput, PurchaseUncheckedUpdateWithoutSaleReturnsInput>
  }

  export type PurchaseUpdateWithoutSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedSaleReturnsInput = {
    update: XOR<UserUpdateWithoutCreatedSaleReturnsInput, UserUncheckedUpdateWithoutCreatedSaleReturnsInput>
    create: XOR<UserCreateWithoutCreatedSaleReturnsInput, UserUncheckedCreateWithoutCreatedSaleReturnsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedSaleReturnsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedSaleReturnsInput, UserUncheckedUpdateWithoutCreatedSaleReturnsInput>
  }

  export type UserUpdateWithoutCreatedSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedSaleReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutArrivalSettlementInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutArrivalSettlementInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutArrivalSettlementInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutArrivalSettlementInput, PurchaseUncheckedCreateWithoutArrivalSettlementInput>
  }

  export type UserCreateWithoutCreatedArrivalSettlementsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedArrivalSettlementsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedArrivalSettlementsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedArrivalSettlementsInput, UserUncheckedCreateWithoutCreatedArrivalSettlementsInput>
  }

  export type PurchaseUpsertWithoutArrivalSettlementInput = {
    update: XOR<PurchaseUpdateWithoutArrivalSettlementInput, PurchaseUncheckedUpdateWithoutArrivalSettlementInput>
    create: XOR<PurchaseCreateWithoutArrivalSettlementInput, PurchaseUncheckedCreateWithoutArrivalSettlementInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutArrivalSettlementInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutArrivalSettlementInput, PurchaseUncheckedUpdateWithoutArrivalSettlementInput>
  }

  export type PurchaseUpdateWithoutArrivalSettlementInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutArrivalSettlementInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedArrivalSettlementsInput = {
    update: XOR<UserUpdateWithoutCreatedArrivalSettlementsInput, UserUncheckedUpdateWithoutCreatedArrivalSettlementsInput>
    create: XOR<UserCreateWithoutCreatedArrivalSettlementsInput, UserUncheckedCreateWithoutCreatedArrivalSettlementsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedArrivalSettlementsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedArrivalSettlementsInput, UserUncheckedUpdateWithoutCreatedArrivalSettlementsInput>
  }

  export type UserUpdateWithoutCreatedArrivalSettlementsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedArrivalSettlementsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutArrivalCustomPattiInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutArrivalCustomPattiInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutArrivalCustomPattiInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutArrivalCustomPattiInput, PurchaseUncheckedCreateWithoutArrivalCustomPattiInput>
  }

  export type UserCreateWithoutCreatedArrivalCustomPattisInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedArrivalCustomPattisInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedArrivalCustomPattisInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedArrivalCustomPattisInput, UserUncheckedCreateWithoutCreatedArrivalCustomPattisInput>
  }

  export type PurchaseUpsertWithoutArrivalCustomPattiInput = {
    update: XOR<PurchaseUpdateWithoutArrivalCustomPattiInput, PurchaseUncheckedUpdateWithoutArrivalCustomPattiInput>
    create: XOR<PurchaseCreateWithoutArrivalCustomPattiInput, PurchaseUncheckedCreateWithoutArrivalCustomPattiInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutArrivalCustomPattiInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutArrivalCustomPattiInput, PurchaseUncheckedUpdateWithoutArrivalCustomPattiInput>
  }

  export type PurchaseUpdateWithoutArrivalCustomPattiInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutArrivalCustomPattiInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedArrivalCustomPattisInput = {
    update: XOR<UserUpdateWithoutCreatedArrivalCustomPattisInput, UserUncheckedUpdateWithoutCreatedArrivalCustomPattisInput>
    create: XOR<UserCreateWithoutCreatedArrivalCustomPattisInput, UserUncheckedCreateWithoutCreatedArrivalCustomPattisInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedArrivalCustomPattisInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedArrivalCustomPattisInput, UserUncheckedUpdateWithoutCreatedArrivalCustomPattisInput>
  }

  export type UserUpdateWithoutCreatedArrivalCustomPattisInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedArrivalCustomPattisInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type CustomerCreateWithoutQuotationsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutCustomersInput
    district: DistrictCreateNestedOneWithoutCustomersInput
    sales?: SaleCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptCreateNestedManyWithoutCustomerInput
    createdByUser?: UserCreateNestedOneWithoutCreatedCustomersInput
  }

  export type CustomerUncheckedCreateWithoutQuotationsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    sales?: SaleUncheckedCreateNestedManyWithoutCustomerInput
    customerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCustomerInput
  }

  export type CustomerCreateOrConnectWithoutQuotationsInput = {
    where: CustomerWhereUniqueInput
    create: XOR<CustomerCreateWithoutQuotationsInput, CustomerUncheckedCreateWithoutQuotationsInput>
  }

  export type QuotationItemCreateWithoutQuotationInput = {
    id?: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    vegetable?: VegetableCreateNestedOneWithoutQuotationItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationItemsInput
  }

  export type QuotationItemUncheckedCreateWithoutQuotationInput = {
    id?: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationItemCreateOrConnectWithoutQuotationInput = {
    where: QuotationItemWhereUniqueInput
    create: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput>
  }

  export type QuotationItemCreateManyQuotationInputEnvelope = {
    data: QuotationItemCreateManyQuotationInput | QuotationItemCreateManyQuotationInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedQuotationsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedQuotationsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedQuotationsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedQuotationsInput, UserUncheckedCreateWithoutCreatedQuotationsInput>
  }

  export type CustomerUpsertWithoutQuotationsInput = {
    update: XOR<CustomerUpdateWithoutQuotationsInput, CustomerUncheckedUpdateWithoutQuotationsInput>
    create: XOR<CustomerCreateWithoutQuotationsInput, CustomerUncheckedCreateWithoutQuotationsInput>
    where?: CustomerWhereInput
  }

  export type CustomerUpdateToOneWithWhereWithoutQuotationsInput = {
    where?: CustomerWhereInput
    data: XOR<CustomerUpdateWithoutQuotationsInput, CustomerUncheckedUpdateWithoutQuotationsInput>
  }

  export type CustomerUpdateWithoutQuotationsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateWithoutQuotationsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type QuotationItemUpsertWithWhereUniqueWithoutQuotationInput = {
    where: QuotationItemWhereUniqueInput
    update: XOR<QuotationItemUpdateWithoutQuotationInput, QuotationItemUncheckedUpdateWithoutQuotationInput>
    create: XOR<QuotationItemCreateWithoutQuotationInput, QuotationItemUncheckedCreateWithoutQuotationInput>
  }

  export type QuotationItemUpdateWithWhereUniqueWithoutQuotationInput = {
    where: QuotationItemWhereUniqueInput
    data: XOR<QuotationItemUpdateWithoutQuotationInput, QuotationItemUncheckedUpdateWithoutQuotationInput>
  }

  export type QuotationItemUpdateManyWithWhereWithoutQuotationInput = {
    where: QuotationItemScalarWhereInput
    data: XOR<QuotationItemUpdateManyMutationInput, QuotationItemUncheckedUpdateManyWithoutQuotationInput>
  }

  export type UserUpsertWithoutCreatedQuotationsInput = {
    update: XOR<UserUpdateWithoutCreatedQuotationsInput, UserUncheckedUpdateWithoutCreatedQuotationsInput>
    create: XOR<UserCreateWithoutCreatedQuotationsInput, UserUncheckedCreateWithoutCreatedQuotationsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedQuotationsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedQuotationsInput, UserUncheckedUpdateWithoutCreatedQuotationsInput>
  }

  export type UserUpdateWithoutCreatedQuotationsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedQuotationsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type QuotationCreateWithoutItemsInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    customer?: CustomerCreateNestedOneWithoutQuotationsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedQuotationsInput
  }

  export type QuotationUncheckedCreateWithoutItemsInput = {
    id?: bigint | number
    quotationNo: string
    customerId?: bigint | number | null
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationCreateOrConnectWithoutItemsInput = {
    where: QuotationWhereUniqueInput
    create: XOR<QuotationCreateWithoutItemsInput, QuotationUncheckedCreateWithoutItemsInput>
  }

  export type VegetableCreateWithoutQuotationItemsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    purchases?: PurchaseCreateNestedManyWithoutVegetableInput
    createdByUser?: UserCreateNestedOneWithoutCreatedVegetablesInput
  }

  export type VegetableUncheckedCreateWithoutQuotationItemsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutVegetableInput
  }

  export type VegetableCreateOrConnectWithoutQuotationItemsInput = {
    where: VegetableWhereUniqueInput
    create: XOR<VegetableCreateWithoutQuotationItemsInput, VegetableUncheckedCreateWithoutQuotationItemsInput>
  }

  export type UserCreateWithoutCreatedQuotationItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedQuotationItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedQuotationItemsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedQuotationItemsInput, UserUncheckedCreateWithoutCreatedQuotationItemsInput>
  }

  export type QuotationUpsertWithoutItemsInput = {
    update: XOR<QuotationUpdateWithoutItemsInput, QuotationUncheckedUpdateWithoutItemsInput>
    create: XOR<QuotationCreateWithoutItemsInput, QuotationUncheckedCreateWithoutItemsInput>
    where?: QuotationWhereInput
  }

  export type QuotationUpdateToOneWithWhereWithoutItemsInput = {
    where?: QuotationWhereInput
    data: XOR<QuotationUpdateWithoutItemsInput, QuotationUncheckedUpdateWithoutItemsInput>
  }

  export type QuotationUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customer?: CustomerUpdateOneWithoutQuotationsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationsNestedInput
  }

  export type QuotationUncheckedUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type VegetableUpsertWithoutQuotationItemsInput = {
    update: XOR<VegetableUpdateWithoutQuotationItemsInput, VegetableUncheckedUpdateWithoutQuotationItemsInput>
    create: XOR<VegetableCreateWithoutQuotationItemsInput, VegetableUncheckedCreateWithoutQuotationItemsInput>
    where?: VegetableWhereInput
  }

  export type VegetableUpdateToOneWithWhereWithoutQuotationItemsInput = {
    where?: VegetableWhereInput
    data: XOR<VegetableUpdateWithoutQuotationItemsInput, VegetableUncheckedUpdateWithoutQuotationItemsInput>
  }

  export type VegetableUpdateWithoutQuotationItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    purchases?: PurchaseUpdateManyWithoutVegetableNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedVegetablesNestedInput
  }

  export type VegetableUncheckedUpdateWithoutQuotationItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutVegetableNestedInput
  }

  export type UserUpsertWithoutCreatedQuotationItemsInput = {
    update: XOR<UserUpdateWithoutCreatedQuotationItemsInput, UserUncheckedUpdateWithoutCreatedQuotationItemsInput>
    create: XOR<UserCreateWithoutCreatedQuotationItemsInput, UserUncheckedCreateWithoutCreatedQuotationItemsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedQuotationItemsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedQuotationItemsInput, UserUncheckedUpdateWithoutCreatedQuotationItemsInput>
  }

  export type UserUpdateWithoutCreatedQuotationItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedQuotationItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutPurchaseReturnsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutPurchaseReturnsInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    retailStocks?: RetailStockUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutPurchaseReturnsInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutPurchaseReturnsInput, PurchaseUncheckedCreateWithoutPurchaseReturnsInput>
  }

  export type UserCreateWithoutCreatedPurchaseReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedPurchaseReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedPurchaseReturnsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedPurchaseReturnsInput, UserUncheckedCreateWithoutCreatedPurchaseReturnsInput>
  }

  export type PurchaseUpsertWithoutPurchaseReturnsInput = {
    update: XOR<PurchaseUpdateWithoutPurchaseReturnsInput, PurchaseUncheckedUpdateWithoutPurchaseReturnsInput>
    create: XOR<PurchaseCreateWithoutPurchaseReturnsInput, PurchaseUncheckedCreateWithoutPurchaseReturnsInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutPurchaseReturnsInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutPurchaseReturnsInput, PurchaseUncheckedUpdateWithoutPurchaseReturnsInput>
  }

  export type PurchaseUpdateWithoutPurchaseReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutPurchaseReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type UserUpsertWithoutCreatedPurchaseReturnsInput = {
    update: XOR<UserUpdateWithoutCreatedPurchaseReturnsInput, UserUncheckedUpdateWithoutCreatedPurchaseReturnsInput>
    create: XOR<UserCreateWithoutCreatedPurchaseReturnsInput, UserUncheckedCreateWithoutCreatedPurchaseReturnsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedPurchaseReturnsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedPurchaseReturnsInput, UserUncheckedUpdateWithoutCreatedPurchaseReturnsInput>
  }

  export type UserUpdateWithoutCreatedPurchaseReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedPurchaseReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type PurchaseCreateWithoutRetailStocksInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    supplier?: SupplierCreateNestedOneWithoutPurchasesInput
    vegetable: VegetableCreateNestedOneWithoutPurchasesInput
    arrivalSettlement?: ArrivalSettlementCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseCreateNestedManyWithoutPurchaseInput
    createdByUser?: UserCreateNestedOneWithoutCreatedPurchasesInput
  }

  export type PurchaseUncheckedCreateWithoutRetailStocksInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedCreateNestedOneWithoutPurchaseInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedCreateNestedOneWithoutPurchaseInput
    saleItems?: SaleItemUncheckedCreateNestedManyWithoutPurchaseInput
    stockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutPurchaseInput
    saleReturns?: SaleReturnUncheckedCreateNestedManyWithoutPurchaseInput
    purchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutPurchaseInput
    expenses?: ExpenseUncheckedCreateNestedManyWithoutPurchaseInput
  }

  export type PurchaseCreateOrConnectWithoutRetailStocksInput = {
    where: PurchaseWhereUniqueInput
    create: XOR<PurchaseCreateWithoutRetailStocksInput, PurchaseUncheckedCreateWithoutRetailStocksInput>
  }

  export type RetailSaleItemCreateWithoutRetailStockInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    retailSale: RetailSaleCreateNestedOneWithoutItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailSaleItemsInput
  }

  export type RetailSaleItemUncheckedCreateWithoutRetailStockInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemCreateOrConnectWithoutRetailStockInput = {
    where: RetailSaleItemWhereUniqueInput
    create: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailSaleItemCreateManyRetailStockInputEnvelope = {
    data: RetailSaleItemCreateManyRetailStockInput | RetailSaleItemCreateManyRetailStockInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockSpoilageCreateWithoutRetailStockInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStockSpoilagesInput
  }

  export type RetailStockSpoilageUncheckedCreateWithoutRetailStockInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockSpoilageCreateOrConnectWithoutRetailStockInput = {
    where: RetailStockSpoilageWhereUniqueInput
    create: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailStockSpoilageCreateManyRetailStockInputEnvelope = {
    data: RetailStockSpoilageCreateManyRetailStockInput | RetailStockSpoilageCreateManyRetailStockInput[]
    skipDuplicates?: boolean
  }

  export type RetailStockReturnCreateWithoutRetailStockInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStockReturnsInput
  }

  export type RetailStockReturnUncheckedCreateWithoutRetailStockInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockReturnCreateOrConnectWithoutRetailStockInput = {
    where: RetailStockReturnWhereUniqueInput
    create: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailStockReturnCreateManyRetailStockInputEnvelope = {
    data: RetailStockReturnCreateManyRetailStockInput | RetailStockReturnCreateManyRetailStockInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedRetailStocksInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedRetailStocksInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedRetailStocksInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedRetailStocksInput, UserUncheckedCreateWithoutCreatedRetailStocksInput>
  }

  export type PurchaseUpsertWithoutRetailStocksInput = {
    update: XOR<PurchaseUpdateWithoutRetailStocksInput, PurchaseUncheckedUpdateWithoutRetailStocksInput>
    create: XOR<PurchaseCreateWithoutRetailStocksInput, PurchaseUncheckedCreateWithoutRetailStocksInput>
    where?: PurchaseWhereInput
  }

  export type PurchaseUpdateToOneWithWhereWithoutRetailStocksInput = {
    where?: PurchaseWhereInput
    data: XOR<PurchaseUpdateWithoutRetailStocksInput, PurchaseUncheckedUpdateWithoutRetailStocksInput>
  }

  export type PurchaseUpdateWithoutRetailStocksInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutRetailStocksInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type RetailSaleItemUpsertWithWhereUniqueWithoutRetailStockInput = {
    where: RetailSaleItemWhereUniqueInput
    update: XOR<RetailSaleItemUpdateWithoutRetailStockInput, RetailSaleItemUncheckedUpdateWithoutRetailStockInput>
    create: XOR<RetailSaleItemCreateWithoutRetailStockInput, RetailSaleItemUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailSaleItemUpdateWithWhereUniqueWithoutRetailStockInput = {
    where: RetailSaleItemWhereUniqueInput
    data: XOR<RetailSaleItemUpdateWithoutRetailStockInput, RetailSaleItemUncheckedUpdateWithoutRetailStockInput>
  }

  export type RetailSaleItemUpdateManyWithWhereWithoutRetailStockInput = {
    where: RetailSaleItemScalarWhereInput
    data: XOR<RetailSaleItemUpdateManyMutationInput, RetailSaleItemUncheckedUpdateManyWithoutRetailStockInput>
  }

  export type RetailStockSpoilageUpsertWithWhereUniqueWithoutRetailStockInput = {
    where: RetailStockSpoilageWhereUniqueInput
    update: XOR<RetailStockSpoilageUpdateWithoutRetailStockInput, RetailStockSpoilageUncheckedUpdateWithoutRetailStockInput>
    create: XOR<RetailStockSpoilageCreateWithoutRetailStockInput, RetailStockSpoilageUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailStockSpoilageUpdateWithWhereUniqueWithoutRetailStockInput = {
    where: RetailStockSpoilageWhereUniqueInput
    data: XOR<RetailStockSpoilageUpdateWithoutRetailStockInput, RetailStockSpoilageUncheckedUpdateWithoutRetailStockInput>
  }

  export type RetailStockSpoilageUpdateManyWithWhereWithoutRetailStockInput = {
    where: RetailStockSpoilageScalarWhereInput
    data: XOR<RetailStockSpoilageUpdateManyMutationInput, RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockInput>
  }

  export type RetailStockReturnUpsertWithWhereUniqueWithoutRetailStockInput = {
    where: RetailStockReturnWhereUniqueInput
    update: XOR<RetailStockReturnUpdateWithoutRetailStockInput, RetailStockReturnUncheckedUpdateWithoutRetailStockInput>
    create: XOR<RetailStockReturnCreateWithoutRetailStockInput, RetailStockReturnUncheckedCreateWithoutRetailStockInput>
  }

  export type RetailStockReturnUpdateWithWhereUniqueWithoutRetailStockInput = {
    where: RetailStockReturnWhereUniqueInput
    data: XOR<RetailStockReturnUpdateWithoutRetailStockInput, RetailStockReturnUncheckedUpdateWithoutRetailStockInput>
  }

  export type RetailStockReturnUpdateManyWithWhereWithoutRetailStockInput = {
    where: RetailStockReturnScalarWhereInput
    data: XOR<RetailStockReturnUpdateManyMutationInput, RetailStockReturnUncheckedUpdateManyWithoutRetailStockInput>
  }

  export type UserUpsertWithoutCreatedRetailStocksInput = {
    update: XOR<UserUpdateWithoutCreatedRetailStocksInput, UserUncheckedUpdateWithoutCreatedRetailStocksInput>
    create: XOR<UserCreateWithoutCreatedRetailStocksInput, UserUncheckedCreateWithoutCreatedRetailStocksInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedRetailStocksInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedRetailStocksInput, UserUncheckedUpdateWithoutCreatedRetailStocksInput>
  }

  export type UserUpdateWithoutCreatedRetailStocksInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedRetailStocksInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type RetailStockCreateWithoutRetailStockReturnsInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchase: PurchaseCreateNestedOneWithoutRetailStocksInput
    retailSaleItems?: RetailSaleItemCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutRetailStockInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStocksInput
  }

  export type RetailStockUncheckedCreateWithoutRetailStockReturnsInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockCreateOrConnectWithoutRetailStockReturnsInput = {
    where: RetailStockWhereUniqueInput
    create: XOR<RetailStockCreateWithoutRetailStockReturnsInput, RetailStockUncheckedCreateWithoutRetailStockReturnsInput>
  }

  export type UserCreateWithoutCreatedRetailStockReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedRetailStockReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedRetailStockReturnsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedRetailStockReturnsInput, UserUncheckedCreateWithoutCreatedRetailStockReturnsInput>
  }

  export type RetailStockUpsertWithoutRetailStockReturnsInput = {
    update: XOR<RetailStockUpdateWithoutRetailStockReturnsInput, RetailStockUncheckedUpdateWithoutRetailStockReturnsInput>
    create: XOR<RetailStockCreateWithoutRetailStockReturnsInput, RetailStockUncheckedCreateWithoutRetailStockReturnsInput>
    where?: RetailStockWhereInput
  }

  export type RetailStockUpdateToOneWithWhereWithoutRetailStockReturnsInput = {
    where?: RetailStockWhereInput
    data: XOR<RetailStockUpdateWithoutRetailStockReturnsInput, RetailStockUncheckedUpdateWithoutRetailStockReturnsInput>
  }

  export type RetailStockUpdateWithoutRetailStockReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchase?: PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput
    retailSaleItems?: RetailSaleItemUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStocksNestedInput
  }

  export type RetailStockUncheckedUpdateWithoutRetailStockReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type UserUpsertWithoutCreatedRetailStockReturnsInput = {
    update: XOR<UserUpdateWithoutCreatedRetailStockReturnsInput, UserUncheckedUpdateWithoutCreatedRetailStockReturnsInput>
    create: XOR<UserCreateWithoutCreatedRetailStockReturnsInput, UserUncheckedCreateWithoutCreatedRetailStockReturnsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedRetailStockReturnsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedRetailStockReturnsInput, UserUncheckedUpdateWithoutCreatedRetailStockReturnsInput>
  }

  export type UserUpdateWithoutCreatedRetailStockReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedRetailStockReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type RetailSaleItemCreateWithoutRetailSaleInput = {
    id?: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    retailStock: RetailStockCreateNestedOneWithoutRetailSaleItemsInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailSaleItemsInput
  }

  export type RetailSaleItemUncheckedCreateWithoutRetailSaleInput = {
    id?: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemCreateOrConnectWithoutRetailSaleInput = {
    where: RetailSaleItemWhereUniqueInput
    create: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput>
  }

  export type RetailSaleItemCreateManyRetailSaleInputEnvelope = {
    data: RetailSaleItemCreateManyRetailSaleInput | RetailSaleItemCreateManyRetailSaleInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedRetailSalesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedRetailSalesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedRetailSalesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedRetailSalesInput, UserUncheckedCreateWithoutCreatedRetailSalesInput>
  }

  export type RetailSaleItemUpsertWithWhereUniqueWithoutRetailSaleInput = {
    where: RetailSaleItemWhereUniqueInput
    update: XOR<RetailSaleItemUpdateWithoutRetailSaleInput, RetailSaleItemUncheckedUpdateWithoutRetailSaleInput>
    create: XOR<RetailSaleItemCreateWithoutRetailSaleInput, RetailSaleItemUncheckedCreateWithoutRetailSaleInput>
  }

  export type RetailSaleItemUpdateWithWhereUniqueWithoutRetailSaleInput = {
    where: RetailSaleItemWhereUniqueInput
    data: XOR<RetailSaleItemUpdateWithoutRetailSaleInput, RetailSaleItemUncheckedUpdateWithoutRetailSaleInput>
  }

  export type RetailSaleItemUpdateManyWithWhereWithoutRetailSaleInput = {
    where: RetailSaleItemScalarWhereInput
    data: XOR<RetailSaleItemUpdateManyMutationInput, RetailSaleItemUncheckedUpdateManyWithoutRetailSaleInput>
  }

  export type UserUpsertWithoutCreatedRetailSalesInput = {
    update: XOR<UserUpdateWithoutCreatedRetailSalesInput, UserUncheckedUpdateWithoutCreatedRetailSalesInput>
    create: XOR<UserCreateWithoutCreatedRetailSalesInput, UserUncheckedCreateWithoutCreatedRetailSalesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedRetailSalesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedRetailSalesInput, UserUncheckedUpdateWithoutCreatedRetailSalesInput>
  }

  export type UserUpdateWithoutCreatedRetailSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedRetailSalesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type RetailSaleCreateWithoutItemsInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailSalesInput
  }

  export type RetailSaleUncheckedCreateWithoutItemsInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type RetailSaleCreateOrConnectWithoutItemsInput = {
    where: RetailSaleWhereUniqueInput
    create: XOR<RetailSaleCreateWithoutItemsInput, RetailSaleUncheckedCreateWithoutItemsInput>
  }

  export type RetailStockCreateWithoutRetailSaleItemsInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchase: PurchaseCreateNestedOneWithoutRetailStocksInput
    retailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnCreateNestedManyWithoutRetailStockInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStocksInput
  }

  export type RetailStockUncheckedCreateWithoutRetailSaleItemsInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    retailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockCreateOrConnectWithoutRetailSaleItemsInput = {
    where: RetailStockWhereUniqueInput
    create: XOR<RetailStockCreateWithoutRetailSaleItemsInput, RetailStockUncheckedCreateWithoutRetailSaleItemsInput>
  }

  export type UserCreateWithoutCreatedRetailSaleItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedRetailSaleItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedRetailSaleItemsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedRetailSaleItemsInput, UserUncheckedCreateWithoutCreatedRetailSaleItemsInput>
  }

  export type RetailSaleUpsertWithoutItemsInput = {
    update: XOR<RetailSaleUpdateWithoutItemsInput, RetailSaleUncheckedUpdateWithoutItemsInput>
    create: XOR<RetailSaleCreateWithoutItemsInput, RetailSaleUncheckedCreateWithoutItemsInput>
    where?: RetailSaleWhereInput
  }

  export type RetailSaleUpdateToOneWithWhereWithoutItemsInput = {
    where?: RetailSaleWhereInput
    data: XOR<RetailSaleUpdateWithoutItemsInput, RetailSaleUncheckedUpdateWithoutItemsInput>
  }

  export type RetailSaleUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdByUser?: UserUpdateOneWithoutCreatedRetailSalesNestedInput
  }

  export type RetailSaleUncheckedUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockUpsertWithoutRetailSaleItemsInput = {
    update: XOR<RetailStockUpdateWithoutRetailSaleItemsInput, RetailStockUncheckedUpdateWithoutRetailSaleItemsInput>
    create: XOR<RetailStockCreateWithoutRetailSaleItemsInput, RetailStockUncheckedCreateWithoutRetailSaleItemsInput>
    where?: RetailStockWhereInput
  }

  export type RetailStockUpdateToOneWithWhereWithoutRetailSaleItemsInput = {
    where?: RetailStockWhereInput
    data: XOR<RetailStockUpdateWithoutRetailSaleItemsInput, RetailStockUncheckedUpdateWithoutRetailSaleItemsInput>
  }

  export type RetailStockUpdateWithoutRetailSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchase?: PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput
    retailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUpdateManyWithoutRetailStockNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStocksNestedInput
  }

  export type RetailStockUncheckedUpdateWithoutRetailSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    retailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type UserUpsertWithoutCreatedRetailSaleItemsInput = {
    update: XOR<UserUpdateWithoutCreatedRetailSaleItemsInput, UserUncheckedUpdateWithoutCreatedRetailSaleItemsInput>
    create: XOR<UserCreateWithoutCreatedRetailSaleItemsInput, UserUncheckedCreateWithoutCreatedRetailSaleItemsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedRetailSaleItemsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedRetailSaleItemsInput, UserUncheckedUpdateWithoutCreatedRetailSaleItemsInput>
  }

  export type UserUpdateWithoutCreatedRetailSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedRetailSaleItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type RetailStockCreateWithoutRetailStockSpoilagesInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    purchase: PurchaseCreateNestedOneWithoutRetailStocksInput
    retailSaleItems?: RetailSaleItemCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnCreateNestedManyWithoutRetailStockInput
    createdByUser?: UserCreateNestedOneWithoutCreatedRetailStocksInput
  }

  export type RetailStockUncheckedCreateWithoutRetailStockSpoilagesInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutRetailStockInput
    retailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutRetailStockInput
  }

  export type RetailStockCreateOrConnectWithoutRetailStockSpoilagesInput = {
    where: RetailStockWhereUniqueInput
    create: XOR<RetailStockCreateWithoutRetailStockSpoilagesInput, RetailStockUncheckedCreateWithoutRetailStockSpoilagesInput>
  }

  export type UserCreateWithoutCreatedRetailStockSpoilagesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedRetailStockSpoilagesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedRetailStockSpoilagesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedCreateWithoutCreatedRetailStockSpoilagesInput>
  }

  export type RetailStockUpsertWithoutRetailStockSpoilagesInput = {
    update: XOR<RetailStockUpdateWithoutRetailStockSpoilagesInput, RetailStockUncheckedUpdateWithoutRetailStockSpoilagesInput>
    create: XOR<RetailStockCreateWithoutRetailStockSpoilagesInput, RetailStockUncheckedCreateWithoutRetailStockSpoilagesInput>
    where?: RetailStockWhereInput
  }

  export type RetailStockUpdateToOneWithWhereWithoutRetailStockSpoilagesInput = {
    where?: RetailStockWhereInput
    data: XOR<RetailStockUpdateWithoutRetailStockSpoilagesInput, RetailStockUncheckedUpdateWithoutRetailStockSpoilagesInput>
  }

  export type RetailStockUpdateWithoutRetailStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchase?: PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput
    retailSaleItems?: RetailSaleItemUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUpdateManyWithoutRetailStockNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStocksNestedInput
  }

  export type RetailStockUncheckedUpdateWithoutRetailStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type UserUpsertWithoutCreatedRetailStockSpoilagesInput = {
    update: XOR<UserUpdateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedUpdateWithoutCreatedRetailStockSpoilagesInput>
    create: XOR<UserCreateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedCreateWithoutCreatedRetailStockSpoilagesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedRetailStockSpoilagesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedRetailStockSpoilagesInput, UserUncheckedUpdateWithoutCreatedRetailStockSpoilagesInput>
  }

  export type UserUpdateWithoutCreatedRetailStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedRetailStockSpoilagesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type SupplierCreateWithoutBoxReturnsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    state: StateCreateNestedOneWithoutSuppliersInput
    district: DistrictCreateNestedOneWithoutSuppliersInput
    purchases?: PurchaseCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentCreateNestedManyWithoutSupplierInput
    createdByUser?: UserCreateNestedOneWithoutCreatedSuppliersInput
  }

  export type SupplierUncheckedCreateWithoutBoxReturnsInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
    purchases?: PurchaseUncheckedCreateNestedManyWithoutSupplierInput
    supplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutSupplierInput
  }

  export type SupplierCreateOrConnectWithoutBoxReturnsInput = {
    where: SupplierWhereUniqueInput
    create: XOR<SupplierCreateWithoutBoxReturnsInput, SupplierUncheckedCreateWithoutBoxReturnsInput>
  }

  export type UserCreateWithoutCreatedBoxReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedBoxReturnsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedBoxReturnsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedBoxReturnsInput, UserUncheckedCreateWithoutCreatedBoxReturnsInput>
  }

  export type SupplierUpsertWithoutBoxReturnsInput = {
    update: XOR<SupplierUpdateWithoutBoxReturnsInput, SupplierUncheckedUpdateWithoutBoxReturnsInput>
    create: XOR<SupplierCreateWithoutBoxReturnsInput, SupplierUncheckedCreateWithoutBoxReturnsInput>
    where?: SupplierWhereInput
  }

  export type SupplierUpdateToOneWithWhereWithoutBoxReturnsInput = {
    where?: SupplierWhereInput
    data: XOR<SupplierUpdateWithoutBoxReturnsInput, SupplierUncheckedUpdateWithoutBoxReturnsInput>
  }

  export type SupplierUpdateWithoutBoxReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateWithoutBoxReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type UserUpsertWithoutCreatedBoxReturnsInput = {
    update: XOR<UserUpdateWithoutCreatedBoxReturnsInput, UserUncheckedUpdateWithoutCreatedBoxReturnsInput>
    create: XOR<UserCreateWithoutCreatedBoxReturnsInput, UserUncheckedCreateWithoutCreatedBoxReturnsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedBoxReturnsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedBoxReturnsInput, UserUncheckedUpdateWithoutCreatedBoxReturnsInput>
  }

  export type UserUpdateWithoutCreatedBoxReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedBoxReturnsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type AttendanceCreateWithoutEmployeeInput = {
    id?: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedAttendancesInput
  }

  export type AttendanceUncheckedCreateWithoutEmployeeInput = {
    id?: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type AttendanceCreateOrConnectWithoutEmployeeInput = {
    where: AttendanceWhereUniqueInput
    create: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput>
  }

  export type AttendanceCreateManyEmployeeInputEnvelope = {
    data: AttendanceCreateManyEmployeeInput | AttendanceCreateManyEmployeeInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedEmployeesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedEmployeesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedEmployeesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedEmployeesInput, UserUncheckedCreateWithoutCreatedEmployeesInput>
  }

  export type AttendanceUpsertWithWhereUniqueWithoutEmployeeInput = {
    where: AttendanceWhereUniqueInput
    update: XOR<AttendanceUpdateWithoutEmployeeInput, AttendanceUncheckedUpdateWithoutEmployeeInput>
    create: XOR<AttendanceCreateWithoutEmployeeInput, AttendanceUncheckedCreateWithoutEmployeeInput>
  }

  export type AttendanceUpdateWithWhereUniqueWithoutEmployeeInput = {
    where: AttendanceWhereUniqueInput
    data: XOR<AttendanceUpdateWithoutEmployeeInput, AttendanceUncheckedUpdateWithoutEmployeeInput>
  }

  export type AttendanceUpdateManyWithWhereWithoutEmployeeInput = {
    where: AttendanceScalarWhereInput
    data: XOR<AttendanceUpdateManyMutationInput, AttendanceUncheckedUpdateManyWithoutEmployeeInput>
  }

  export type UserUpsertWithoutCreatedEmployeesInput = {
    update: XOR<UserUpdateWithoutCreatedEmployeesInput, UserUncheckedUpdateWithoutCreatedEmployeesInput>
    create: XOR<UserCreateWithoutCreatedEmployeesInput, UserUncheckedCreateWithoutCreatedEmployeesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedEmployeesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedEmployeesInput, UserUncheckedUpdateWithoutCreatedEmployeesInput>
  }

  export type UserUpdateWithoutCreatedEmployeesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedEmployeesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type EmployeeCreateWithoutAttendancesInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdByUser?: UserCreateNestedOneWithoutCreatedEmployeesInput
  }

  export type EmployeeUncheckedCreateWithoutAttendancesInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type EmployeeCreateOrConnectWithoutAttendancesInput = {
    where: EmployeeWhereUniqueInput
    create: XOR<EmployeeCreateWithoutAttendancesInput, EmployeeUncheckedCreateWithoutAttendancesInput>
  }

  export type UserCreateWithoutCreatedAttendancesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedAttendancesInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedAttendancesInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedAttendancesInput, UserUncheckedCreateWithoutCreatedAttendancesInput>
  }

  export type EmployeeUpsertWithoutAttendancesInput = {
    update: XOR<EmployeeUpdateWithoutAttendancesInput, EmployeeUncheckedUpdateWithoutAttendancesInput>
    create: XOR<EmployeeCreateWithoutAttendancesInput, EmployeeUncheckedCreateWithoutAttendancesInput>
    where?: EmployeeWhereInput
  }

  export type EmployeeUpdateToOneWithWhereWithoutAttendancesInput = {
    where?: EmployeeWhereInput
    data: XOR<EmployeeUpdateWithoutAttendancesInput, EmployeeUncheckedUpdateWithoutAttendancesInput>
  }

  export type EmployeeUpdateWithoutAttendancesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdByUser?: UserUpdateOneWithoutCreatedEmployeesNestedInput
  }

  export type EmployeeUncheckedUpdateWithoutAttendancesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type UserUpsertWithoutCreatedAttendancesInput = {
    update: XOR<UserUpdateWithoutCreatedAttendancesInput, UserUncheckedUpdateWithoutCreatedAttendancesInput>
    create: XOR<UserCreateWithoutCreatedAttendancesInput, UserUncheckedCreateWithoutCreatedAttendancesInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedAttendancesInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedAttendancesInput, UserUncheckedUpdateWithoutCreatedAttendancesInput>
  }

  export type UserUpdateWithoutCreatedAttendancesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedAttendancesInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateWithoutAuditLogsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
  }

  export type UserUncheckedCreateWithoutAuditLogsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
  }

  export type UserCreateOrConnectWithoutAuditLogsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutAuditLogsInput, UserUncheckedCreateWithoutAuditLogsInput>
  }

  export type UserUpsertWithoutAuditLogsInput = {
    update: XOR<UserUpdateWithoutAuditLogsInput, UserUncheckedUpdateWithoutAuditLogsInput>
    create: XOR<UserCreateWithoutAuditLogsInput, UserUncheckedCreateWithoutAuditLogsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutAuditLogsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutAuditLogsInput, UserUncheckedUpdateWithoutAuditLogsInput>
  }

  export type UserUpdateWithoutAuditLogsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
  }

  export type UserUncheckedUpdateWithoutAuditLogsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
  }

  export type FastBillingItemCreateWithoutFastBillingInput = {
    id?: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedFastBillingItemsInput
  }

  export type FastBillingItemUncheckedCreateWithoutFastBillingInput = {
    id?: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingItemCreateOrConnectWithoutFastBillingInput = {
    where: FastBillingItemWhereUniqueInput
    create: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput>
  }

  export type FastBillingItemCreateManyFastBillingInputEnvelope = {
    data: FastBillingItemCreateManyFastBillingInput | FastBillingItemCreateManyFastBillingInput[]
    skipDuplicates?: boolean
  }

  export type UserCreateWithoutCreatedFastBillingsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedFastBillingsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedFastBillingsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedFastBillingsInput, UserUncheckedCreateWithoutCreatedFastBillingsInput>
  }

  export type FastBillingItemUpsertWithWhereUniqueWithoutFastBillingInput = {
    where: FastBillingItemWhereUniqueInput
    update: XOR<FastBillingItemUpdateWithoutFastBillingInput, FastBillingItemUncheckedUpdateWithoutFastBillingInput>
    create: XOR<FastBillingItemCreateWithoutFastBillingInput, FastBillingItemUncheckedCreateWithoutFastBillingInput>
  }

  export type FastBillingItemUpdateWithWhereUniqueWithoutFastBillingInput = {
    where: FastBillingItemWhereUniqueInput
    data: XOR<FastBillingItemUpdateWithoutFastBillingInput, FastBillingItemUncheckedUpdateWithoutFastBillingInput>
  }

  export type FastBillingItemUpdateManyWithWhereWithoutFastBillingInput = {
    where: FastBillingItemScalarWhereInput
    data: XOR<FastBillingItemUpdateManyMutationInput, FastBillingItemUncheckedUpdateManyWithoutFastBillingInput>
  }

  export type UserUpsertWithoutCreatedFastBillingsInput = {
    update: XOR<UserUpdateWithoutCreatedFastBillingsInput, UserUncheckedUpdateWithoutCreatedFastBillingsInput>
    create: XOR<UserCreateWithoutCreatedFastBillingsInput, UserUncheckedCreateWithoutCreatedFastBillingsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedFastBillingsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedFastBillingsInput, UserUncheckedUpdateWithoutCreatedFastBillingsInput>
  }

  export type UserUpdateWithoutCreatedFastBillingsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedFastBillingsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type FastBillingCreateWithoutItemsInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdByUser?: UserCreateNestedOneWithoutCreatedFastBillingsInput
  }

  export type FastBillingUncheckedCreateWithoutItemsInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingCreateOrConnectWithoutItemsInput = {
    where: FastBillingWhereUniqueInput
    create: XOR<FastBillingCreateWithoutItemsInput, FastBillingUncheckedCreateWithoutItemsInput>
  }

  export type UserCreateWithoutCreatedFastBillingItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedFastBillingItemsInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedFastBillingItemsInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedFastBillingItemsInput, UserUncheckedCreateWithoutCreatedFastBillingItemsInput>
  }

  export type FastBillingUpsertWithoutItemsInput = {
    update: XOR<FastBillingUpdateWithoutItemsInput, FastBillingUncheckedUpdateWithoutItemsInput>
    create: XOR<FastBillingCreateWithoutItemsInput, FastBillingUncheckedCreateWithoutItemsInput>
    where?: FastBillingWhereInput
  }

  export type FastBillingUpdateToOneWithWhereWithoutItemsInput = {
    where?: FastBillingWhereInput
    data: XOR<FastBillingUpdateWithoutItemsInput, FastBillingUncheckedUpdateWithoutItemsInput>
  }

  export type FastBillingUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedFastBillingsNestedInput
  }

  export type FastBillingUncheckedUpdateWithoutItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type UserUpsertWithoutCreatedFastBillingItemsInput = {
    update: XOR<UserUpdateWithoutCreatedFastBillingItemsInput, UserUncheckedUpdateWithoutCreatedFastBillingItemsInput>
    create: XOR<UserCreateWithoutCreatedFastBillingItemsInput, UserUncheckedCreateWithoutCreatedFastBillingItemsInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedFastBillingItemsInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedFastBillingItemsInput, UserUncheckedUpdateWithoutCreatedFastBillingItemsInput>
  }

  export type UserUpdateWithoutCreatedFastBillingItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedFastBillingItemsInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateWithoutDeletedCashBankTransfersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferCreateNestedManyWithoutCreatedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutDeletedCashBankTransfersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutCreatedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutDeletedCashBankTransfersInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutDeletedCashBankTransfersInput, UserUncheckedCreateWithoutDeletedCashBankTransfersInput>
  }

  export type UserCreateWithoutCreatedCashBankTransfersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    role: RoleCreateNestedOneWithoutUsersInput
    forgotPassword?: ForgotPasswordCreateNestedOneWithoutUserInput
    createdStates?: StateCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogCreateNestedManyWithoutUserInput
  }

  export type UserUncheckedCreateWithoutCreatedCashBankTransfersInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    roleId: bigint | number
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
    forgotPassword?: ForgotPasswordUncheckedCreateNestedOneWithoutUserInput
    createdStates?: StateUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdDistricts?: DistrictUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdVegetables?: VegetableUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomers?: CustomerUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSuppliers?: SupplierUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSupplierPayments?: SupplierPaymentUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdUpis?: UpiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchases?: PurchaseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdShops?: ShopUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSales?: SaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleItems?: SaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdCustomerReceipts?: CustomerReceiptUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdExpenses?: ExpenseUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdStockSpoilages?: StockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdSaleReturns?: SaleReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotations?: QuotationUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdQuotationItems?: QuotationItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdPurchaseReturns?: PurchaseReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStocks?: RetailStockUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSales?: RetailSaleUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailSaleItems?: RetailSaleItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdRetailStockReturns?: RetailStockReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdBoxReturns?: BoxReturnUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdEmployees?: EmployeeUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdAttendances?: AttendanceUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillings?: FastBillingUncheckedCreateNestedManyWithoutCreatedByUserInput
    createdFastBillingItems?: FastBillingItemUncheckedCreateNestedManyWithoutCreatedByUserInput
    deletedCashBankTransfers?: CashBankTransferUncheckedCreateNestedManyWithoutDeletedByUserInput
    auditLogs?: AuditLogUncheckedCreateNestedManyWithoutUserInput
  }

  export type UserCreateOrConnectWithoutCreatedCashBankTransfersInput = {
    where: UserWhereUniqueInput
    create: XOR<UserCreateWithoutCreatedCashBankTransfersInput, UserUncheckedCreateWithoutCreatedCashBankTransfersInput>
  }

  export type UserUpsertWithoutDeletedCashBankTransfersInput = {
    update: XOR<UserUpdateWithoutDeletedCashBankTransfersInput, UserUncheckedUpdateWithoutDeletedCashBankTransfersInput>
    create: XOR<UserCreateWithoutDeletedCashBankTransfersInput, UserUncheckedCreateWithoutDeletedCashBankTransfersInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutDeletedCashBankTransfersInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutDeletedCashBankTransfersInput, UserUncheckedUpdateWithoutDeletedCashBankTransfersInput>
  }

  export type UserUpdateWithoutDeletedCashBankTransfersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutDeletedCashBankTransfersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserUpsertWithoutCreatedCashBankTransfersInput = {
    update: XOR<UserUpdateWithoutCreatedCashBankTransfersInput, UserUncheckedUpdateWithoutCreatedCashBankTransfersInput>
    create: XOR<UserCreateWithoutCreatedCashBankTransfersInput, UserUncheckedCreateWithoutCreatedCashBankTransfersInput>
    where?: UserWhereInput
  }

  export type UserUpdateToOneWithWhereWithoutCreatedCashBankTransfersInput = {
    where?: UserWhereInput
    data: XOR<UserUpdateWithoutCreatedCashBankTransfersInput, UserUncheckedUpdateWithoutCreatedCashBankTransfersInput>
  }

  export type UserUpdateWithoutCreatedCashBankTransfersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    role?: RoleUpdateOneRequiredWithoutUsersNestedInput
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutCreatedCashBankTransfersInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    roleId?: BigIntFieldUpdateOperationsInput | bigint | number
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserCreateManyRoleInput = {
    id?: bigint | number
    name: string
    email: string
    mobileNo?: string | null
    password: string
    createdAt?: Date | string
    updatedAt?: Date | string
    status?: boolean
    profile?: string | null
  }

  export type UserUpdateWithoutRoleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUpdateOneWithoutUserNestedInput
    createdStates?: StateUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateWithoutRoleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
    forgotPassword?: ForgotPasswordUncheckedUpdateOneWithoutUserNestedInput
    createdStates?: StateUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdDistricts?: DistrictUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdVegetables?: VegetableUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomers?: CustomerUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSuppliers?: SupplierUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSupplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdUpis?: UpiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchases?: PurchaseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdShops?: ShopUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSales?: SaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleItems?: SaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCustomerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdExpenses?: ExpenseUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdStockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdSaleReturns?: SaleReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotations?: QuotationUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdQuotationItems?: QuotationItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdPurchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStocks?: RetailStockUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSales?: RetailSaleUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdRetailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdBoxReturns?: BoxReturnUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdEmployees?: EmployeeUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdAttendances?: AttendanceUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalSettlements?: ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdArrivalCustomPattis?: ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillings?: FastBillingUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdFastBillingItems?: FastBillingItemUncheckedUpdateManyWithoutCreatedByUserNestedInput
    createdCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutCreatedByUserNestedInput
    deletedCashBankTransfers?: CashBankTransferUncheckedUpdateManyWithoutDeletedByUserNestedInput
    auditLogs?: AuditLogUncheckedUpdateManyWithoutUserNestedInput
  }

  export type UserUncheckedUpdateManyWithoutRoleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    mobileNo?: NullableStringFieldUpdateOperationsInput | string | null
    password?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: BoolFieldUpdateOperationsInput | boolean
    profile?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type StateCreateManyCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type DistrictCreateManyCreatedByUserInput = {
    id?: bigint | number
    stateId: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type VegetableCreateManyCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    hindiName?: string | null
    kannadaName?: string | null
    malayalamName?: string | null
    teluguName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    hsnCode?: string | null
    isFlexible?: boolean
  }

  export type CustomerCreateManyCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type SupplierCreateManyCreatedByUserInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type SupplierPaymentCreateManyCreatedByUserInput = {
    id?: bigint | number
    supplierId: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type UpiCreateManyCreatedByUserInput = {
    id?: number
    upiId: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type PurchaseCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type ShopCreateManyCreatedByUserInput = {
    id?: number
    shopName: string
    shortName?: string | null
    address: string
    mobile: string
    mobile2?: string | null
    mapUrl?: string | null
    godName1?: string | null
    godName2?: string | null
    godName3?: string | null
    logo?: string | null
    godImage1?: string | null
    godImage2?: string | null
    authorizedSign?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type SaleCreateManyCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    customerId?: bigint | number | null
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type SaleItemCreateManyCreatedByUserInput = {
    id?: bigint | number
    saleId: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CustomerReceiptCreateManyCreatedByUserInput = {
    id?: bigint | number
    customerId: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type ExpenseCreateManyCreatedByUserInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    purchaseId?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type StockSpoilageCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type SaleReturnCreateManyCreatedByUserInput = {
    id?: bigint | number
    saleItemId: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type QuotationCreateManyCreatedByUserInput = {
    id?: bigint | number
    quotationNo: string
    customerId?: bigint | number | null
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type QuotationItemCreateManyCreatedByUserInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type PurchaseReturnCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailStockCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type RetailSaleCreateManyCreatedByUserInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentMode?: $Enums.PaymentMode | null
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    movedToWholesale?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type RetailSaleItemCreateManyCreatedByUserInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailStockSpoilageCreateManyCreatedByUserInput = {
    id?: bigint | number
    retailStockId: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RetailStockReturnCreateManyCreatedByUserInput = {
    id?: bigint | number
    retailStockId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type BoxReturnCreateManyCreatedByUserInput = {
    id?: bigint | number
    supplierId: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type EmployeeCreateManyCreatedByUserInput = {
    id?: bigint | number
    employeeCode: string
    name: string
    mobile?: string | null
    designation?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
  }

  export type AttendanceCreateManyCreatedByUserInput = {
    id?: bigint | number
    employeeId: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ArrivalSettlementCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    settlementNo: string
    settlementDate: Date | string
    totalWeightSold: Decimal | DecimalJsLike | number | string
    grossSalesTotal: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable: Decimal | DecimalJsLike | number | string
    paidAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    status?: $Enums.SettlementStatus
    paymentMode?: $Enums.PaymentMode | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ArrivalCustomPattiCreateManyCreatedByUserInput = {
    id?: bigint | number
    purchaseId: bigint | number
    pattiNo?: string | null
    settlementDate?: Date | string | null
    items: JsonNullValueInput | InputJsonValue
    totalWeightSold?: Decimal | DecimalJsLike | number | string
    grossSalesTotal?: Decimal | DecimalJsLike | number | string
    commissionPercent?: Decimal | DecimalJsLike | number | string
    commissionAmount?: Decimal | DecimalJsLike | number | string
    freightDeducted?: Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: Decimal | DecimalJsLike | number | string
    associationDeducted?: Decimal | DecimalJsLike | number | string
    unloadingDeducted?: Decimal | DecimalJsLike | number | string
    miscDeducted?: Decimal | DecimalJsLike | number | string
    totalDeductions?: Decimal | DecimalJsLike | number | string
    advanceAdjusted?: Decimal | DecimalJsLike | number | string
    netPayable?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FastBillingCreateManyCreatedByUserInput = {
    id?: bigint | number
    billNo: string
    billDate: Date | string
    customerName: string
    totalAmount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FastBillingItemCreateManyCreatedByUserInput = {
    id?: bigint | number
    fastBillingId: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankTransferCreateManyCreatedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    deletedBy?: bigint | number | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type CashBankTransferCreateManyDeletedByUserInput = {
    id?: bigint | number
    transferDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    fromAccount?: string
    toAccount?: string
    referenceNo?: string | null
    remarks?: string | null
    deletedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type AuditLogCreateManyUserInput = {
    id?: bigint | number
    entityName: string
    entityId: bigint | number
    action: $Enums.AuditAction
    oldValues: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type StateUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    districts?: DistrictUpdateManyWithoutStateNestedInput
    customers?: CustomerUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUpdateManyWithoutStateNestedInput
  }

  export type StateUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    districts?: DistrictUncheckedUpdateManyWithoutStateNestedInput
    customers?: CustomerUncheckedUpdateManyWithoutStateNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutStateNestedInput
  }

  export type StateUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DistrictUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    state?: StateUpdateOneRequiredWithoutDistrictsNestedInput
    customers?: CustomerUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUpdateManyWithoutDistrictNestedInput
  }

  export type DistrictUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customers?: CustomerUncheckedUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutDistrictNestedInput
  }

  export type DistrictUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type VegetableUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    purchases?: PurchaseUpdateManyWithoutVegetableNestedInput
    quotationItems?: QuotationItemUpdateManyWithoutVegetableNestedInput
  }

  export type VegetableUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
    purchases?: PurchaseUncheckedUpdateManyWithoutVegetableNestedInput
    quotationItems?: QuotationItemUncheckedUpdateManyWithoutVegetableNestedInput
  }

  export type VegetableUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    hindiName?: NullableStringFieldUpdateOperationsInput | string | null
    kannadaName?: NullableStringFieldUpdateOperationsInput | string | null
    malayalamName?: NullableStringFieldUpdateOperationsInput | string | null
    teluguName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    isFlexible?: BoolFieldUpdateOperationsInput | boolean
  }

  export type CustomerUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
  }

  export type CustomerUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type CustomerUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SupplierUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
  }

  export type SupplierUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type SupplierUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SupplierPaymentUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneRequiredWithoutSupplierPaymentsNestedInput
  }

  export type SupplierPaymentUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SupplierPaymentUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type UpiUpdateWithoutCreatedByUserInput = {
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UpiUncheckedUpdateWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UpiUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    upiId?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type PurchaseUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type PurchaseUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type ShopUpdateWithoutCreatedByUserInput = {
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ShopUncheckedUpdateWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ShopUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    shopName?: StringFieldUpdateOperationsInput | string
    shortName?: NullableStringFieldUpdateOperationsInput | string | null
    address?: StringFieldUpdateOperationsInput | string
    mobile?: StringFieldUpdateOperationsInput | string
    mobile2?: NullableStringFieldUpdateOperationsInput | string | null
    mapUrl?: NullableStringFieldUpdateOperationsInput | string | null
    godName1?: NullableStringFieldUpdateOperationsInput | string | null
    godName2?: NullableStringFieldUpdateOperationsInput | string | null
    godName3?: NullableStringFieldUpdateOperationsInput | string | null
    logo?: NullableStringFieldUpdateOperationsInput | string | null
    godImage1?: NullableStringFieldUpdateOperationsInput | string | null
    godImage2?: NullableStringFieldUpdateOperationsInput | string | null
    authorizedSign?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type SaleUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    customer?: CustomerUpdateOneWithoutSalesNestedInput
    items?: SaleItemUpdateManyWithoutSaleNestedInput
  }

  export type SaleUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: SaleItemUncheckedUpdateManyWithoutSaleNestedInput
  }

  export type SaleUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type SaleItemUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    sale?: SaleUpdateOneRequiredWithoutItemsNestedInput
    purchase?: PurchaseUpdateOneRequiredWithoutSaleItemsNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutSaleItemNestedInput
  }

  export type SaleItemUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutSaleItemNestedInput
  }

  export type SaleItemUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CustomerReceiptUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    customer?: CustomerUpdateOneRequiredWithoutCustomerReceiptsNestedInput
  }

  export type CustomerReceiptUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    customerId?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type CustomerReceiptUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    customerId?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type ExpenseUpdateWithoutCreatedByUserInput = {
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneWithoutExpensesNestedInput
  }

  export type ExpenseUncheckedUpdateWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    purchaseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ExpenseUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    purchaseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StockSpoilageUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutStockSpoilagesNestedInput
  }

  export type StockSpoilageUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type StockSpoilageUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type SaleReturnUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    saleItem?: SaleItemUpdateOneRequiredWithoutSaleReturnsNestedInput
    purchase?: PurchaseUpdateOneRequiredWithoutSaleReturnsNestedInput
  }

  export type SaleReturnUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type SaleReturnUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type QuotationUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customer?: CustomerUpdateOneWithoutQuotationsNestedInput
    items?: QuotationItemUpdateManyWithoutQuotationNestedInput
  }

  export type QuotationUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    items?: QuotationItemUncheckedUpdateManyWithoutQuotationNestedInput
  }

  export type QuotationUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type QuotationItemUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    quotation?: QuotationUpdateOneRequiredWithoutItemsNestedInput
    vegetable?: VegetableUpdateOneWithoutQuotationItemsNestedInput
  }

  export type QuotationItemUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type QuotationItemUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type PurchaseReturnUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutPurchaseReturnsNestedInput
  }

  export type PurchaseReturnUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type PurchaseReturnUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    purchase?: PurchaseUpdateOneRequiredWithoutRetailStocksNestedInput
    retailSaleItems?: RetailSaleItemUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUpdateManyWithoutRetailStockNestedInput
  }

  export type RetailStockUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    retailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type RetailStockUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type RetailSaleUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: RetailSaleItemUpdateManyWithoutRetailSaleNestedInput
  }

  export type RetailSaleUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: RetailSaleItemUncheckedUpdateManyWithoutRetailSaleNestedInput
  }

  export type RetailSaleUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    movedToWholesale?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type RetailSaleItemUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailSale?: RetailSaleUpdateOneRequiredWithoutItemsNestedInput
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailSaleItemsNestedInput
  }

  export type RetailSaleItemUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockSpoilageUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailStockSpoilagesNestedInput
  }

  export type RetailStockSpoilageUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockSpoilageUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockReturnUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailStockReturnsNestedInput
  }

  export type RetailStockReturnUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RetailStockReturnUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type BoxReturnUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    supplier?: SupplierUpdateOneRequiredWithoutBoxReturnsNestedInput
  }

  export type BoxReturnUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type BoxReturnUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    supplierId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type EmployeeUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    attendances?: AttendanceUpdateManyWithoutEmployeeNestedInput
  }

  export type EmployeeUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    attendances?: AttendanceUncheckedUpdateManyWithoutEmployeeNestedInput
  }

  export type EmployeeUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeCode?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    mobile?: NullableStringFieldUpdateOperationsInput | string | null
    designation?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type AttendanceUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    employee?: EmployeeUpdateOneRequiredWithoutAttendancesNestedInput
  }

  export type AttendanceUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeId?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type AttendanceUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    employeeId?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalSettlementUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutArrivalSettlementNestedInput
  }

  export type ArrivalSettlementUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalSettlementUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    settlementNo?: StringFieldUpdateOperationsInput | string
    settlementDate?: DateTimeFieldUpdateOperationsInput | Date | string
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paidAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: EnumSettlementStatusFieldUpdateOperationsInput | $Enums.SettlementStatus
    paymentMode?: NullableEnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalCustomPattiUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutArrivalCustomPattiNestedInput
  }

  export type ArrivalCustomPattiUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ArrivalCustomPattiUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    pattiNo?: NullableStringFieldUpdateOperationsInput | string | null
    settlementDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: JsonNullValueInput | InputJsonValue
    totalWeightSold?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grossSalesTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    commissionAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreightDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscDeducted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalDeductions?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    advanceAdjusted?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    netPayable?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FastBillingUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    items?: FastBillingItemUpdateManyWithoutFastBillingNestedInput
  }

  export type FastBillingUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    items?: FastBillingItemUncheckedUpdateManyWithoutFastBillingNestedInput
  }

  export type FastBillingUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    billNo?: StringFieldUpdateOperationsInput | string
    billDate?: DateTimeFieldUpdateOperationsInput | Date | string
    customerName?: StringFieldUpdateOperationsInput | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FastBillingItemUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    fastBilling?: FastBillingUpdateOneRequiredWithoutItemsNestedInput
  }

  export type FastBillingItemUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    fastBillingId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FastBillingItemUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    fastBillingId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankTransferUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedByUser?: UserUpdateOneWithoutDeletedCashBankTransfersNestedInput
  }

  export type CashBankTransferUncheckedUpdateWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    deletedBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankTransferUncheckedUpdateManyWithoutCreatedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    deletedBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type CashBankTransferUpdateWithoutDeletedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedCashBankTransfersNestedInput
  }

  export type CashBankTransferUncheckedUpdateWithoutDeletedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CashBankTransferUncheckedUpdateManyWithoutDeletedByUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    transferDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    fromAccount?: StringFieldUpdateOperationsInput | string
    toAccount?: StringFieldUpdateOperationsInput | string
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AuditLogUpdateWithoutUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type AuditLogUncheckedUpdateWithoutUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type AuditLogUncheckedUpdateManyWithoutUserInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    entityName?: StringFieldUpdateOperationsInput | string
    entityId?: BigIntFieldUpdateOperationsInput | bigint | number
    action?: EnumAuditActionFieldUpdateOperationsInput | $Enums.AuditAction
    oldValues?: JsonNullValueInput | InputJsonValue
    newValues?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DistrictCreateManyStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type CustomerCreateManyStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierCreateManyStateInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    districtId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type DistrictUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    customers?: CustomerUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUpdateManyWithoutDistrictNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedDistrictsNestedInput
  }

  export type DistrictUncheckedUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    customers?: CustomerUncheckedUpdateManyWithoutDistrictNestedInput
    suppliers?: SupplierUncheckedUpdateManyWithoutDistrictNestedInput
  }

  export type DistrictUncheckedUpdateManyWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    district?: DistrictUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type CustomerUncheckedUpdateManyWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    district?: DistrictUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type SupplierUncheckedUpdateManyWithoutStateInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    districtId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerCreateManyDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierCreateManyDistrictInput = {
    id?: bigint | number
    name: string
    tamilName?: string | null
    mobileNo: string
    address?: string | null
    stateId: bigint | number
    openingBalance?: Decimal | DecimalJsLike | number | string
    outstandingBalance?: Decimal | DecimalJsLike | number | string
    status?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerUpdateWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutCustomersNestedInput
    sales?: SaleUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUpdateManyWithoutCustomerNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedCustomersNestedInput
  }

  export type CustomerUncheckedUpdateWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    sales?: SaleUncheckedUpdateManyWithoutCustomerNestedInput
    customerReceipts?: CustomerReceiptUncheckedUpdateManyWithoutCustomerNestedInput
    quotations?: QuotationUncheckedUpdateManyWithoutCustomerNestedInput
  }

  export type CustomerUncheckedUpdateManyWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierUpdateWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    state?: StateUpdateOneRequiredWithoutSuppliersNestedInput
    purchases?: PurchaseUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUpdateManyWithoutSupplierNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSuppliersNestedInput
  }

  export type SupplierUncheckedUpdateWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    purchases?: PurchaseUncheckedUpdateManyWithoutSupplierNestedInput
    supplierPayments?: SupplierPaymentUncheckedUpdateManyWithoutSupplierNestedInput
    boxReturns?: BoxReturnUncheckedUpdateManyWithoutSupplierNestedInput
  }

  export type SupplierUncheckedUpdateManyWithoutDistrictInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    name?: StringFieldUpdateOperationsInput | string
    tamilName?: NullableStringFieldUpdateOperationsInput | string | null
    mobileNo?: StringFieldUpdateOperationsInput | string
    address?: NullableStringFieldUpdateOperationsInput | string | null
    stateId?: BigIntFieldUpdateOperationsInput | bigint | number
    openingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    outstandingBalance?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    status?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseCreateManyVegetableInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    supplierId?: bigint | number | null
    cashSupplierName?: string | null
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type QuotationItemCreateManyVegetableInput = {
    id?: bigint | number
    quotationId: bigint | number
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseUpdateWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    supplier?: SupplierUpdateOneWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type PurchaseUncheckedUpdateManyWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    supplierId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemUpdateWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    quotation?: QuotationUpdateOneRequiredWithoutItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationItemsNestedInput
  }

  export type QuotationItemUncheckedUpdateWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemUncheckedUpdateManyWithoutVegetableInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationId?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleCreateManyCustomerInput = {
    id?: bigint | number
    invoiceNo: string
    walkInName?: string | null
    walkInMobile?: string | null
    invoiceDate: Date | string
    subTotal: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    freightCharge?: Decimal | DecimalJsLike | number | string
    grandTotal: Decimal | DecimalJsLike | number | string
    receivedAmount?: Decimal | DecimalJsLike | number | string
    cashAmount?: Decimal | DecimalJsLike | number | string
    upiAmount?: Decimal | DecimalJsLike | number | string
    bankAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    paymentStatus?: $Enums.SalePaymentStatus
    remarks?: string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: string
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type CustomerReceiptCreateManyCustomerInput = {
    id?: bigint | number
    receiptDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type QuotationCreateManyCustomerInput = {
    id?: bigint | number
    quotationNo: string
    customerName: string
    quotationDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    extraCharge?: Decimal | DecimalJsLike | number | string
    discount?: Decimal | DecimalJsLike | number | string
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    items?: SaleItemUpdateManyWithoutSaleNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSalesNestedInput
  }

  export type SaleUncheckedUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: SaleItemUncheckedUpdateManyWithoutSaleNestedInput
  }

  export type SaleUncheckedUpdateManyWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    invoiceNo?: StringFieldUpdateOperationsInput | string
    walkInName?: NullableStringFieldUpdateOperationsInput | string | null
    walkInMobile?: NullableStringFieldUpdateOperationsInput | string | null
    invoiceDate?: DateTimeFieldUpdateOperationsInput | Date | string
    subTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freightCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    receivedAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    cashAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    upiAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bankAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentStatus?: EnumSalePaymentStatusFieldUpdateOperationsInput | $Enums.SalePaymentStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    images?: NullableJsonNullValueInput | InputJsonValue
    invoiceDownloadToken?: StringFieldUpdateOperationsInput | string
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerReceiptUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdByUser?: UserUpdateOneWithoutCreatedCustomerReceiptsNestedInput
  }

  export type CustomerReceiptUncheckedUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type CustomerReceiptUncheckedUpdateManyWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    receiptDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    items?: QuotationItemUpdateManyWithoutQuotationNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationsNestedInput
  }

  export type QuotationUncheckedUpdateWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    items?: QuotationItemUncheckedUpdateManyWithoutQuotationNestedInput
  }

  export type QuotationUncheckedUpdateManyWithoutCustomerInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    quotationNo?: StringFieldUpdateOperationsInput | string
    customerName?: StringFieldUpdateOperationsInput | string
    quotationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    discount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseCreateManySupplierInput = {
    id?: bigint | number
    purchaseDate: Date | string
    billNo?: string | null
    cashSupplierName?: string | null
    vegetableId: bigint | number
    lotNo: string
    purchaseType?: $Enums.PurchaseType
    status?: $Enums.PurchaseStatus
    unit?: $Enums.PurchaseUnit
    rateType?: $Enums.RateType
    bags?: Decimal | DecimalJsLike | number | string
    weightPerBag?: Decimal | DecimalJsLike | number | string | null
    quantity: Decimal | DecimalJsLike | number | string
    ratePerUnit?: Decimal | DecimalJsLike | number | string
    freight?: Decimal | DecimalJsLike | number | string
    extraFreight?: Decimal | DecimalJsLike | number | string
    associationFee?: Decimal | DecimalJsLike | number | string
    unloadingFee?: Decimal | DecimalJsLike | number | string
    miscellaneousFee?: Decimal | DecimalJsLike | number | string
    totalFreight?: Decimal | DecimalJsLike | number | string
    transportFee?: Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: Decimal | DecimalJsLike | number | string
    otherCharges?: Decimal | DecimalJsLike | number | string
    thaiyalCharges?: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string
    goodsTotal?: Decimal | DecimalJsLike | number | string
    surchargeTotal?: Decimal | DecimalJsLike | number | string
    costPerUnit?: Decimal | DecimalJsLike | number | string
    grandTotal?: Decimal | DecimalJsLike | number | string
    dateOfDespatch?: Date | string | null
    arrivalDate?: Date | string | null
    placeOfDespatch?: string | null
    placeOfArrival?: string | null
    truckNo?: string | null
    agentName?: string | null
    advanceAmount?: Decimal | DecimalJsLike | number | string
    balanceAmount?: Decimal | DecimalJsLike | number | string
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    closedAt?: Date | string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type SupplierPaymentCreateManySupplierInput = {
    id?: bigint | number
    paymentDate: Date | string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    referenceNo?: string | null
    remarks?: string | null
    type?: $Enums.SupplierPaymentType
    isWhatsappMessageSent?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type BoxReturnCreateManySupplierInput = {
    id?: bigint | number
    returnDate: Date | string
    boxCount: Decimal | DecimalJsLike | number | string
    remarks?: string | null
    signature?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    vegetable?: VegetableUpdateOneRequiredWithoutPurchasesNestedInput
    arrivalSettlement?: ArrivalSettlementUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUpdateManyWithoutPurchaseNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedPurchasesNestedInput
  }

  export type PurchaseUncheckedUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    arrivalSettlement?: ArrivalSettlementUncheckedUpdateOneWithoutPurchaseNestedInput
    arrivalCustomPatti?: ArrivalCustomPattiUncheckedUpdateOneWithoutPurchaseNestedInput
    saleItems?: SaleItemUncheckedUpdateManyWithoutPurchaseNestedInput
    stockSpoilages?: StockSpoilageUncheckedUpdateManyWithoutPurchaseNestedInput
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    purchaseReturns?: PurchaseReturnUncheckedUpdateManyWithoutPurchaseNestedInput
    retailStocks?: RetailStockUncheckedUpdateManyWithoutPurchaseNestedInput
    expenses?: ExpenseUncheckedUpdateManyWithoutPurchaseNestedInput
  }

  export type PurchaseUncheckedUpdateManyWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    billNo?: NullableStringFieldUpdateOperationsInput | string | null
    cashSupplierName?: NullableStringFieldUpdateOperationsInput | string | null
    vegetableId?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    purchaseType?: EnumPurchaseTypeFieldUpdateOperationsInput | $Enums.PurchaseType
    status?: EnumPurchaseStatusFieldUpdateOperationsInput | $Enums.PurchaseStatus
    unit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    rateType?: EnumRateTypeFieldUpdateOperationsInput | $Enums.RateType
    bags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    weightPerBag?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    freight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    associationFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    miscellaneousFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    totalFreight?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    transportFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    loadingUnloadingFee?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    otherCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    thaiyalCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    goodsTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    surchargeTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    grandTotal?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    dateOfDespatch?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    arrivalDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    placeOfDespatch?: NullableStringFieldUpdateOperationsInput | string | null
    placeOfArrival?: NullableStringFieldUpdateOperationsInput | string | null
    truckNo?: NullableStringFieldUpdateOperationsInput | string | null
    agentName?: NullableStringFieldUpdateOperationsInput | string | null
    advanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    balanceAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierPaymentUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdByUser?: UserUpdateOneWithoutCreatedSupplierPaymentsNestedInput
  }

  export type SupplierPaymentUncheckedUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SupplierPaymentUncheckedUpdateManyWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    paymentDate?: DateTimeFieldUpdateOperationsInput | Date | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    referenceNo?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    type?: EnumSupplierPaymentTypeFieldUpdateOperationsInput | $Enums.SupplierPaymentType
    isWhatsappMessageSent?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type BoxReturnUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedBoxReturnsNestedInput
  }

  export type BoxReturnUncheckedUpdateWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type BoxReturnUncheckedUpdateManyWithoutSupplierInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    boxCount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    signature?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleItemCreateManyPurchaseInput = {
    id?: bigint | number
    saleId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type StockSpoilageCreateManyPurchaseInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnCreateManyPurchaseInput = {
    id?: bigint | number
    saleItemId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type PurchaseReturnCreateManyPurchaseInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockCreateManyPurchaseInput = {
    id?: bigint | number
    lotNo: string
    allocatedUnit?: $Enums.PurchaseUnit
    allocatedQty: Decimal | DecimalJsLike | number | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: Decimal | DecimalJsLike | number | string
    remainingBags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    allocationDate: Date | string
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    deletedAt?: Date | string | null
    createdBy?: bigint | number | null
  }

  export type ExpenseCreateManyPurchaseInput = {
    id?: number
    expenseDate: Date | string
    category: string
    amount: Decimal | DecimalJsLike | number | string
    paymentMode: $Enums.PaymentMode
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleItemUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    sale?: SaleUpdateOneRequiredWithoutItemsNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutSaleItemNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleItemsNestedInput
  }

  export type SaleItemUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutSaleItemNestedInput
  }

  export type SaleItemUncheckedUpdateManyWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type StockSpoilageUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedStockSpoilagesNestedInput
  }

  export type StockSpoilageUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type StockSpoilageUncheckedUpdateManyWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    saleItem?: SaleItemUpdateOneRequiredWithoutSaleReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleReturnsNestedInput
  }

  export type SaleReturnUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnUncheckedUpdateManyWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleItemId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseReturnUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedPurchaseReturnsNestedInput
  }

  export type PurchaseReturnUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type PurchaseReturnUncheckedUpdateManyWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    retailSaleItems?: RetailSaleItemUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUpdateManyWithoutRetailStockNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailStocksNestedInput
  }

  export type RetailStockUncheckedUpdateWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    retailSaleItems?: RetailSaleItemUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockSpoilages?: RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockNestedInput
    retailStockReturns?: RetailStockReturnUncheckedUpdateManyWithoutRetailStockNestedInput
  }

  export type RetailStockUncheckedUpdateManyWithoutPurchaseInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    lotNo?: StringFieldUpdateOperationsInput | string
    allocatedUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    allocatedQty?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    remainingQuantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    remainingBags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    allocationDate?: DateTimeFieldUpdateOperationsInput | Date | string
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    deletedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ExpenseUpdateWithoutPurchaseInput = {
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedExpensesNestedInput
  }

  export type ExpenseUncheckedUpdateWithoutPurchaseInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type ExpenseUncheckedUpdateManyWithoutPurchaseInput = {
    id?: IntFieldUpdateOperationsInput | number
    expenseDate?: DateTimeFieldUpdateOperationsInput | Date | string
    category?: StringFieldUpdateOperationsInput | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    paymentMode?: EnumPaymentModeFieldUpdateOperationsInput | $Enums.PaymentMode
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleItemCreateManySaleInput = {
    id?: bigint | number
    purchaseId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleItemUpdateWithoutSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutSaleItemsNestedInput
    saleReturns?: SaleReturnUpdateManyWithoutSaleItemNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleItemsNestedInput
  }

  export type SaleItemUncheckedUpdateWithoutSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    saleReturns?: SaleReturnUncheckedUpdateManyWithoutSaleItemNestedInput
  }

  export type SaleItemUncheckedUpdateManyWithoutSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnCreateManySaleItemInput = {
    id?: bigint | number
    purchaseId: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    returnAmount: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type SaleReturnUpdateWithoutSaleItemInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    purchase?: PurchaseUpdateOneRequiredWithoutSaleReturnsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedSaleReturnsNestedInput
  }

  export type SaleReturnUncheckedUpdateWithoutSaleItemInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type SaleReturnUncheckedUpdateManyWithoutSaleItemInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    purchaseId?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    returnAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemCreateManyQuotationInput = {
    id?: bigint | number
    vegetableId?: bigint | number | null
    vegName: string
    hsnCode?: string | null
    quantity: Decimal | DecimalJsLike | number | string
    unit?: string
    price: Decimal | DecimalJsLike | number | string
    amount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type QuotationItemUpdateWithoutQuotationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    vegetable?: VegetableUpdateOneWithoutQuotationItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedQuotationItemsNestedInput
  }

  export type QuotationItemUncheckedUpdateWithoutQuotationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type QuotationItemUncheckedUpdateManyWithoutQuotationInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    vegName?: StringFieldUpdateOperationsInput | string
    hsnCode?: NullableStringFieldUpdateOperationsInput | string | null
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    unit?: StringFieldUpdateOperationsInput | string
    price?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemCreateManyRetailStockInput = {
    id?: bigint | number
    retailSaleId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockSpoilageCreateManyRetailStockInput = {
    id?: bigint | number
    spoilageDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailStockReturnCreateManyRetailStockInput = {
    id?: bigint | number
    returnDate: Date | string
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    reason?: string | null
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailSale?: RetailSaleUpdateOneRequiredWithoutItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailSaleItemsNestedInput
  }

  export type RetailSaleItemUncheckedUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailSaleId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockSpoilageUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedRetailStockSpoilagesNestedInput
  }

  export type RetailStockSpoilageUncheckedUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockSpoilageUncheckedUpdateManyWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    spoilageDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockReturnUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedRetailStockReturnsNestedInput
  }

  export type RetailStockReturnUncheckedUpdateWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailStockReturnUncheckedUpdateManyWithoutRetailStockInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    returnDate?: DateTimeFieldUpdateOperationsInput | Date | string
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    reason?: NullableStringFieldUpdateOperationsInput | string | null
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemCreateManyRetailSaleInput = {
    id?: bigint | number
    retailStockId: bigint | number
    saleUnit?: $Enums.PurchaseUnit
    quantity: Decimal | DecimalJsLike | number | string
    bags?: Decimal | DecimalJsLike | number | string | null
    costPerUnit: Decimal | DecimalJsLike | number | string
    sellingRate: Decimal | DecimalJsLike | number | string
    total: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type RetailSaleItemUpdateWithoutRetailSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    retailStock?: RetailStockUpdateOneRequiredWithoutRetailSaleItemsNestedInput
    createdByUser?: UserUpdateOneWithoutCreatedRetailSaleItemsNestedInput
  }

  export type RetailSaleItemUncheckedUpdateWithoutRetailSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type RetailSaleItemUncheckedUpdateManyWithoutRetailSaleInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    retailStockId?: BigIntFieldUpdateOperationsInput | bigint | number
    saleUnit?: EnumPurchaseUnitFieldUpdateOperationsInput | $Enums.PurchaseUnit
    quantity?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    bags?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    costPerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    sellingRate?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    total?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AttendanceCreateManyEmployeeInput = {
    id?: bigint | number
    date: Date | string
    status?: $Enums.AttendanceStatus
    remarks?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type AttendanceUpdateWithoutEmployeeInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedAttendancesNestedInput
  }

  export type AttendanceUncheckedUpdateWithoutEmployeeInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type AttendanceUncheckedUpdateManyWithoutEmployeeInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    status?: EnumAttendanceStatusFieldUpdateOperationsInput | $Enums.AttendanceStatus
    remarks?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type FastBillingItemCreateManyFastBillingInput = {
    id?: bigint | number
    vegetableName: string
    quantity?: Decimal | DecimalJsLike | number | string | null
    unit?: string
    rateType?: string | null
    numberOfBoxes?: Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: Decimal | DecimalJsLike | number | string | null
    ratePerUnit: Decimal | DecimalJsLike | number | string
    extraCharges?: Decimal | DecimalJsLike | number | string | null
    totalAmount: Decimal | DecimalJsLike | number | string
    createdAt?: Date | string
    updatedAt?: Date | string
    createdBy?: bigint | number | null
  }

  export type FastBillingItemUpdateWithoutFastBillingInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdByUser?: UserUpdateOneWithoutCreatedFastBillingItemsNestedInput
  }

  export type FastBillingItemUncheckedUpdateWithoutFastBillingInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }

  export type FastBillingItemUncheckedUpdateManyWithoutFastBillingInput = {
    id?: BigIntFieldUpdateOperationsInput | bigint | number
    vegetableName?: StringFieldUpdateOperationsInput | string
    quantity?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    unit?: StringFieldUpdateOperationsInput | string
    rateType?: NullableStringFieldUpdateOperationsInput | string | null
    numberOfBoxes?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfThaar?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    numberOfPieces?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    ratePerUnit?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    extraCharges?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    totalAmount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    createdBy?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  }



  /**
   * Batch Payload for updateMany & deleteMany & createMany
   */

  export type BatchPayload = {
    count: number
  }

  /**
   * DMMF
   */
  export const dmmf: runtime.BaseDMMF
}