54 lines
1.1 KiB
JavaScript
54 lines
1.1 KiB
JavaScript
|
'use strict';
|
||
|
module.exports = {
|
||
|
async up(queryInterface, Sequelize) {
|
||
|
await queryInterface.createTable('orderDetails', {
|
||
|
id: {
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
primaryKey: true,
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
orderId: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
medicineId: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
quantity: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
amount: {
|
||
|
type: Sequelize.DOUBLE
|
||
|
},
|
||
|
curdiscount: {
|
||
|
type: Sequelize.DOUBLE
|
||
|
},
|
||
|
discount: {
|
||
|
type: Sequelize.DOUBLE
|
||
|
},
|
||
|
total: {
|
||
|
type: Sequelize.DOUBLE
|
||
|
},
|
||
|
status: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
createdBy: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
updatedBy: {
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
createdAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
},
|
||
|
updatedAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
async down(queryInterface, Sequelize) {
|
||
|
await queryInterface.dropTable('orderDetails');
|
||
|
}
|
||
|
};
|