시드 생성

This commit is contained in:
2025-04-24 12:01:51 +09:00
parent beac42d60c
commit 7fa99e6988
42 changed files with 938 additions and 1170 deletions
+9 -16
View File
@@ -27,7 +27,6 @@ exports.getAllEvents = async (req, res) => {
},
{
model: EventParticipant,
as: 'participants',
attributes: ['id', 'status', 'paymentStatus'],
where: {
status: { [Op.ne]: '취소' }
@@ -79,16 +78,15 @@ exports.getEventById = async (req, res) => {
},
{
model: EventParticipant,
as: 'participants',
attributes: ['id', 'status', 'paymentStatus'],
where: {
status: { [Op.ne]: '취소' }
},
attributes: ['id', 'status', 'paymentStatus', 'teamNumber'],
where: { status: { [Op.ne]: '취소' } },
required: false,
include: [{
model: Member,
attributes: ['id', 'name']
}]
include: [
{
model: Member,
attributes: ['id', 'name', 'average']
}
]
}
]
});
@@ -244,7 +242,6 @@ exports.updateEvent = async (req, res) => {
},
{
model: EventParticipant,
as: 'participants',
attributes: ['id', 'status'],
where: {
status: { [Op.ne]: '취소' }
@@ -355,7 +352,6 @@ exports.getEventScores = async (req, res) => {
include: [
{
model: EventParticipant,
as: 'participant',
attributes: ['id', 'status'],
include: [{
model: Member,
@@ -618,7 +614,6 @@ exports.deleteEventScore = async (req, res) => {
include: [
{
model: EventParticipant,
as: 'participant',
attributes: ['id', 'status'],
include: [{
model: Member,
@@ -702,7 +697,6 @@ exports.getEventStats = async (req, res) => {
],
include: [{
model: EventParticipant,
as: 'participant',
attributes: [],
include: [{
model: Member,
@@ -934,7 +928,6 @@ exports.getUserEvents = async (req, res) => {
include: [
{
model: EventParticipant,
as: 'participants',
where: { userId },
attributes: []
},
@@ -983,7 +976,7 @@ exports.getEventParticipants = async (req, res) => {
include: [
{
model: Member,
attributes: ['id', 'name', 'email', 'phone', 'memberType']
attributes: ['id', 'name', 'email', 'phone', 'memberType', 'average']
}
],
order: [