Skip to content

Commit

Permalink
✨ 등록 페이지 나누기, 제작
Browse files Browse the repository at this point in the history
  • Loading branch information
pbc1017 committed Feb 25, 2024
1 parent c7e1382 commit bf5b284
Show file tree
Hide file tree
Showing 29 changed files with 5,148 additions and 633 deletions.
156 changes: 156 additions & 0 deletions back/models/Registration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('Registration', {
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
club_id: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'Club',
key: 'id'
}
},
type_id: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'RegistrationType',
key: 'type_id'
}
},
semester_id: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'Semester',
key: 'id'
}
},
prev_name: {
type: DataTypes.STRING(255),
allowNull: true
},
current_name: {
type: DataTypes.STRING(255),
allowNull: true
},
founding_month: {
type: DataTypes.DATEONLY,
allowNull: true
},
division: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'Division',
key: 'id'
}
},
is_advisor: {
type: DataTypes.SMALLINT,
allowNull: true
},
advisor_name: {
type: DataTypes.STRING(255),
allowNull: true
},
advisor_email: {
type: DataTypes.STRING(255),
allowNull: true
},
advisor_level: {
type: DataTypes.INTEGER,
allowNull: true
},
characteristic_kr: {
type: DataTypes.STRING(255),
allowNull: true
},
characteristic_en: {
type: DataTypes.STRING(255),
allowNull: true
},
division_consistency: {
type: DataTypes.TEXT,
allowNull: true
},
purpose: {
type: DataTypes.TEXT,
allowNull: true
},
main_plan: {
type: DataTypes.TEXT,
allowNull: true
},
advisor_plan: {
type: DataTypes.TEXT,
allowNull: true
},
recent_edit: {
type: DataTypes.DATE,
allowNull: true
},
student_id: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'Member',
key: 'student_id'
}
}
}, {
sequelize,
tableName: 'Registration',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "id" },
]
},
{
name: "Registration_Club_id_fk",
using: "BTREE",
fields: [
{ name: "club_id" },
]
},
{
name: "Registration_Division_id_fk",
using: "BTREE",
fields: [
{ name: "division" },
]
},
{
name: "Registration_RegistrationType_type_id_fk",
using: "BTREE",
fields: [
{ name: "type_id" },
]
},
{
name: "Registration_Semester_id_fk",
using: "BTREE",
fields: [
{ name: "semester_id" },
]
},
{
name: "Registration_Member_student_id_fk",
using: "BTREE",
fields: [
{ name: "student_id" },
]
},
]
});
};
121 changes: 121 additions & 0 deletions back/models/RegistrationActivity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('RegistrationActivity', {
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
registration: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'Registration',
key: 'id'
}
},
club_id: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'Club',
key: 'id'
}
},
title: {
type: DataTypes.STRING(255),
allowNull: false
},
activity_type_id: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'ActivityType',
key: 'id'
}
},
start_date: {
type: DataTypes.DATEONLY,
allowNull: false
},
end_date: {
type: DataTypes.DATEONLY,
allowNull: false
},
location: {
type: DataTypes.STRING(255),
allowNull: false
},
purpose: {
type: DataTypes.TEXT,
allowNull: false
},
content: {
type: DataTypes.TEXT,
allowNull: false
},
proof_text: {
type: DataTypes.TEXT,
allowNull: true
},
feedback_type: {
type: DataTypes.INTEGER,
allowNull: true,
references: {
model: 'ActivityFeedbackType',
key: 'id'
}
},
recent_edit: {
type: DataTypes.DATE,
allowNull: true
},
recent_feedback: {
type: DataTypes.DATE,
allowNull: true
}
}, {
sequelize,
tableName: 'RegistrationActivity',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "id" },
]
},
{
name: "Activity_ActivityFeedbackType_id_fk_2",
using: "BTREE",
fields: [
{ name: "feedback_type" },
]
},
{
name: "Activity_ActivityType_id_fk_2",
using: "BTREE",
fields: [
{ name: "activity_type_id" },
]
},
{
name: "Activity_Club_id_fk_2",
using: "BTREE",
fields: [
{ name: "club_id" },
]
},
{
name: "RegistrationActivity_Registration_id_fk",
using: "BTREE",
fields: [
{ name: "registration" },
]
},
]
});
};
45 changes: 45 additions & 0 deletions back/models/RegistrationActivityEvidence.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('RegistrationActivityEvidence', {
activity_id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
references: {
model: 'RegistrationActivity',
key: 'id'
}
},
image_url: {
type: DataTypes.TEXT,
allowNull: false
},
description: {
type: DataTypes.STRING(511),
allowNull: false,
primaryKey: true
}
}, {
sequelize,
tableName: 'RegistrationActivityEvidence',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "description" },
{ name: "activity_id" },
]
},
{
name: "RegistrationActivityEvidence_RegistrationActivity_id_fk",
using: "BTREE",
fields: [
{ name: "activity_id" },
]
},
]
});
};
45 changes: 45 additions & 0 deletions back/models/RegistrationActivityMember.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('RegistrationActivityMember', {
activity_id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
references: {
model: 'RegistrationActivity',
key: 'id'
}
},
member_student_id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
references: {
model: 'Member',
key: 'student_id'
}
}
}, {
sequelize,
tableName: 'RegistrationActivityMember',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "activity_id" },
{ name: "member_student_id" },
]
},
{
name: "ActivityMember_Member_student_id_fk_2",
using: "BTREE",
fields: [
{ name: "member_student_id" },
]
},
]
});
};
28 changes: 28 additions & 0 deletions back/models/RegistrationEvidenceType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('RegistrationEvidenceType', {
type_id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
registration_evidence_type: {
type: DataTypes.STRING(255),
allowNull: true
}
}, {
sequelize,
tableName: 'RegistrationEvidenceType',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "type_id" },
]
},
]
});
};
Loading

0 comments on commit bf5b284

Please sign in to comment.