diff --git a/README.md b/README.md index 11ca125f..782cec0e 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ - Swagger 문서: https://api.mimu.live/docs - SUPER_ADMIN 계정 로그인 필요 - GitHub Repository: https://github.com/codeit-welive/welive -- 최종 발표 자료: 준비 중 -- 시연 영상: 준비 중 -- 팀 노션 문서: 준비 중 +- 최종 발표 자료: https://www.canva.com/design/DAG5lY6qiKI/GFW3js2SBZA3F8Q9vJrkLg/edit +- 시연 영상: https://drive.google.com/file/d/1C8UfyI5FkuQbRDflhq3Kx3OKuWppcZIU/view?usp=sharing +- 팀 노션 문서: notion.so/234e98c187a680acbd98e3590dce1382?source=copy_link ## 🛠 기술 스택 diff --git a/package-lock.json b/package-lock.json index fe70293d..cccd10d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "welive", - "version": "1.0.1", + "version": "1.0.6", "license": "MIT", "dependencies": { "@aws-sdk/client-s3": "^3.911.0", diff --git a/src/modules/complaints/complaints.repo.ts b/src/modules/complaints/complaints.repo.ts index b08a35d5..bd9787ea 100644 --- a/src/modules/complaints/complaints.repo.ts +++ b/src/modules/complaints/complaints.repo.ts @@ -1,5 +1,6 @@ import prisma from '../../core/prisma'; import { ComplaintCreateDto, ComplaintPatchDto } from './dto/complaints.dto'; +import { ComplaintRawResponseDto } from './dto/response.dto'; import { ComplaintListQuery } from './dto/querys.dto'; import { buildComplaintWhereConditions } from './complaints.util'; import { BoardType, ComplaintStatus } from '@prisma/client'; @@ -298,7 +299,10 @@ export const patch = async (complaintId: string, data: ComplaintPatchDto) => { * @param data - 변경할 상태 (ComplaintStatus) * @returns 상태가 변경된 민원 상세 정보 (작성자, 댓글 목록 포함) */ -export const patchStatus = async (complaintId: string, data: ComplaintStatus) => { +export const patchStatus = async ( + complaintId: string, + data: ComplaintStatus, +): Promise => { return await prisma.complaint.update({ where: { id: complaintId }, data: { diff --git a/src/modules/complaints/dto/response.dto.ts b/src/modules/complaints/dto/response.dto.ts index 03a47c90..7ce3635b 100644 --- a/src/modules/complaints/dto/response.dto.ts +++ b/src/modules/complaints/dto/response.dto.ts @@ -44,3 +44,28 @@ export interface ComplaintListItemResponseDto { dong: string; ho: string; } + +// Prisma 결과 Raw 응답 DTO (repo 반환용) +export interface ComplaintRawResponseDto { + id: string; + userId: string; + title: string; + status: ComplaintStatus; + isPublic: boolean; + createdAt: Date; + updatedAt: Date; + viewsCount: number; + content: string; + _count: { comments: number }; + user: { + name: string; + resident: { building: string; unitNumber: string } | null; + }; + comments: Array<{ + id: string; + content: string; + createdAt: Date; + updatedAt: Date; + user: { id: string; name: string }; + }>; +}