feat: implement purchase receipt items management with create, update, find, and delete functionalities
feat: add purchase receipts management with create, update, find, and delete functionalities feat: implement sales invoice items management with create, update, find, and delete functionalities feat: add sales invoices management with create, update, find, and delete functionalities feat: implement stock adjustments management with create, update, find, and delete functionalities feat: add stock balance retrieval functionality feat: implement stock movements management with create, update, find, and delete functionalities
This commit is contained in:
@@ -60,7 +60,21 @@ export const ModelName = {
|
||||
Supplier: 'Supplier',
|
||||
Customer: 'Customer',
|
||||
Inventory: 'Inventory',
|
||||
Store: 'Store'
|
||||
Store: 'Store',
|
||||
ProductCharge: 'ProductCharge',
|
||||
Order: 'Order',
|
||||
PurchaseReceipt: 'PurchaseReceipt',
|
||||
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
||||
SalesInvoice: 'SalesInvoice',
|
||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||
StockMovement: 'StockMovement',
|
||||
StockBalance: 'StockBalance',
|
||||
InventoryTransfer: 'InventoryTransfer',
|
||||
InventoryTransferItem: 'InventoryTransferItem',
|
||||
StockAdjustment: 'StockAdjustment',
|
||||
inventory_overview: 'inventory_overview',
|
||||
stock_cardex: 'stock_cardex',
|
||||
stock_view: 'stock_view'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -85,7 +99,10 @@ export const UserScalarFieldEnum = {
|
||||
password: 'password',
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
roleId: 'roleId'
|
||||
roleId: 'roleId',
|
||||
createdAt: 'createdAt',
|
||||
deletedAt: 'deletedAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||
@@ -129,9 +146,9 @@ export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnu
|
||||
export const ProductScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
barcode: 'barcode',
|
||||
sku: 'sku',
|
||||
description: 'description',
|
||||
sku: 'sku',
|
||||
barcode: 'barcode',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
deletedAt: 'deletedAt',
|
||||
@@ -212,7 +229,8 @@ export const InventoryScalarFieldEnum = {
|
||||
location: 'location',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
updatedAt: 'updatedAt',
|
||||
deletedAt: 'deletedAt'
|
||||
} as const
|
||||
|
||||
export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum]
|
||||
@@ -224,12 +242,196 @@ export const StoreScalarFieldEnum = {
|
||||
location: 'location',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
updatedAt: 'updatedAt',
|
||||
deletedAt: 'deletedAt'
|
||||
} as const
|
||||
|
||||
export type StoreScalarFieldEnum = (typeof StoreScalarFieldEnum)[keyof typeof StoreScalarFieldEnum]
|
||||
|
||||
|
||||
export const ProductChargeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
count: 'count',
|
||||
fee: 'fee',
|
||||
totalAmount: 'totalAmount',
|
||||
isSettled: 'isSettled',
|
||||
buyAt: 'buyAt',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
deletedAt: 'deletedAt',
|
||||
productId: 'productId',
|
||||
inventoryId: 'inventoryId',
|
||||
supplierId: 'supplierId'
|
||||
} as const
|
||||
|
||||
export type ProductChargeScalarFieldEnum = (typeof ProductChargeScalarFieldEnum)[keyof typeof ProductChargeScalarFieldEnum]
|
||||
|
||||
|
||||
export const OrderScalarFieldEnum = {
|
||||
id: 'id',
|
||||
orderNumber: 'orderNumber',
|
||||
status: 'status',
|
||||
paymentMethod: 'paymentMethod',
|
||||
totalAmount: 'totalAmount',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
deletedAt: 'deletedAt',
|
||||
customerId: 'customerId'
|
||||
} as const
|
||||
|
||||
export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum]
|
||||
|
||||
|
||||
export const PurchaseReceiptScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
totalAmount: 'totalAmount',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
supplierId: 'supplierId',
|
||||
inventoryId: 'inventoryId'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptScalarFieldEnum = (typeof PurchaseReceiptScalarFieldEnum)[keyof typeof PurchaseReceiptScalarFieldEnum]
|
||||
|
||||
|
||||
export const PurchaseReceiptItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
count: 'count',
|
||||
fee: 'fee',
|
||||
total: 'total',
|
||||
createdAt: 'createdAt',
|
||||
receiptId: 'receiptId',
|
||||
productId: 'productId'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
totalAmount: 'totalAmount',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
customerId: 'customerId'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
count: 'count',
|
||||
fee: 'fee',
|
||||
total: 'total',
|
||||
createdAt: 'createdAt',
|
||||
invoiceId: 'invoiceId',
|
||||
productId: 'productId'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const StockMovementScalarFieldEnum = {
|
||||
id: 'id',
|
||||
type: 'type',
|
||||
quantity: 'quantity',
|
||||
fee: 'fee',
|
||||
totalCost: 'totalCost',
|
||||
referenceType: 'referenceType',
|
||||
referenceId: 'referenceId',
|
||||
createdAt: 'createdAt',
|
||||
productId: 'productId',
|
||||
inventoryId: 'inventoryId',
|
||||
avgCost: 'avgCost'
|
||||
} as const
|
||||
|
||||
export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum]
|
||||
|
||||
|
||||
export const StockBalanceScalarFieldEnum = {
|
||||
quantity: 'quantity',
|
||||
totalCost: 'totalCost',
|
||||
updatedAt: 'updatedAt',
|
||||
ProductId: 'ProductId',
|
||||
avgCost: 'avgCost'
|
||||
} as const
|
||||
|
||||
export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum]
|
||||
|
||||
|
||||
export const InventoryTransferScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt',
|
||||
fromInventoryId: 'fromInventoryId',
|
||||
toInventoryId: 'toInventoryId'
|
||||
} as const
|
||||
|
||||
export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum]
|
||||
|
||||
|
||||
export const InventoryTransferItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
count: 'count',
|
||||
productId: 'productId',
|
||||
transferId: 'transferId'
|
||||
} as const
|
||||
|
||||
export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const StockAdjustmentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
adjustedQuantity: 'adjustedQuantity',
|
||||
createdAt: 'createdAt',
|
||||
productId: 'productId',
|
||||
inventoryId: 'inventoryId'
|
||||
} as const
|
||||
|
||||
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
||||
|
||||
|
||||
export const Inventory_overviewScalarFieldEnum = {
|
||||
ProductId: 'ProductId',
|
||||
stock_quantity: 'stock_quantity',
|
||||
avgCost: 'avgCost',
|
||||
totalCost: 'totalCost',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type Inventory_overviewScalarFieldEnum = (typeof Inventory_overviewScalarFieldEnum)[keyof typeof Inventory_overviewScalarFieldEnum]
|
||||
|
||||
|
||||
export const Stock_cardexScalarFieldEnum = {
|
||||
productId: 'productId',
|
||||
movement_id: 'movement_id',
|
||||
type: 'type',
|
||||
quantity: 'quantity',
|
||||
fee: 'fee',
|
||||
totalCost: 'totalCost',
|
||||
balance_quantity: 'balance_quantity',
|
||||
balance_avg_cost: 'balance_avg_cost',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type Stock_cardexScalarFieldEnum = (typeof Stock_cardexScalarFieldEnum)[keyof typeof Stock_cardexScalarFieldEnum]
|
||||
|
||||
|
||||
export const Stock_viewScalarFieldEnum = {
|
||||
productId: 'productId',
|
||||
inventoryId: 'inventoryId',
|
||||
stock: 'stock'
|
||||
} as const
|
||||
|
||||
export type Stock_viewScalarFieldEnum = (typeof Stock_viewScalarFieldEnum)[keyof typeof Stock_viewScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -246,6 +448,14 @@ export const NullableJsonNullValueInput = {
|
||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const UserOrderByRelevanceFieldEnum = {
|
||||
mobileNumber: 'mobileNumber',
|
||||
password: 'password',
|
||||
@@ -273,14 +483,6 @@ export const QueryMode = {
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const RoleOrderByRelevanceFieldEnum = {
|
||||
name: 'name',
|
||||
description: 'description'
|
||||
@@ -302,9 +504,9 @@ export type ProductVariantOrderByRelevanceFieldEnum = (typeof ProductVariantOrde
|
||||
|
||||
export const ProductOrderByRelevanceFieldEnum = {
|
||||
name: 'name',
|
||||
barcode: 'barcode',
|
||||
description: 'description',
|
||||
sku: 'sku',
|
||||
description: 'description'
|
||||
barcode: 'barcode'
|
||||
} as const
|
||||
|
||||
export type ProductOrderByRelevanceFieldEnum = (typeof ProductOrderByRelevanceFieldEnum)[keyof typeof ProductOrderByRelevanceFieldEnum]
|
||||
@@ -371,3 +573,48 @@ export const StoreOrderByRelevanceFieldEnum = {
|
||||
|
||||
export type StoreOrderByRelevanceFieldEnum = (typeof StoreOrderByRelevanceFieldEnum)[keyof typeof StoreOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ProductChargeOrderByRelevanceFieldEnum = {
|
||||
description: 'description'
|
||||
} as const
|
||||
|
||||
export type ProductChargeOrderByRelevanceFieldEnum = (typeof ProductChargeOrderByRelevanceFieldEnum)[keyof typeof ProductChargeOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const OrderOrderByRelevanceFieldEnum = {
|
||||
orderNumber: 'orderNumber'
|
||||
} as const
|
||||
|
||||
export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const PurchaseReceiptOrderByRelevanceFieldEnum = {
|
||||
code: 'code',
|
||||
description: 'description'
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptOrderByRelevanceFieldEnum = (typeof PurchaseReceiptOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
code: 'code',
|
||||
description: 'description'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const StockMovementOrderByRelevanceFieldEnum = {
|
||||
referenceId: 'referenceId'
|
||||
} as const
|
||||
|
||||
export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const InventoryTransferOrderByRelevanceFieldEnum = {
|
||||
code: 'code',
|
||||
description: 'description'
|
||||
} as const
|
||||
|
||||
export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user