-
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.
Merge pull request #1391 from academic-relations/dev
2024-01-26 배포
- Loading branch information
Showing
121 changed files
with
3,116 additions
and
986 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
2 changes: 1 addition & 1 deletion
2
packages/api/src/feature/activity-certificate/activity-certificate.module.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
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
21 changes: 21 additions & 0 deletions
21
packages/api/src/feature/activity/model/activity.duration.model.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,21 @@ | ||
import { IActivityDuration } from "@sparcs-clubs/interface/api/activity/type/activity.duration.type"; | ||
|
||
export class MActivityDuration implements IActivityDuration { | ||
id: number; | ||
|
||
year: number; | ||
|
||
name: string; | ||
|
||
startTerm: Date; | ||
|
||
endTerm: Date; | ||
|
||
createdAt: Date; | ||
|
||
deletedAt: Date | null; | ||
|
||
constructor(data: IActivityDuration) { | ||
Object.assign(this, data); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
packages/api/src/feature/activity/model/activity.summary.model.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,73 @@ | ||
import { IActivitySummary } from "@sparcs-clubs/interface/api/activity/type/activity.type"; | ||
import { | ||
ActivityStatusEnum, | ||
ActivityTypeEnum, | ||
} from "@sparcs-clubs/interface/common/enum/activity.enum"; | ||
|
||
export class VActivitySummary implements IActivitySummary { | ||
id: number; | ||
|
||
activityStatusEnum: ActivityStatusEnum; | ||
|
||
activityTypeEnum: ActivityTypeEnum; | ||
|
||
club: { | ||
id: number; | ||
}; | ||
|
||
name: string; | ||
|
||
commentedAt: Date | null; | ||
|
||
editedAt: Date; | ||
|
||
updatedAt: Date; | ||
|
||
chargedExecutive: { | ||
id: number; | ||
}; | ||
|
||
commentedExecutive: { | ||
id: number; | ||
}; | ||
|
||
constructor(data: VActivitySummary) { | ||
Object.assign(this, data); | ||
} | ||
|
||
static fromDBResult(activity: { | ||
id: number; | ||
activityStatusEnumId: ActivityStatusEnum; | ||
activityTypeEnumId: ActivityTypeEnum; | ||
clubId: number; | ||
name: string; | ||
commentedAt: Date | null; | ||
editedAt: Date; | ||
updatedAt: Date; | ||
chargedExecutiveId?: number; | ||
commentedExecutiveId?: number; | ||
}): VActivitySummary { | ||
return new VActivitySummary({ | ||
id: activity.id, | ||
activityStatusEnum: activity.activityStatusEnumId, | ||
activityTypeEnum: activity.activityTypeEnumId, | ||
club: { | ||
id: activity.clubId, | ||
}, | ||
name: activity.name, | ||
commentedAt: activity.commentedAt, | ||
editedAt: activity.editedAt, | ||
updatedAt: activity.updatedAt, | ||
chargedExecutive: activity.chargedExecutiveId | ||
? { | ||
id: activity.chargedExecutiveId, | ||
} | ||
: undefined, | ||
commentedExecutive: activity.commentedExecutiveId | ||
? { | ||
id: activity.commentedExecutiveId, | ||
} | ||
: undefined, | ||
}); | ||
} | ||
} |
Oops, something went wrong.