From a0de11b4537f70ebb659e4b47f43cb13a9094250 Mon Sep 17 00:00:00 2001 From: ztimson Date: Mon, 22 Jul 2019 13:04:04 -0400 Subject: [PATCH] Added some more interfaces --- src/app/models/drawing.ts | 6 ++++++ src/app/models/latlng.ts | 4 ++++ src/app/models/map.ts | 11 ++++++++++- src/app/models/marker.ts | 7 ++++--- src/app/models/measurement.ts | 6 ++++++ src/app/models/message.ts | 6 ++++++ src/app/models/user.ts | 7 +++++++ 7 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 src/app/models/drawing.ts create mode 100644 src/app/models/latlng.ts create mode 100644 src/app/models/measurement.ts create mode 100644 src/app/models/message.ts create mode 100644 src/app/models/user.ts diff --git a/src/app/models/drawing.ts b/src/app/models/drawing.ts new file mode 100644 index 0000000..3ed5a75 --- /dev/null +++ b/src/app/models/drawing.ts @@ -0,0 +1,6 @@ +import {LatLng} from "./latlng"; + +export interface Drawing { + color: string; + path: LatLng[]; +} diff --git a/src/app/models/latlng.ts b/src/app/models/latlng.ts new file mode 100644 index 0000000..818e6bf --- /dev/null +++ b/src/app/models/latlng.ts @@ -0,0 +1,4 @@ +export interface LatLng { + lat: number; + lng: number; +} diff --git a/src/app/models/map.ts b/src/app/models/map.ts index 8953072..210d09a 100644 --- a/src/app/models/map.ts +++ b/src/app/models/map.ts @@ -1,3 +1,12 @@ +import {Marker} from "./marker"; +import {Drawing} from "./drawing"; +import {User} from "./user"; +import {Message} from "./message"; + export interface Map { - name: string + drawings: Drawing[]; + markers: Marker[]; + messages: Message[]; + name: string; + users: User[]; } diff --git a/src/app/models/marker.ts b/src/app/models/marker.ts index dbd7125..98e2f5b 100644 --- a/src/app/models/marker.ts +++ b/src/app/models/marker.ts @@ -1,6 +1,7 @@ -export class Marker { - latitude: number; - longitude: number; +import {LatLng} from "./latlng"; + +export interface Marker { + latLng: LatLng; name: string; color: string; notes: string; diff --git a/src/app/models/measurement.ts b/src/app/models/measurement.ts new file mode 100644 index 0000000..e008bdf --- /dev/null +++ b/src/app/models/measurement.ts @@ -0,0 +1,6 @@ +import {LatLng} from "./latlng"; + +export interface Measurement { + start: LatLng; + end: LatLng; +} diff --git a/src/app/models/message.ts b/src/app/models/message.ts new file mode 100644 index 0000000..540119d --- /dev/null +++ b/src/app/models/message.ts @@ -0,0 +1,6 @@ +import {User} from "./user"; + +export interface Message { + from: User; + text: string; +} diff --git a/src/app/models/user.ts b/src/app/models/user.ts new file mode 100644 index 0000000..8d3b5a9 --- /dev/null +++ b/src/app/models/user.ts @@ -0,0 +1,7 @@ +import {LatLng} from "./latlng"; + +export interface User { + name: string; + icon: string; + latLng: LatLng; +}