-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from cbartel/beta
Release 2.1.0
- Loading branch information
Showing
119 changed files
with
3,443 additions
and
1,616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export enum CalendarEventType { | ||
EXPEDITION = 'EXPEDITION', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type EventId = string; | ||
|
||
export interface Event { | ||
id: EventId; | ||
} | ||
|
||
export type EventType<T extends Event> = new (...params: never[]) => T; | ||
|
||
export class KeepAliveEvent implements Event { | ||
id: 'KEEPALIVE'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { Event } from './event.model'; | ||
|
||
export type CreateExpedition = { | ||
name: ExpeditionName; | ||
beginDateTime: string; | ||
hasTuningOrb: boolean; | ||
role: Role; | ||
}; | ||
|
||
export type DeleteExpedition = { | ||
id: number; | ||
}; | ||
|
||
export type JoinExpedition = { | ||
id: number; | ||
role: Role; | ||
hasTuningOrb: boolean; | ||
}; | ||
|
||
export type LeaveExpedition = { | ||
id: number; | ||
}; | ||
|
||
export type Expedition = { | ||
id: number; | ||
name: string; | ||
beginDateTime: string; | ||
participants: Participant[]; | ||
owner: Owner; | ||
}; | ||
|
||
export type Participant = { | ||
userId: number; | ||
characterName: string; | ||
discordId: string; | ||
role: Role; | ||
hasTuningOrb: boolean; | ||
}; | ||
|
||
export type Owner = { | ||
userId: number; | ||
characterName: string; | ||
discordId: string; | ||
}; | ||
|
||
export enum Role { | ||
TANK = 'TANK', | ||
DAMAGE = 'DAMAGE', | ||
HEAL = 'HEAL', | ||
} | ||
|
||
export enum ExpeditionName { | ||
AMRINE_EXCAVATION = 'AMRINE_EXCAVATION', | ||
STARSTONE_BARROWS = 'STARSTONE_BARROWS', | ||
THE_DEPTHS = 'THE_DEPTHS', | ||
DYNASTY_SHIPYARD = 'DYNASTY_SHIPYARD', | ||
LAZARUS_INSTRUMENTALITY = 'LAZARUS_INSTRUMENTALITY', | ||
GARDEN_OF_GENESIS = 'GARDEN_OF_GENESIS', | ||
} | ||
|
||
export class ExpeditionCreateEvent implements Event { | ||
id = 'EXPEDITION.CREATE'; | ||
constructor(public expedition: Expedition) {} | ||
} | ||
|
||
export class ExpeditionDeleteEvent implements Event { | ||
id = 'EXPEDITION.DELETE'; | ||
constructor(public expeditionId: number) {} | ||
} | ||
|
||
export class ExpeditionJoinEvent implements Event { | ||
id = 'EXPEDITION.JOIN'; | ||
constructor(public expedition: Expedition) {} | ||
} | ||
|
||
export class ExpeditionLeaveEvent implements Event { | ||
id = 'EXPEDITION.LEAVE'; | ||
constructor(public expedition: Expedition) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- CreateTable | ||
CREATE TABLE "Expedition" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"userId" INTEGER NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"beginDateTime" DATETIME NOT NULL, | ||
CONSTRAINT "Expedition_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "ExpeditionParticipant" ( | ||
"expeditionId" INTEGER NOT NULL, | ||
"userId" INTEGER NOT NULL, | ||
"hasTuningOrb" BOOLEAN NOT NULL DEFAULT false, | ||
"role" TEXT NOT NULL, | ||
|
||
PRIMARY KEY ("expeditionId", "userId"), | ||
CONSTRAINT "ExpeditionParticipant_expeditionId_fkey" FOREIGN KEY ("expeditionId") REFERENCES "Expedition" ("id") ON DELETE CASCADE ON UPDATE CASCADE, | ||
CONSTRAINT "ExpeditionParticipant_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Expedition_id_uindex" ON "Expedition"("id"); |
Oops, something went wrong.