Files
internship_node/day13/models/order.js
T
2025-07-17 21:55:47 +01:00

25 lines
506 B
JavaScript

module.exports = (sequelize, DataTypes) => {
const order = sequelize.define("order", {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
total: { type: DataTypes.INTEGER, allowNull: false },
stripe_id: {
type: DataTypes.STRING,
allowNull: false,
},
product_id: {
type: DataTypes.INTEGER,
allowNull: false,
},
status: {
type: DataTypes.INTEGER,
allowNull: false,
},
});
return order;
};