From f57e31a8a3625e3eeed8082200d3b2948e2ef42c Mon Sep 17 00:00:00 2001 From: Alexey Boltava Date: Fri, 28 Oct 2016 20:09:10 +0700 Subject: [PATCH] Resolve conflict with local model.ts --- src/lib/model.ts | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/lib/model.ts diff --git a/src/lib/model.ts b/src/lib/model.ts new file mode 100644 index 0000000..6a32f94 --- /dev/null +++ b/src/lib/model.ts @@ -0,0 +1,70 @@ +export interface Entity { + id: string; + createdAt?: Date; + createdBy?: string; + updatedAt?: Date; + updatedBy?: string; +} + +export interface User extends Entity { + name: string; + email?: string; + login?: string; + pwdhash?: string; // password hash + avatar?: string; // URL to avatar image, e.g. it could be a gravatar URL or URL to uploaded image + role?: string; + position?: string; + place?: string; +} + +export interface Team extends Entity { + name: string; + avatar: string; + description: string; + members?: User[]; // only as part of API payload, actually stored in separate association table TeamMembers +} + +export interface TeamMember { + id: string; + createdAt?: Date; + createdBy?: string; + teamId: string; + userId: string; +} + +export interface Organization extends Entity { + name: string; + avatar: string; + description: string; + teams: Team[]; +} + +export interface Event extends Entity { + type: string; + comment: string; + calendarId: string; + start: Date; + end: Date; +} + +export interface Calendar extends Entity { + name: string; + type: string; + description: string; + teamId: string; + events?: Event[]; // only as part of API payload, actually stored in separate association table CalendarEvents +} + +export interface CalendarEvent { + id: string; + createdAt?: Date; + createdBy?: string; + calendarId: string; + eventId: string; +} + +export interface Notification extends Entity { + message: string; + userId: string; + teamId: string; +}