forked from Code-4-Community/scaffolding
-
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.
feat: getAllApplications endpoint (#50)
* feat: getAllAplications endpoint resolves #44 * made Cycle fields private, and created env vars for year/semester * Application Summary DTO * feat: completed getAllApplications endpoint * fix: updated semester logic * fix: updated current semester function and dto mapping --------- Co-authored-by: Jonathan Chen <[email protected]> Co-authored-by: Harrison Kim <[email protected]>
- Loading branch information
1 parent
85fdaad
commit 756de32
Showing
6 changed files
with
108 additions
and
4 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
32 changes: 32 additions & 0 deletions
32
apps/backend/src/applications/dto/get-all-application.response.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { IsDate, IsEnum, IsPositive, IsString } from 'class-validator'; | ||
import { ApplicationStage, ApplicationStep, Position } from '../types'; | ||
|
||
export class GetAllApplicationResponseDTO { | ||
@IsPositive() | ||
userId: number; | ||
|
||
@IsString() | ||
firstName: string; | ||
|
||
@IsString() | ||
lastName: string; | ||
|
||
@IsEnum(ApplicationStage) | ||
stage: ApplicationStage; | ||
|
||
@IsEnum(ApplicationStep) | ||
step: ApplicationStep; | ||
|
||
@IsEnum(Position) | ||
position: Position; | ||
|
||
@IsDate() | ||
createdAt: Date; | ||
|
||
@IsPositive() | ||
meanRatingAllStages: number; | ||
|
||
// TODO: Should be a JSON or similar that defines scores for each stage | ||
@IsPositive() | ||
meanRatingSingleStages: 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