Skip to content
Snippets Groups Projects
Commit 4e62421d authored by 심재엽's avatar 심재엽
Browse files

refactor: 번개모임 조회, 상세 조회 dto 추가 (#9)

parent 8300ebdc
No related branches found
No related tags found
2 merge requests!31Develop,!11[#9] 번개모임, 채팅 로직 구현
class MeetingDetailResponse {
constructor(meeting) {
this.id = meeting.id;
this.title = meeting.title;
this.description = meeting.description;
this.startTime = meeting.start_time;
this.endTime = meeting.end_time;
this.location = meeting.location;
this.deadline = meeting.deadline;
this.type = meeting.type;
this.creatorName = meeting.creator ? meeting.creator.name : 'Unknown';
this.participants = meeting.participants.map(participant => ({
userId: participant.user_id,
name: participant.participantUser ? participant.participantUser.name : 'Unknown',
email: participant.participantUser ? participant.participantUser.email : 'Unknown'
}));
}
}
module.exports = MeetingDetailResponse;
\ No newline at end of file
// dtos/MeetingResponse.js
class MeetingResponse {
constructor(meeting, isParticipant, isScheduleConflict, creatorName) {
this.id = meeting.id;
this.title = meeting.title;
this.description = meeting.description;
this.startTime = meeting.start_time;
this.endTime = meeting.end_time;
this.location = meeting.location;
this.deadline = meeting.deadline;
this.type = meeting.type;
this.creatorName = creatorName;
this.isParticipant = isParticipant;
this.isScheduleConflict = isScheduleConflict;
}
}
module.exports = MeetingResponse;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment