-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GWL-247] [Feat]: paginate 함수에 find (FindManyOptions) -> queryBuilder…
…로 바꾸기 (#250) * fix: paginate queryBuilder 사용 * fix: profile service 변경한 paginate 적용 * fix: post swagger 작성 * chore: format 적용 * chore: src 제거 --------- Co-authored-by: jeong-yong-shin <[email protected]>
- Loading branch information
Showing
10 changed files
with
124 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export interface JoinType { | ||
joinColumn: string; | ||
joinAlias: string; | ||
} | ||
|
||
export interface QueryOptions { | ||
mainAlias: string; | ||
join?: JoinType[]; | ||
select?: string[]; | ||
} |
File renamed without changes.
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
26 changes: 26 additions & 0 deletions
26
BackEnd/src/posts/queryOptions/get-create-update.queryOptions.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { QueryOptions } from '../../common/type/query-options.type'; | ||
|
||
export const getCreateUpdateQueryOptions: QueryOptions = { | ||
mainAlias: 'post', | ||
join: [ | ||
{ | ||
joinColumn: 'post.record', | ||
joinAlias: 'record', | ||
}, | ||
{ | ||
joinColumn: 'post.profile', | ||
joinAlias: 'profile', | ||
}, | ||
], | ||
select: [ | ||
'post', | ||
'record.id', | ||
'record.workoutTime', | ||
'record.distance', | ||
'record.calorie', | ||
'record.avgHeartRate', | ||
'record.minHeartRate', | ||
'record.maxHeartRate', | ||
'profile.nickname', | ||
], | ||
}; |
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
5 changes: 5 additions & 0 deletions
5
BackEnd/src/profiles/queryOptions/get-profilePosts-queryOptions.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { QueryOptions } from '../../common/type/query-options.type'; | ||
|
||
export const getProfilePostsQueryOptions: QueryOptions = { | ||
mainAlias: 'profile', | ||
}; |