
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file

Object.defineProperty(exports, "__esModule", { value: true });

const {
  Decimal,
  DbNull,
  JsonNull,
  AnyNull,
  NullTypes,
  makeStrictEnum,
  Public,
  getRuntime,
  skip
} = require('@prisma/client/runtime/index-browser.js')


const Prisma = {}

exports.Prisma = Prisma
exports.$Enums = {}

/**
 * Prisma Client JS version: 7.7.0
 * Query Engine version: 75cbdc1eb7150937890ad5465d861175c6624711
 */
Prisma.prismaVersion = {
  client: "7.7.0",
  engine: "75cbdc1eb7150937890ad5465d861175c6624711"
}

Prisma.PrismaClientKnownRequestError = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal

/**
 * Re-export of sql-template-tag
 */
Prisma.sql = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator

/**
* Extensions
*/
Prisma.getExtensionContext = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
  const runtimeName = getRuntime().prettyName;
  throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}

/**
 * Shorthand utilities for JSON filtering
 */
Prisma.DbNull = DbNull
Prisma.JsonNull = JsonNull
Prisma.AnyNull = AnyNull

Prisma.NullTypes = NullTypes



/**
 * Enums
 */

exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
  ReadUncommitted: 'ReadUncommitted',
  ReadCommitted: 'ReadCommitted',
  RepeatableRead: 'RepeatableRead',
  Serializable: 'Serializable'
});

exports.Prisma.HealthcheckScalarFieldEnum = {
  id: 'id',
  createdAt: 'createdAt'
};

exports.Prisma.SettingScalarFieldEnum = {
  key: 'key',
  value: 'value',
  updatedAt: 'updatedAt'
};

