[offers][chore] Add createdAt and updatedAt to analysis

pull/471/head
Bryann Yeap Kok Keong 3 years ago committed by Ai Ling
parent d0b5867dd7
commit 5a6a24a907

@ -395,7 +395,9 @@ model OffersFullTime {
}
model OffersAnalysis {
id String @id @default(cuid())
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
profile OffersProfile @relation(fields: [profileId], references: [id], onDelete: Cascade)
profileId String @unique

@ -234,12 +234,14 @@ export const profileAnalysisDtoMapper = (
companyAnalysis: analysis.companyAnalysis.map((analysisUnit) =>
analysisUnitDtoMapper(analysisUnit),
),
createdAt: analysis.createdAt,
id: analysis.id,
overallAnalysis: analysisUnitDtoMapper(analysis.overallAnalysis),
overallHighestOffer: analysisHighestOfferDtoMapper(
analysis.overallHighestOffer,
),
profileId: analysis.profileId,
updatedAt: analysis.updatedAt,
};
return profileAnalysisDto;
};

@ -144,10 +144,12 @@ export type OffersDiscussion = {
export type ProfileAnalysis = {
companyAnalysis: Array<AnalysisUnit>;
createdAt: Date;
id: string;
overallAnalysis: AnalysisUnit;
overallHighestOffer: AnalysisHighestOffer;
profileId: string;
updatedAt: Date;
};
export type AnalysisUnit = {

Loading…
Cancel
Save