Skip to content

Commit 5977dee

Browse files
holmir97hyundang
andauthored
Feat/#12 (#21)
* feat: hashtag model 삭제 * feat: add column interest * feat: add column interest * feat: delete hastag * feat: delete relation post to hashtag * fix: concert DTO * feat: concert index * feat: concert route * feat: concert index * feat: concert index * refactor: getConcertAll api * feat: concert detail route * feat: add concert DTO * refactor: getConcertDetail api * refactor: getConcertSearch api * feat: concertComment route * refactor: postConcertComment api * refactor: like, scrap api * fix: parameter type * fix: response type * fix: [ERR_HTTP_HEADERS_SENT] * fix: variable naming * fix: response message * fix: route url * fix: comment DTO * fix: models * refactor: comment structure * Feat/#10 (#20) * chore: ejs 설정 * feat: challenge 등록 구현 * refactor: model import 수정 * feat: controller dto 추가 * fix: User Model에 img 필드 추가 * fix: Comment, Post model 변경 - comments 필드 추가 * feat: 댓글 등록 구현 * fix: Error [ERR_HTTP_HEADERS_SENT] 해결 * fix: Model 변경 - Badge, User, UserInfo * feat: 좋아요 등록 구현 * feat: 스크랩 등록 구현 * style: 주석 변경 * style: 변수명 변경 * fix: model 수정 - Challenge, Concert에서 timestamp 삭제 - Challenge에서 generation 삭제 - Post에 generation 추가 * feat: commentDTO 추가 * fix: model 변경사항 반영, commentDTO 추가 * feat: 챌린지 전체 불러오기 구현 * fix: model에서 timestamp 삭제 * fix: Badge timestamp 추가 * feat: userinfo 삭제 * style: 주석, 줄바꿈 * feat: challenge api 구현 - 챌린지 검색 get - 챌린지 상세 정보 get - 챌린지 수정 patch * fix: join -> require 추가 * fix: challenge patch api 수정 - 데이터 업데이트 부분 수정 * feat: challenge api 구현 - 회고 삭제 - 좋아요 취소 - 스크랩 취소 * fix: 전체 조회 - required 추가 * fix: Get challenge/:challengeID - isLike, isScrap 추가 * fix: post comment -> res data 삭제 * fix: 8/23일자 수정사항 반영 - Post model에 userLikes, userScraps 추가 - Comment model에 children, comment 추가 - Hashtag model 삭제 - 댓글 파싱 로직 변경 - 댓글 join 수정(required: false, order 추기) - isLikes, isScraps 로직 수정 * feat: add column interest * feat: delete hastag * fix: concert DTO * feat: concert index * feat: concert route * feat: concert index * feat: concert index * refactor: getConcertAll api * feat: concert detail route * feat: add concert DTO * refactor: getConcertDetail api * refactor: getConcertSearch api * feat: concertComment route * refactor: postConcertComment api * refactor: like, scrap api * fix: parameter type * fix: response type * fix: [ERR_HTTP_HEADERS_SENT] * fix: variable naming * fix: response message * fix: route url * fix: models * refactor: comment structure Co-authored-by: Hyunjin <[email protected]> Co-authored-by: Go Seongyong <holmir97>
1 parent 1d647a7 commit 5977dee

File tree

13 files changed

+803
-539
lines changed

13 files changed

+803
-539
lines changed

src/DTO/concertDTO.ts

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
1-
import mongoose from "mongoose";
2-
import { userHeaderDTO } from "./userDTO";
3-
import { commentResDTO } from "./commentDTO";
1+
import { commentDTO } from ".";
42

5-
export interface IConcertDTO {
6-
_id?: mongoose.Schema.Types.ObjectId;
7-
createdAt?: Date;
8-
updatedAt?: Date;
9-
user?: userHeaderDTO;
10-
title?: string;
11-
videoLink?: string;
12-
imgThumbnail?: string;
13-
text?: string;
14-
likes?: Number;
15-
interest?: [string];
16-
hashtag?: [string];
17-
isDeleted?: Boolean;
18-
isNotice?: Boolean;
19-
authorNickname?: string;
20-
commentNum?: number;
21-
scrapNum?: number;
22-
generation?: number;
23-
comments?: commentResDTO[];
24-
isLike?: boolean;
25-
isScrap?: boolean;
26-
}
3+
namespace concertDTO {
4+
export interface getConcertResDTO {
5+
id: number;
6+
createdAt: Date;
7+
updatedAt: Date;
8+
userID: number;
9+
nickname: string;
10+
authorNickname: string;
11+
title: string;
12+
videoLink: string;
13+
img: string;
14+
imgThumbnail: string;
15+
text: string;
16+
interest: string[];
17+
hashtag: string[];
18+
isDeleted: Boolean;
19+
isNotice: Boolean;
20+
likeNum: number;
21+
scrapNum: number;
22+
commentNum: number;
23+
comment: commentDTO.IComment[];
24+
isLike?: boolean;
25+
isScrap?: boolean;
26+
}
2727

28-
export interface IConcertDetailDTO {
29-
_id?: mongoose.Schema.Types.ObjectId;
30-
createdAt?: Date;
31-
updatedAt?: Date;
32-
user?: userHeaderDTO;
33-
title?: string;
34-
videoLink?: string;
35-
imgThumbnail?: string;
36-
text?: string;
37-
likes?: Number;
38-
interest?: [string];
39-
hashtag?: [string];
40-
isDeleted?: Boolean;
41-
isNotice?: Boolean;
42-
authorNickname?: string;
43-
commentNum?: number;
44-
scrapNum?: number;
45-
generation?: number;
46-
comments?: typeof mongoose.Schema.Types.ObjectId[];
47-
}
28+
export interface concertDetailDTO {
29+
id: number;
30+
createdAt: Date;
31+
updatedAt: Date;
32+
userID: number;
33+
nickname: string;
34+
authorNickname: string;
35+
title: string;
36+
videoLink: string;
37+
imgThumbnail: string;
38+
text: string;
39+
interest: string[];
40+
hashtag: string[];
41+
isDeleted: Boolean;
42+
isNotice: Boolean;
43+
likeNum: number;
44+
scrapNum: number;
45+
commentNum: number;
46+
comment: commentDTO.IComment[];
47+
isLike?: boolean;
48+
isScrap?: boolean;
49+
}
4850

49-
export interface concertResDTO {
50-
concerts: IConcertDTO[];
51-
totalConcertNum?: number;
51+
export interface concertAllResDTO {
52+
concerts: getConcertResDTO[];
53+
totalConcertNum: number;
54+
}
5255
}
56+
export default concertDTO;

src/DTO/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export { default as adminDTO } from "./adminDTO";
22
export { default as authDTO } from "./authDTO";
33
export { default as challengeDTO } from "./challengeDTO";
4+
export { default as concertDTO } from "./concertDTO";
45
export { default as commentDTO } from "./commentDTO";

0 commit comments

Comments
 (0)