-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor : album dto, entity 리팩토링 * Refactor : 앨범 응답 dto 수정 * Refactor : group dto, entity 리팩토링 * Refactor : group dto, entity 수정 및 controller async 추가 * Refactor : user dto, entity 리팩토링 * Refactor : post dto, entity 리팩토링 * Refactor : 게시글 불러오는 쿼리에서 postId 추가 * Refactor : docker-compose 수정 * Feat : 앨범 쿼리 최적화 * Feat : group 쿼리 최적화 * Refactor : auth controller service 주입 삭제
- Loading branch information
1 parent
2218d4f
commit 13e217d
Showing
30 changed files
with
369 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { Exclude } from "class-transformer"; | ||
import { Album } from "../album.entity"; | ||
|
||
export class CreateAlbumResponseDto { | ||
@Exclude() | ||
@ApiProperty() | ||
albumId: number; | ||
private readonly albumId: number; | ||
|
||
constructor(album: Album) { | ||
this.albumId = album.albumId; | ||
} | ||
|
||
static returnDto(album: Album) { | ||
return new CreateAlbumResponseDto(album); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { Exclude } from "class-transformer"; | ||
import { Group } from "../group.entity"; | ||
|
||
export class CreateGroupResponseDto { | ||
@Exclude() | ||
@ApiProperty() | ||
groupImage: string; | ||
private readonly groupId: number; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
groupId: number; | ||
private readonly groupImage: string; | ||
|
||
constructor(group: Group) { | ||
this.groupId = group.groupId; | ||
this.groupImage = group.groupImage; | ||
} | ||
|
||
static returnDto(group: Group) { | ||
return new CreateGroupResponseDto(group); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,52 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { Exclude } from "class-transformer"; | ||
|
||
class postList { | ||
@Exclude() | ||
@ApiProperty() | ||
postId: number; | ||
private readonly postId: number; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
postTitle: string; | ||
private readonly postTitle: string; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
postLatitude: number; | ||
private readonly postLatitude: number; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
postLongitude: number; | ||
private readonly postLongitude: number; | ||
} | ||
|
||
class albumList { | ||
@Exclude() | ||
@ApiProperty() | ||
albumId: number; | ||
private readonly albumId: number; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
albumName: string; | ||
private readonly albumName: string; | ||
|
||
@Exclude() | ||
@ApiProperty() | ||
base: boolean; | ||
private readonly base: boolean; | ||
|
||
@Exclude() | ||
@ApiProperty({ type: [postList] }) | ||
posts: postList[]; | ||
private readonly posts: postList[]; | ||
} | ||
|
||
export class GetAlbumsResponseDto { | ||
@Exclude() | ||
@ApiProperty({ type: [albumList] }) | ||
albums: albumList[]; | ||
private readonly albums: albumList[]; | ||
|
||
constructor(array: any[]) { | ||
this.albums = array; | ||
} | ||
|
||
static returnDto(array: any[]) { | ||
return new GetAlbumsResponseDto(array); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { Exclude } from "class-transformer"; | ||
import { UserInfoResponseDto } from "../../user/dto/userInfoResponse.dto"; | ||
import { Group } from "../group.entity"; | ||
|
||
export class GetGroupInfoResponseDto { | ||
@Exclude() | ||
@ApiProperty() | ||
groupCode: string; | ||
private readonly groupCode: string; | ||
|
||
@Exclude() | ||
@ApiProperty({ type: [UserInfoResponseDto] }) | ||
users: UserInfoResponseDto[]; | ||
private readonly users: UserInfoResponseDto[]; | ||
|
||
constructor(group: Group) { | ||
this.groupCode = group.groupCode; | ||
this.users = group.users; | ||
} | ||
|
||
static returnDto(group: Group) { | ||
return new GetGroupInfoResponseDto(group); | ||
} | ||
} |
12 changes: 11 additions & 1 deletion
12
backend/src/domain/group/dto/updateGroupInfoResponse.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { Exclude } from "class-transformer"; | ||
|
||
export class UpdateGroupInfoResponseDto { | ||
@Exclude() | ||
@ApiProperty() | ||
groupImage: string; | ||
private readonly groupImage: string; | ||
|
||
constructor(groupImage: string) { | ||
this.groupImage = groupImage; | ||
} | ||
|
||
static returnDto(groupImage: string) { | ||
return new UpdateGroupInfoResponseDto(groupImage); | ||
} | ||
} |
Oops, something went wrong.