7b3fd1298d
- 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.
34 lines
901 B
JavaScript
34 lines
901 B
JavaScript
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;
|
|
};
|