exports.Prisma.UserScalarFieldEnum = {
  id: 'id',
  email: 'email',
  username: 'username',
  fullName: 'fullName',
  passwordHash: 'passwordHash',
  isVerified: 'isVerified',
  isApproved: 'isApproved',
  verificationToken: 'verificationToken',
  verificationTokenExpiry: 'verificationTokenExpiry',
  passwordResetToken: 'passwordResetToken',
  passwordResetTokenExpiry: 'passwordResetTokenExpiry',
  activeBranchId: 'activeBranchId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.BranchScalarFieldEnum = {
  id: 'id',
  name: 'name',
  code: 'code',
  address: 'address',
  city: 'city',
  country: 'country',
  phone: 'phone',
  phones: 'phones',
  email: 'email',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.UserBranchScalarFieldEnum = {
  userId: 'userId',
  branchId: 'branchId',
  assignedAt: 'assignedAt'
};

exports.Prisma.RoleScalarFieldEnum = {
  id: 'id',
  name: 'name',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.PermissionScalarFieldEnum = {
  id: 'id',
  name: 'name',
  label: 'label',
  description: 'description',
  category: 'category',
  sortOrder: 'sortOrder',
  isSystem: 'isSystem',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.UserRoleScalarFieldEnum = {
  userId: 'userId',
  roleId: 'roleId',
  assignedAt: 'assignedAt'
};

exports.Prisma.RolePermissionScalarFieldEnum = {
  roleId: 'roleId',
  permissionId: 'permissionId'
};

exports.Prisma.CategoryScalarFieldEnum = {
  id: 'id',
  name: 'name',
  code: 'code',
  description: 'description',
  color: 'color',
  icon: 'icon',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  tags: 'tags',
  branchId: 'branchId',
  parentId: 'parentId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.VariationScalarFieldEnum = {
  id: 'id',
  name: 'name',
  options: 'options',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  branchId: 'branchId',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.BrandScalarFieldEnum = {
  id: 'id',
  name: 'name',
  logo: 'logo',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.UnitScalarFieldEnum = {
  id: 'id',
  name: 'name',
  symbol: 'symbol',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.WarehouseScalarFieldEnum = {
  id: 'id',
  name: 'name',
  branchId: 'branchId',
  email: 'email',
  phone: 'phone',
  country: 'country',
  city: 'city',
  zipCode: 'zipCode',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.WarehouseStockScalarFieldEnum = {
  id: 'id',
  warehouseId: 'warehouseId',
  productId: 'productId',
  quantity: 'quantity',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.SupplierScalarFieldEnum = {
  id: 'id',
  name: 'name',
  email: 'email',
  phone: 'phone',
  country: 'country',
  city: 'city',
  zipCode: 'zipCode',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.PurchaseScalarFieldEnum = {
  id: 'id',
  number: 'number',
  supplierId: 'supplierId',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  status: 'status',
  purchaseDate: 'purchaseDate',
  notes: 'notes',
  subtotal: 'subtotal',
  taxTotal: 'taxTotal',
  total: 'total',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.PurchaseLineScalarFieldEnum = {
  id: 'id',
  purchaseId: 'purchaseId',
  productId: 'productId',
  quantity: 'quantity',
  unitCost: 'unitCost',
  taxRate: 'taxRate',
  lineTotal: 'lineTotal'
};

exports.Prisma.PurchaseReturnScalarFieldEnum = {
  id: 'id',
  number: 'number',
  purchaseId: 'purchaseId',
  supplierId: 'supplierId',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  status: 'status',
  returnDate: 'returnDate',
  reason: 'reason',
  notes: 'notes',
  subtotal: 'subtotal',
  taxTotal: 'taxTotal',
  total: 'total',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.PurchaseReturnLineScalarFieldEnum = {
  id: 'id',
  purchaseReturnId: 'purchaseReturnId',
  productId: 'productId',
  quantity: 'quantity',
  unitCost: 'unitCost',
  taxRate: 'taxRate',
  lineTotal: 'lineTotal'
};

exports.Prisma.CustomerScalarFieldEnum = {
  id: 'id',
  name: 'name',
  email: 'email',
  phone: 'phone',
  country: 'country',
  city: 'city',
  zipCode: 'zipCode',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.PaymentMethodScalarFieldEnum = {
  id: 'id',
  name: 'name',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.SaleScalarFieldEnum = {
  id: 'id',
  number: 'number',
  customerId: 'customerId',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  paymentMethodId: 'paymentMethodId',
  status: 'status',
  saleDate: 'saleDate',
  notes: 'notes',
  subtotal: 'subtotal',
  taxTotal: 'taxTotal',
  total: 'total',
  amountPaid: 'amountPaid',
  changeGiven: 'changeGiven',
  taxBreakdown: 'taxBreakdown',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.SaleLineScalarFieldEnum = {
  id: 'id',
  saleId: 'saleId',
  productId: 'productId',
  quantity: 'quantity',
  unitPrice: 'unitPrice',
  taxRate: 'taxRate',
  lineTotal: 'lineTotal'
};

exports.Prisma.SalesReturnScalarFieldEnum = {
  id: 'id',
  number: 'number',
  saleId: 'saleId',
  customerId: 'customerId',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  status: 'status',
  returnDate: 'returnDate',
  reason: 'reason',
  notes: 'notes',
  subtotal: 'subtotal',
  taxTotal: 'taxTotal',
  total: 'total',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.SalesReturnLineScalarFieldEnum = {
  id: 'id',
  salesReturnId: 'salesReturnId',
  productId: 'productId',
  quantity: 'quantity',
  unitPrice: 'unitPrice',
  taxRate: 'taxRate',
  lineTotal: 'lineTotal'
};

exports.Prisma.TaxScalarFieldEnum = {
  id: 'id',
  name: 'name',
  rate: 'rate',
  branchId: 'branchId',
  isActive: 'isActive',
  sortOrder: 'sortOrder',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.ExpenseCategoryScalarFieldEnum = {
  id: 'id',
  name: 'name',
  description: 'description',
  branchId: 'branchId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.ExpenseScalarFieldEnum = {
  id: 'id',
  reference: 'reference',
  categoryId: 'categoryId',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  paymentMethodId: 'paymentMethodId',
  status: 'status',
  expenseDate: 'expenseDate',
  title: 'title',
  notes: 'notes',
  amount: 'amount',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.ProductScalarFieldEnum = {
  id: 'id',
  name: 'name',
  sku: 'sku',
  barcode: 'barcode',
  description: 'description',
  isReturnable: 'isReturnable',
  branchId: 'branchId',
  categoryId: 'categoryId',
  unitId: 'unitId',
  brandId: 'brandId',
  expiryDate: 'expiryDate',
  productType: 'productType',
  variationIds: 'variationIds',
  quantity: 'quantity',
  images: 'images',
  sellingPrice: 'sellingPrice',
  salesTaxId: 'salesTaxId',
  costPrice: 'costPrice',
  purchaseTaxId: 'purchaseTaxId',
  warehouseId: 'warehouseId',
  sortOrder: 'sortOrder',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.InventoryTransferScalarFieldEnum = {
  id: 'id',
  reference: 'reference',
  fromWarehouseId: 'fromWarehouseId',
  toWarehouseId: 'toWarehouseId',
  branchId: 'branchId',
  status: 'status',
  transferDate: 'transferDate',
  notes: 'notes',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.InventoryTransferLineScalarFieldEnum = {
  id: 'id',
  transferId: 'transferId',
  productId: 'productId',
  quantity: 'quantity'
};

exports.Prisma.InvoiceScalarFieldEnum = {
  id: 'id',
  number: 'number',
  customerId: 'customerId',
  saleId: 'saleId',
  branchId: 'branchId',
  status: 'status',
  issueDate: 'issueDate',
  dueDate: 'dueDate',
  notes: 'notes',
  subtotal: 'subtotal',
  taxTotal: 'taxTotal',
  total: 'total',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt',
  deletedAt: 'deletedAt'
};

exports.Prisma.InvoiceLineScalarFieldEnum = {
  id: 'id',
  invoiceId: 'invoiceId',
  productId: 'productId',
  quantity: 'quantity',
  unitPrice: 'unitPrice',
  taxRate: 'taxRate',
  lineTotal: 'lineTotal'
};

exports.Prisma.InventoryAdjustmentScalarFieldEnum = {
  id: 'id',
  reference: 'reference',
  warehouseId: 'warehouseId',
  branchId: 'branchId',
  type: 'type',
  reason: 'reason',
  notes: 'notes',
  status: 'status',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.InventoryAdjustmentLineScalarFieldEnum = {
  id: 'id',
  adjustmentId: 'adjustmentId',
  productId: 'productId',
  quantity: 'quantity'
};

exports.Prisma.EmailTemplateScalarFieldEnum = {
  id: 'id',
  name: 'name',
  subject: 'subject',
  body: 'body',
  variables: 'variables',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.SmsTemplateScalarFieldEnum = {
  id: 'id',
  name: 'name',
  body: 'body',
  variables: 'variables',
  isActive: 'isActive',
  createdAt: 'createdAt',
  updatedAt: 'updatedAt'
};

exports.Prisma.NotificationScalarFieldEnum = {
  id: 'id',
  userId: 'userId',
  title: 'title',
  message: 'message',
  type: 'type',
  link: 'link',
  isRead: 'isRead',
  createdAt: 'createdAt'
};

exports.Prisma.ActivityLogScalarFieldEnum = {
  id: 'id',
  userId: 'userId',
  action: 'action',
  entityType: 'entityType',
  entityId: 'entityId',
  summary: 'summary',
  metadata: 'metadata',
  createdAt: 'createdAt'
};

exports.Prisma.SortOrder = {
  asc: 'asc',
  desc: 'desc'
};

exports.Prisma.NullableJsonNullValueInput = {
  DbNull: Prisma.DbNull,
  JsonNull: Prisma.JsonNull
};

exports.Prisma.QueryMode = {
  default: 'default',
  insensitive: 'insensitive'
};

exports.Prisma.NullsOrder = {
  first: 'first',
  last: 'last'
};

exports.Prisma.JsonNullValueFilter = {
  DbNull: Prisma.DbNull,
  JsonNull: Prisma.JsonNull,
  AnyNull: Prisma.AnyNull
};


exports.Prisma.ModelName = {
  Healthcheck: 'Healthcheck',
  Setting: 'Setting',
  User: 'User',
  Branch: 'Branch',
  UserBranch: 'UserBranch',
  Role: 'Role',
  Permission: 'Permission',
  UserRole: 'UserRole',
  RolePermission: 'RolePermission',
  Category: 'Category',
  Variation: 'Variation',
  Brand: 'Brand',
  Unit: 'Unit',
  Warehouse: 'Warehouse',
  WarehouseStock: 'WarehouseStock',
  Supplier: 'Supplier',
  Purchase: 'Purchase',
  PurchaseLine: 'PurchaseLine',
  PurchaseReturn: 'PurchaseReturn',
  PurchaseReturnLine: 'PurchaseReturnLine',
  Customer: 'Customer',
  PaymentMethod: 'PaymentMethod',
  Sale: 'Sale',
  SaleLine: 'SaleLine',
  SalesReturn: 'SalesReturn',
  SalesReturnLine: 'SalesReturnLine',
  Tax: 'Tax',
  ExpenseCategory: 'ExpenseCategory',
  Expense: 'Expense',
  Product: 'Product',
  InventoryTransfer: 'InventoryTransfer',
  InventoryTransferLine: 'InventoryTransferLine',
  Invoice: 'Invoice',
  InvoiceLine: 'InvoiceLine',
  InventoryAdjustment: 'InventoryAdjustment',
  InventoryAdjustmentLine: 'InventoryAdjustmentLine',
  EmailTemplate: 'EmailTemplate',
  SmsTemplate: 'SmsTemplate',
  Notification: 'Notification',
  ActivityLog: 'ActivityLog'
};

/**
 * This is a stub Prisma Client that will error at runtime if called.
 */
class PrismaClient {
  constructor() {
    return new Proxy(this, {
      get(target, prop) {
        let message
        const runtime = getRuntime()
        if (runtime.isEdge) {
          message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
        } else {
          message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
        }

        message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`

        throw new Error(message)
      }
    })
  }
}

exports.PrismaClient = PrismaClient

Object.assign(exports, Prisma)
