X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Form%2Fentities%2FPerformanceRecord.ts;h=a0ee77e756f4f2d9e628c002963ec16c8c8588fc;hb=43be4c0834fe806a68f99036805779f29058d74e;hp=36db5c5bc1b2f19235afac093074c3db4aabe310;hpb=1552a66625ca8840ce475d2393b5c251630adf00;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/orm/entities/PerformanceRecord.ts b/src/types/orm/entities/PerformanceRecord.ts index 36db5c5b..a0ee77e7 100644 --- a/src/types/orm/entities/PerformanceRecord.ts +++ b/src/types/orm/entities/PerformanceRecord.ts @@ -1,21 +1,24 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core' -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import type { PerformanceData } from './PerformanceData.js' +import { PerformanceData } from './PerformanceData.js' @Entity() export class PerformanceRecord { - // @PrimaryKey() - // pk!: number - // @Property() - // id!: string - // @Property() - // URI!: string - // @Property() - // createdAt!: Date - // @Property() - // updatedAt?: Date - // @OneToMany('PerformanceData', 'performanceRecord') - // performanceData? = new Collection(this) + @PrimaryKey() + id!: string + + @Property() + name!: string + + @Property() + uri!: string + + @Property() + createdAt!: Date + + @Property() + updatedAt?: Date + + @OneToMany(() => PerformanceData, performanceData => performanceData.performanceRecord) + performanceData? = new Collection(this) }