-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§ fix : query λ³λ‘ μλ΅μ΄ μλ νλ²μ μμ²μ λκ°μ λνΉ λͺ¨λ μλ΅νκ² λ³κ²½(#124)
- Loading branch information
Showing
6 changed files
with
121 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class RankingDataDto { | ||
@ApiProperty({ | ||
description: 'μ¬μ©μ λλ€μ', | ||
example: 'trader123', | ||
}) | ||
nickname: string; | ||
|
||
@ApiProperty({ | ||
description: 'μμ΅λ₯ (%)', | ||
example: 15.7, | ||
required: false, | ||
}) | ||
profitRate?: number; | ||
|
||
@ApiProperty({ | ||
description: 'μ΄ μμ°', | ||
example: 1000000, | ||
required: false, | ||
}) | ||
totalAsset?: number; | ||
} |
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,13 +1,14 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { RankingResultDto } from './ranking-result.dto'; | ||
|
||
export class RankingResponseDto { | ||
@ApiProperty({ | ||
description: 'top 10 μ μ λνΉ', | ||
description: 'μμ΅λ₯ λνΉ', | ||
}) | ||
topRank: string[]; | ||
profitRateRanking: RankingResultDto; | ||
|
||
@ApiProperty({ | ||
description: 'λ‘κ·ΈμΈ ν μ μ μ λνΉ', | ||
description: 'μμ° λνΉ', | ||
}) | ||
userRank?: number | null; | ||
assetRanking: RankingResultDto; | ||
} |
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,17 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { RankingDataDto } from './ranking-data.dto'; | ||
|
||
export class RankingResultDto { | ||
@ApiProperty({ | ||
description: 'μμ 10λͺ μ λνΉ λ°μ΄ν°', | ||
type: [RankingDataDto], | ||
}) | ||
topRank: RankingDataDto[]; | ||
|
||
@ApiProperty({ | ||
description: 'νμ¬ μ¬μ©μμ μμ (μμ κ²½μ° null)', | ||
example: 42, | ||
nullable: true, | ||
}) | ||
userRank: number | null; | ||
} |
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 @@ | ||
export interface RankingData { | ||
nickname: string; | ||
profitRate?: number; | ||
totalAsset?: number; | ||
} |
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