71 lines
1.4 KiB
JavaScript
71 lines
1.4 KiB
JavaScript
'use strict';
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.createTable('orders', {
|
|
id: {
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
type: Sequelize.INTEGER
|
|
},
|
|
date: {
|
|
type: Sequelize.DATE
|
|
},
|
|
userId: {
|
|
type: Sequelize.INTEGER
|
|
},
|
|
storeId: {
|
|
type: Sequelize.INTEGER
|
|
},
|
|
prescriptionId: {
|
|
type: Sequelize.INTEGER
|
|
},
|
|
deviceId:
|
|
{
|
|
allowNull: false,
|
|
type:Sequelize.STRING
|
|
},
|
|
quantity:{
|
|
type: Sequelize.INTEGER
|
|
},
|
|
amount: {
|
|
type: Sequelize.DOUBLE
|
|
},
|
|
discount: {
|
|
type: Sequelize.DOUBLE
|
|
},
|
|
deliveryfee: {
|
|
type: Sequelize.DOUBLE
|
|
},
|
|
total: {
|
|
type: Sequelize.DOUBLE
|
|
},
|
|
paymentMethod:{
|
|
type : Sequelize.INTEGER},// 1 -pod, 2-upi
|
|
orderProcessId: {
|
|
type: Sequelize.INTEGER
|
|
},
|
|
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('orders');
|
|
}
|
|
}; |