Skip to content
Snippets Groups Projects
Commit be97636e authored by Samuli Virtapohja's avatar Samuli Virtapohja
Browse files

GeoJSON data to database

parent 95452139
No related branches found
No related tags found
3 merge requests!59Development to master,!9Development,!6GeoJSON data to database
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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment