Add order, shipping dock, and transaction routes with CRUD operations and Swagger documentation

- Implemented GET, POST, PUT, and DELETE endpoints for orders, shipping docks, and transactions.
- Added Swagger annotations for API documentation.
- Included error handling for database operations.
- Configured pnpm workspace to ignore built dependencies for sqlite3.
This commit is contained in:
bolade
2025-11-12 11:12:05 +01:00
parent 1703819bda
commit 7b3fd1298d
12 changed files with 3323 additions and 66 deletions
+33
View File
@@ -0,0 +1,33 @@
module.exports = (sequelize, DataTypes) => {
const shipping_dock = sequelize.define(
"shipping_dock",
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},
status: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 1,
comment: "1: active, 0: inactive",
},
created_at: DataTypes.DATE,
updated_at: DataTypes.DATE,
},
{
timestamps: true,
freezeTableName: true,
tableName: "shipping_dock",
createdAt: "created_at",
updatedAt: "updated_at",
}
);
return shipping_dock;
};