Skip to content

Commit

Permalink
Resolve conflict with local model.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
goodmove committed Oct 28, 2016
1 parent 669cd4e commit f57e31a
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions src/lib/model.ts
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit f57e31a

Please sign in to comment.