mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
23 lines
993 B
JavaScript
23 lines
993 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.createTable('tier_plans', {
|
|
plan_id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true },
|
|
tier: { type: Sequelize.ENUM('premium', 'exclusive'), allowNull: false },
|
|
label: { type: Sequelize.STRING(100), allowNull: false },
|
|
duration_days: { type: Sequelize.INTEGER, allowNull: false },
|
|
price: { type: Sequelize.DECIMAL(10, 2), allowNull: false },
|
|
currency: { type: Sequelize.CHAR(3), allowNull: false, defaultValue: 'USD' },
|
|
is_active: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: true },
|
|
createdAt: { type: Sequelize.DATE, allowNull: false },
|
|
updatedAt: { type: Sequelize.DATE, allowNull: false },
|
|
deletedAt: { type: Sequelize.DATE, allowNull: true },
|
|
});
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.dropTable('tier_plans');
|
|
},
|
|
};
|