From be3b1ba9d1b04fae0e83aaf6d521476142b6ddc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=A1=B0=EB=8C=80=ED=9D=AC?= <joedaehui@ajou.ac.kr>
Date: Fri, 15 Nov 2024 14:04:58 +0900
Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=8A=A4=EC=BC=80=EC=A4=84=20?=
 =?UTF-8?q?=EB=AA=A8=EB=8D=B8=20=EC=BB=AC=EB=9F=BC=20=EC=B6=94=EA=B0=80=20?=
 =?UTF-8?q?(#6)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 models/schedule.js | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/models/schedule.js b/models/schedule.js
index a387899..19a78b2 100644
--- a/models/schedule.js
+++ b/models/schedule.js
@@ -1,5 +1,4 @@
 // models/Schedule.js
-
 const { DataTypes } = require('sequelize');
 const sequelize = require('../config/sequelize');
 const User = require('./User');
@@ -17,12 +16,21 @@ const Schedule = sequelize.define('Schedule', {
     type: DataTypes.DATE,
     allowNull: false,
   },
+  is_fixed: {
+    type: DataTypes.BOOLEAN,
+    allowNull: false,
+    defaultValue: false
+  },
+  expiry_date: {
+    type: DataTypes.DATE,
+    allowNull: true
+  }
 }, {
   tableName: 'Schedules',
-  timestamps: false,
+  timestamps: true,  // created_at과 updated_at 자동 관리
 });
 
 Schedule.belongsTo(User, { foreignKey: 'user_id', as: 'user' });
 User.hasMany(Schedule, { foreignKey: 'user_id', as: 'schedules' });
 
-module.exports = Schedule;
+module.exports = Schedule;
\ No newline at end of file
-- 
GitLab