diff --git a/src/mapmarkers/mapmarker.dto.ts b/src/mapmarkers/mapmarker.dto.ts index eab9dc6c55d4a1aeada99bf82b37f1ce2cb10ca1..d4a7f8cd9e8b1306a06c1d2036f5b73eeca2ff0d 100644 --- a/src/mapmarkers/mapmarker.dto.ts +++ b/src/mapmarkers/mapmarker.dto.ts @@ -1,5 +1,4 @@ -import { IsString, IsDateString } from 'class-validator'; -import { Timestamp } from 'typeorm'; +import { IsString, IsJSON } from 'class-validator'; export class MapMarkerDTO { @IsString() @@ -10,4 +9,6 @@ export class MapMarkerDTO { longitude: string; @IsString() timestamp: string; + @IsJSON() + features: JSON; } \ No newline at end of file diff --git a/src/mapmarkers/mapmarker.entity.ts b/src/mapmarkers/mapmarker.entity.ts index 39ff2b2663473acba2ca17d9b13ed8be3a845c41..ffee47e697b257673a8df560ca58d7ef91f1b8c5 100644 --- a/src/mapmarkers/mapmarker.entity.ts +++ b/src/mapmarkers/mapmarker.entity.ts @@ -8,6 +8,7 @@ export class MapMarkerEntity { @Column({type: 'text'}) latitude: string; @Column({type: 'text'}) longitude: string; @Column({type: 'timestamp'}) timestamp: Timestamp; + @Column({type: 'json', nullable: true}) features: JSON; @ManyToOne(type => PersonEntity, player => player.markers) player: PersonEntity; } \ No newline at end of file