This commit is contained in:
2025-05-14 00:56:29 +09:00
parent 1db3a03ffd
commit 8e9b941a28
6 changed files with 64 additions and 44 deletions
@@ -2,10 +2,11 @@ module.exports = {
up: async (queryInterface, Sequelize) => {
// 각 클럽 5개에 대해 2개의 구독(플랜 1, 2)을 연결
const clubSubscriptions = [];
const now = new Date();
for (let clubId = 1; clubId <= 5; clubId++) {
const planId = Math.floor(Math.random() * 2) + 1; // 랜덤으로 플랜 1, 2 중 하나 선택
const startDate = new Date(2025, 4, 1 + clubId);
const endDate = new Date(startDate.getFullYear(), startDate.getMonth()+1, startDate.getDate());
const startDate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + clubId);
const endDate = new Date(startDate.getFullYear(), startDate.getMonth()+clubId, startDate.getDate());
clubSubscriptions.push({
clubId,
planId,