Skip to content

[EUM-1] feat: 정모 생성 API 구현#181

Open
jihuuuu wants to merge 1 commit into
devfrom
feat/EUM-1
Open

[EUM-1] feat: 정모 생성 API 구현#181
jihuuuu wants to merge 1 commit into
devfrom
feat/EUM-1

Conversation

@jihuuuu
Copy link
Copy Markdown
Contributor

@jihuuuu jihuuuu commented May 17, 2026

이슈 번호

close #180

주요 변경사항

  • 신규 ClubModule + 정모 생성 endpoint (POST /api/v1/clubs/:clubId/meetings)
    • 호스트(Club.hostId === userId)만 생성 가능
    • 요청 body: name, introText, date, spot, capacity, cost?, joinPolicy
    • 응답 DTO에 meetingId, attendeeCount(=0), isRegular, createdAt 포함
  • Meeting schema 확장 (migration 포함)
    • 추가 필드: introText(VarChar 200), capacity(Int), cost(VarChar 50?),
      joinPolicy(MeetingJoinPolicy)
    • date 타입 변경: DateTime → VarChar 100 (자연어 입력 허용, 예 "매주 목요일 저녁 19시")
    • 신규 enum MeetingJoinPolicy { AUTO, APPROVAL_REQUIRED }
  • 에러 코드 신규: CLUB-001 (NOT_FOUND), CLUB-002 (FORBIDDEN_NOT_HOST), MEETING-001
    (VALIDATION_FAILED)

테스트 결과 (스크린샷)

참고 및 개선사항

  • D-day 미구현: 디자인 우측 화면의 "D-4" 표시는 일단 보류. date를 자연어 String으로만 받기 때문에 backend에서 D-day 계산이 어렵습니다. 관련해서 논의 후 요구사항을 확정해야할 것 같습니다!

@jihuuuu jihuuuu self-assigned this May 17, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd30c75228

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +12 to +14
ALTER TABLE "Meeting" ADD COLUMN "capacity" INTEGER NOT NULL,
ADD COLUMN "cost" VARCHAR(50),
ADD COLUMN "introText" VARCHAR(200) NOT NULL,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Backfill existing rows before adding NOT NULL columns

This migration adds capacity and introText as NOT NULL without defaults, so it will fail on any environment where Meeting already has rows because PostgreSQL cannot populate existing records for new required columns automatically. That makes deployment-blocking migration errors likely outside empty dev databases; add a backfill/default step (or a two-phase migration) before enforcing NOT NULL.

Useful? React with 👍 / 👎.

if (!dto.spot) violations.push('spot');
if (!Number.isInteger(dto.capacity) || dto.capacity <= 0)
violations.push('capacity');
if (dto.cost !== undefined && dto.cost.length > 50) violations.push('cost');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard nullable cost before accessing .length

The API schema explicitly marks cost as nullable, but this validator checks dto.cost !== undefined and then reads dto.cost.length; when a client sends "cost": null, this throws a runtime TypeError instead of returning MEETING_VALIDATION_FAILED, causing a 500 path for a documented input shape. Treat null like an omitted value (or validate type first) before using .length.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유니크 제약조건 달기

Copy link
Copy Markdown
Contributor

@eschoi04 eschoi04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meeting.repository.ts에 유니크(필요하다면)추가하면 될 것 같습니다! 고생하셨습니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 정기모임 생성 API 구현

2 participants