Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

## 🛠 기술 스택

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/modules/complaints/complaints.repo.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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<ComplaintRawResponseDto> => {
return await prisma.complaint.update({
where: { id: complaintId },
data: {
Expand Down
25 changes: 25 additions & 0 deletions src/modules/complaints/dto/response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}>;
}