{
  "errorId": "ERR_1760448809819_fdvykgk4c",
  "timestamp": "2025-10-14T13:33:29.819Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 137097216,
      "heapTotal": 91533312,
      "heapUsed": 31356304,
      "external": 2495269,
      "arrayBuffers": 47232
    },
    "uptime": 3.9467535
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760448840086_aezzjlrle",
  "timestamp": "2025-10-14T13:34:00.086Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 80736256,
      "heapTotal": 32026624,
      "heapUsed": 29714600,
      "external": 2351845,
      "arrayBuffers": 33970
    },
    "uptime": 34.2135776
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760448900081_ky55ydn5y",
  "timestamp": "2025-10-14T13:35:00.081Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 81686528,
      "heapTotal": 33075200,
      "heapUsed": 30259432,
      "external": 2351617,
      "arrayBuffers": 33742
    },
    "uptime": 94.2086943
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760448960061_p36tiqfaw",
  "timestamp": "2025-10-14T13:36:00.061Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 82743296,
      "heapTotal": 32550912,
      "heapUsed": 30890176,
      "external": 2360287,
      "arrayBuffers": 42412
    },
    "uptime": 154.1889813
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449020157_hdnhkk4xu",
  "timestamp": "2025-10-14T13:37:00.157Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 83595264,
      "heapTotal": 33075200,
      "heapUsed": 31459696,
      "external": 2360412,
      "arrayBuffers": 42537
    },
    "uptime": 214.2836228
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449071081_ven14tsfb",
  "timestamp": "2025-10-14T13:37:51.081Z",
  "message": "Table 'meta.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\مشاريع 2025\\MetaCoffe\\backend\\services\\shiftAutoCloseService.js:145:26)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2025-10-14';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 137457664,
      "heapTotal": 91271168,
      "heapUsed": 31823824,
      "external": 2346462,
      "arrayBuffers": 47758
    },
    "uptime": 4.0232616
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449676843_zmr8qpvvw",
  "timestamp": "2025-10-14T13:47:56.843Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 93925376,
      "heapTotal": 45133824,
      "heapUsed": 34410024,
      "external": 2430777,
      "arrayBuffers": 112942
    },
    "uptime": 275.0942137
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449682257_vlum1avjk",
  "timestamp": "2025-10-14T13:48:02.257Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 83931136,
      "heapTotal": 33669120,
      "heapUsed": 30798920,
      "external": 2351139,
      "arrayBuffers": 34755
    },
    "uptime": 280.5081365
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449729090_7kd8votl3",
  "timestamp": "2025-10-14T13:48:49.090Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 85405696,
      "heapTotal": 34455552,
      "heapUsed": 31736864,
      "external": 2359669,
      "arrayBuffers": 43285
    },
    "uptime": 327.3389376
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449733124_6f2n5sh59",
  "timestamp": "2025-10-14T13:48:53.124Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 85827584,
      "heapTotal": 35241984,
      "heapUsed": 32226768,
      "external": 2368597,
      "arrayBuffers": 52213
    },
    "uptime": 331.3722308
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449738268_ao3rx7fw0",
  "timestamp": "2025-10-14T13:48:58.267Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 85913600,
      "heapTotal": 35241984,
      "heapUsed": 32324768,
      "external": 2368597,
      "arrayBuffers": 52213
    },
    "uptime": 336.5160332
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449742770_x20wggntc",
  "timestamp": "2025-10-14T13:49:02.770Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 86712320,
      "heapTotal": 36552704,
      "heapUsed": 32824344,
      "external": 2381915,
      "arrayBuffers": 65531
    },
    "uptime": 341.0185619
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449756247_em80zrhzb",
  "timestamp": "2025-10-14T13:49:16.247Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 86794240,
      "heapTotal": 35504128,
      "heapUsed": 33186744,
      "external": 2385459,
      "arrayBuffers": 69075
    },
    "uptime": 354.4951335
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449762236_zdv8xx3ow",
  "timestamp": "2025-10-14T13:49:22.236Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 87138304,
      "heapTotal": 37601280,
      "heapUsed": 34063576,
      "external": 2393439,
      "arrayBuffers": 77055
    },
    "uptime": 360.4850294
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449779858_zoa2jlyjw",
  "timestamp": "2025-10-14T13:49:39.858Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 93216768,
      "heapTotal": 42057728,
      "heapUsed": 31617248,
      "external": 2357534,
      "arrayBuffers": 42555
    },
    "uptime": 378.1070891
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760449781157_ykevzgnxt",
  "timestamp": "2025-10-14T13:49:41.157Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 93224960,
      "heapTotal": 42057728,
      "heapUsed": 32448632,
      "external": 2368930,
      "arrayBuffers": 53951
    },
    "uptime": 379.4055662
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450223400_wda7p82nz",
  "timestamp": "2025-10-14T13:57:03.400Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async exports.getDailyReport (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:430:22)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' ORDER BY `ShiftSession`.`startTime` ASC;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/daily-report",
    "query": {
      "date": "2025-10-14"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 93958144,
      "heapTotal": 37863424,
      "heapUsed": 29231128,
      "external": 2348614,
      "arrayBuffers": 33635
    },
    "uptime": 821.6486541
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450226987_4yc8j6ga1",
  "timestamp": "2025-10-14T13:57:06.987Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async exports.getDailyReport (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:430:22)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' ORDER BY `ShiftSession`.`startTime` ASC;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/daily-report",
    "query": {
      "date": "2025-10-14"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 93962240,
      "heapTotal": 37863424,
      "heapUsed": 29595848,
      "external": 2348685,
      "arrayBuffers": 33706
    },
    "uptime": 825.235256
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450233932_mbug2qdv9",
  "timestamp": "2025-10-14T13:57:13.932Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 95215616,
      "heapTotal": 41795584,
      "heapUsed": 32097392,
      "external": 2365602,
      "arrayBuffers": 50623
    },
    "uptime": 832.1799947
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450238042_cghmqzap5",
  "timestamp": "2025-10-14T13:57:18.042Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 94674944,
      "heapTotal": 41795584,
      "heapUsed": 32908504,
      "external": 2368806,
      "arrayBuffers": 53827
    },
    "uptime": 836.2910502
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450249723_m7d7xgjvg",
  "timestamp": "2025-10-14T13:57:29.723Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 95072256,
      "heapTotal": 39698432,
      "heapUsed": 33737320,
      "external": 2374060,
      "arrayBuffers": 59081
    },
    "uptime": 847.9712767
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450388302_144hgvkpz",
  "timestamp": "2025-10-14T13:59:48.302Z",
  "message": "Unknown column 'user.name' in 'field list'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async ShiftSession.findOne (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1240:12)\n    at async exports.getCurrentSession (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftSessionController.js:131:21)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime`, `shift`.`color` AS `shift.color`, `branch`.`id` AS `branch.id`, `branch`.`arabicName` AS `branch.arabicName`, `branch`.`englishName` AS `branch.englishName`, `user`.`id` AS `user.id`, `user`.`name` AS `user.name`, `user`.`email` AS `user.email` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` LEFT OUTER JOIN `Branches` AS `branch` ON `ShiftSession`.`branchId` = `branch`.`id` LEFT OUTER JOIN `Users` AS `user` ON `ShiftSession`.`userId` = `user`.`id` WHERE `ShiftSession`.`sessionDate` = '2025-10-14' AND `ShiftSession`.`status` = 'open' AND `ShiftSession`.`branchId` = '1' AND `ShiftSession`.`userId` = '1' ORDER BY `ShiftSession`.`startTime` DESC LIMIT 1;",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/shift-sessions/current",
    "query": {
      "branchId": "1",
      "userId": "1"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 84119552,
      "heapTotal": 33861632,
      "heapUsed": 31610560,
      "external": 2351720,
      "arrayBuffers": 33885
    },
    "uptime": 69.7168125
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450520079_urq7qh7gf",
  "timestamp": "2025-10-14T14:02:00.079Z",
  "message": "Cannot delete or update a parent row: a foreign key constraint fails (`meta`.`shiftsessions`, CONSTRAINT `shiftsessions_ibfk_1` FOREIGN KEY (`shiftId`) REFERENCES `shifts` (`id`) ON UPDATE CASCADE)",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.delete (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:393:12)\n    at async model.destroy (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:2627:16)\n    at async exports.deleteShift (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftController.js:225:5)",
  "name": "SequelizeForeignKeyConstraintError",
  "sql": "DELETE FROM `Shifts` WHERE `id` = 3",
  "parameters": {},
  "context": {
    "endpoint": "DELETE /api/shifts/3"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 139649024,
      "heapTotal": 91795456,
      "heapUsed": 38151632,
      "external": 2495764,
      "arrayBuffers": 177929
    },
    "uptime": 29.1910564
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450526457_xqcr6q5vz",
  "timestamp": "2025-10-14T14:02:06.457Z",
  "message": "Cannot delete or update a parent row: a foreign key constraint fails (`meta`.`shiftsessions`, CONSTRAINT `shiftsessions_ibfk_1` FOREIGN KEY (`shiftId`) REFERENCES `shifts` (`id`) ON UPDATE CASCADE)",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.delete (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:393:12)\n    at async model.destroy (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:2627:16)\n    at async exports.deleteShift (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftController.js:225:5)",
  "name": "SequelizeForeignKeyConstraintError",
  "sql": "DELETE FROM `Shifts` WHERE `id` = 4",
  "parameters": {},
  "context": {
    "endpoint": "DELETE /api/shifts/4"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 139747328,
      "heapTotal": 91795456,
      "heapUsed": 39326736,
      "external": 2507845,
      "arrayBuffers": 189970
    },
    "uptime": 35.5686547
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450530075_vhlpeiiq8",
  "timestamp": "2025-10-14T14:02:10.075Z",
  "message": "Cannot delete or update a parent row: a foreign key constraint fails (`meta`.`shiftsessions`, CONSTRAINT `shiftsessions_ibfk_1` FOREIGN KEY (`shiftId`) REFERENCES `shifts` (`id`) ON UPDATE CASCADE)",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.delete (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:393:12)\n    at async model.destroy (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:2627:16)\n    at async exports.deleteShift (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftController.js:225:5)",
  "name": "SequelizeForeignKeyConstraintError",
  "sql": "DELETE FROM `Shifts` WHERE `id` = 3",
  "parameters": {},
  "context": {
    "endpoint": "DELETE /api/shifts/3"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 81842176,
      "heapTotal": 33075200,
      "heapUsed": 30624552,
      "external": 2344150,
      "arrayBuffers": 26275
    },
    "uptime": 39.1865708
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450653931_bclafs506",
  "timestamp": "2025-10-14T14:04:13.931Z",
  "message": "Cannot delete or update a parent row: a foreign key constraint fails (`meta`.`shiftsessions`, CONSTRAINT `shiftsessions_ibfk_1` FOREIGN KEY (`shiftId`) REFERENCES `shifts` (`id`) ON UPDATE CASCADE)",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.delete (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:393:12)\n    at async model.destroy (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:2627:16)\n    at async exports.deleteShift (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftController.js:225:5)",
  "name": "SequelizeForeignKeyConstraintError",
  "sql": "DELETE FROM `Shifts` WHERE `id` = 4",
  "parameters": {},
  "context": {
    "endpoint": "DELETE /api/shifts/4"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 90468352,
      "heapTotal": 40677376,
      "heapUsed": 37186904,
      "external": 2387521,
      "arrayBuffers": 69646
    },
    "uptime": 163.0446359
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760450683724_s7846i3oc",
  "timestamp": "2025-10-14T14:04:43.724Z",
  "message": "Cannot delete or update a parent row: a foreign key constraint fails (`meta`.`shiftsessions`, CONSTRAINT `shiftsessions_ibfk_1` FOREIGN KEY (`shiftId`) REFERENCES `shifts` (`id`) ON UPDATE CASCADE)",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.delete (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:393:12)\n    at async model.destroy (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:2627:16)\n    at async exports.deleteShift (E:\\مشاريع 2025\\MetaCoffe\\backend\\controllers\\shiftController.js:225:5)",
  "name": "SequelizeForeignKeyConstraintError",
  "sql": "DELETE FROM `Shifts` WHERE `id` = 4",
  "parameters": {},
  "context": {
    "endpoint": "DELETE /api/shifts/4"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 90865664,
      "heapTotal": 39890944,
      "heapUsed": 37989312,
      "external": 2396511,
      "arrayBuffers": 78636
    },
    "uptime": 192.8355501
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451108799_4kznbj71r",
  "timestamp": "2025-10-14T14:11:48.799Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 98852864,
      "heapTotal": 45658112,
      "heapUsed": 38505928,
      "external": 2422697,
      "arrayBuffers": 104822
    },
    "uptime": 617.9116498
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451109272_5j5y9eg0a",
  "timestamp": "2025-10-14T14:11:49.272Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 99008512,
      "heapTotal": 46706688,
      "heapUsed": 37923328,
      "external": 2410601,
      "arrayBuffers": 92726
    },
    "uptime": 618.3851612
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451109840_rjqz7z2cr",
  "timestamp": "2025-10-14T14:11:49.840Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 99545088,
      "heapTotal": 46706688,
      "heapUsed": 38125840,
      "external": 2410666,
      "arrayBuffers": 92791
    },
    "uptime": 618.9525861
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451674138_1q9eaa5ih",
  "timestamp": "2025-10-14T14:21:14.138Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 90017792,
      "heapTotal": 39628800,
      "heapUsed": 37548920,
      "external": 2374230,
      "arrayBuffers": 56395
    },
    "uptime": 110.5510119
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451674722_0j9q2kow5",
  "timestamp": "2025-10-14T14:21:14.722Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 90558464,
      "heapTotal": 41201664,
      "heapUsed": 37647408,
      "external": 2374813,
      "arrayBuffers": 56938
    },
    "uptime": 111.134764
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1760451676233_2kq1rcy2s",
  "timestamp": "2025-10-14T14:21:16.233Z",
  "message": "Incorrect DATE value: 'Invalid date'",
  "stack": "Error\n    at Query.run (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at async MySQLQueryInterface.select (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async QuickSale.findAll (E:\\مشاريع 2025\\MetaCoffe\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async E:\\مشاريع 2025\\MetaCoffe\\backend\\routes\\quickSaleRoutes.js:505:19",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `status`, `payment_method` AS `paymentMethod`, `total_amount` AS `totalAmount`, `subtotal`, `discount_amount` AS `discountAmount`, `tax_amount` AS `taxAmount` FROM `quick_sales` AS `QuickSale` WHERE `QuickSale`.`branch_id` = 'undefined' AND `QuickSale`.`sale_date` BETWEEN 'Invalid date' AND 'Invalid date';",
  "parameters": {},
  "context": {
    "endpoint": "GET /api/v1/quick-sales/stats/summary",
    "query": {
      "branchId": "undefined",
      "dateFrom": "undefined",
      "dateTo": "undefined"
    }
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 90562560,
      "heapTotal": 41201664,
      "heapUsed": 37862032,
      "external": 2383070,
      "arrayBuffers": 65195
    },
    "uptime": 112.646508
  }
}
----------------------------------------------------------------------------------------------------
