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

pull/501/head^2
Bryann Yeap Kok Keong 3 years ago
parent dbe207f391
commit 48072394bc

@ -366,7 +366,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