Template
chore : eslint
This commit is contained in:
+12
-12
@@ -1,30 +1,30 @@
|
|||||||
import { ConceptResponseDTO } from './dto/conceptresponse.dto';
|
import { ConceptResponseDTO } from "./dto/conceptresponse.dto";
|
||||||
|
import type { ConceptEvent } from "./events";
|
||||||
export class ConceptCreateEvent {
|
export class ConceptCreateEvent implements ConceptEvent {
|
||||||
type = 'create';
|
type = "create";
|
||||||
constructor(public concept: ConceptResponseDTO) {
|
constructor(public concept: ConceptResponseDTO) {
|
||||||
this.concept = new ConceptResponseDTO(concept);
|
this.concept = new ConceptResponseDTO(concept);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ConceptEditEvent {
|
export class ConceptEditEvent implements ConceptEvent {
|
||||||
type = 'edit';
|
type = "edit";
|
||||||
constructor(public concept: ConceptResponseDTO) {
|
constructor(public concept: ConceptResponseDTO) {
|
||||||
this.concept = new ConceptResponseDTO(concept);
|
this.concept = new ConceptResponseDTO(concept);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ConceptDeleteEvent {
|
export class ConceptDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ConceptEnableEvent {
|
export class ConceptEnableEvent implements ConceptEvent {
|
||||||
type = 'enable';
|
type = "enable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ConceptDisableEvent {
|
export class ConceptDisableEvent implements ConceptEvent {
|
||||||
type = 'disable';
|
type = "disable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-16
@@ -1,45 +1,46 @@
|
|||||||
import { MessageResponseDTO } from './dto/messageresponse.dto';
|
import { MessageResponseDTO } from "./dto/messageresponse.dto";
|
||||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||||
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class GameStartEvent {
|
export class GameStartEvent implements ConceptEvent {
|
||||||
type = 'start';
|
type = "start";
|
||||||
constructor(public currentPlayer: PlayerResponseDTO) {
|
constructor(public currentPlayer: PlayerResponseDTO) {
|
||||||
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameDeleteEvent {
|
export class GameDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameJoinEvent {
|
export class GameJoinEvent implements ConceptEvent {
|
||||||
type = 'joingame';
|
type = "joingame";
|
||||||
constructor(public player: PlayerResponseDTO) {
|
constructor(public player: PlayerResponseDTO) {
|
||||||
this.player = new PlayerResponseDTO(player);
|
this.player = new PlayerResponseDTO(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameLeaveEvent {
|
export class GameLeaveEvent implements ConceptEvent {
|
||||||
type = 'leavegame';
|
type = "leavegame";
|
||||||
constructor(public player: PlayerResponseDTO) {
|
constructor(public player: PlayerResponseDTO) {
|
||||||
this.player = new PlayerResponseDTO(player);
|
this.player = new PlayerResponseDTO(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameMessageEvent {
|
export class GameMessageEvent implements ConceptEvent {
|
||||||
type = 'message';
|
type = "message";
|
||||||
constructor(public message: MessageResponseDTO) {
|
constructor(public message: MessageResponseDTO) {
|
||||||
this.message = new MessageResponseDTO(message);
|
this.message = new MessageResponseDTO(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameMessageDeleteEvent {
|
export class GameMessageDeleteEvent implements ConceptEvent {
|
||||||
type = 'deleteMessage';
|
type = "deleteMessage";
|
||||||
constructor(public messageId: number) {}
|
constructor(public messageId: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GameEndTurnEvent {
|
export class GameEndTurnEvent implements ConceptEvent {
|
||||||
type = 'endTurn';
|
type = "endTurn";
|
||||||
constructor(public currentPlayer: PlayerResponseDTO) {
|
constructor(public currentPlayer: PlayerResponseDTO) {
|
||||||
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
this.currentPlayer = new PlayerResponseDTO(currentPlayer);
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-12
@@ -1,28 +1,29 @@
|
|||||||
import { GameResponseDTO } from './dto/gameresponse.dto';
|
import { GameResponseDTO } from "./dto/gameresponse.dto";
|
||||||
import { PlayerResponseDTO } from './dto/playerresponse.dto';
|
import { PlayerResponseDTO } from "./dto/playerresponse.dto";
|
||||||
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class LobbyCreateEvent {
|
export class LobbyCreateEvent implements ConceptEvent {
|
||||||
type = 'create';
|
type = "create";
|
||||||
game: GameResponseDTO;
|
game: GameResponseDTO;
|
||||||
constructor(game: GameResponseDTO) {
|
constructor(game: GameResponseDTO) {
|
||||||
this.game = new GameResponseDTO(game);
|
this.game = new GameResponseDTO(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyStartEvent {
|
export class LobbyStartEvent implements ConceptEvent {
|
||||||
type = 'start';
|
type = "start";
|
||||||
constructor(public game: GameResponseDTO) {
|
constructor(public game: GameResponseDTO) {
|
||||||
this.game = new GameResponseDTO(game);
|
this.game = new GameResponseDTO(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyDeleteEvent {
|
export class LobbyDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyJoinEvent {
|
export class LobbyJoinEvent implements ConceptEvent {
|
||||||
type = 'joingame';
|
type = "joingame";
|
||||||
constructor(
|
constructor(
|
||||||
public player: PlayerResponseDTO,
|
public player: PlayerResponseDTO,
|
||||||
public game: GameResponseDTO,
|
public game: GameResponseDTO,
|
||||||
@@ -32,8 +33,8 @@ export class LobbyJoinEvent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LobbyLeaveEvent {
|
export class LobbyLeaveEvent implements ConceptEvent {
|
||||||
type = 'leavegame';
|
type = "leavegame";
|
||||||
gameId?: number;
|
gameId?: number;
|
||||||
constructor(
|
constructor(
|
||||||
public player: PlayerResponseDTO,
|
public player: PlayerResponseDTO,
|
||||||
|
|||||||
+12
-11
@@ -1,30 +1,31 @@
|
|||||||
import { WordResponseDTO } from './dto/wordresponse.dto';
|
import { WordResponseDTO } from "./dto/wordresponse.dto";
|
||||||
|
import type { ConceptEvent } from "./events";
|
||||||
|
|
||||||
export class WordCreateEvent {
|
export class WordCreateEvent implements ConceptEvent {
|
||||||
type = 'create';
|
type = "create";
|
||||||
constructor(public word: WordResponseDTO) {
|
constructor(public word: WordResponseDTO) {
|
||||||
this.word = new WordResponseDTO(word);
|
this.word = new WordResponseDTO(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordEditEvent {
|
export class WordEditEvent implements ConceptEvent {
|
||||||
type = 'edit';
|
type = "edit";
|
||||||
constructor(public word: WordResponseDTO) {
|
constructor(public word: WordResponseDTO) {
|
||||||
this.word = new WordResponseDTO(word);
|
this.word = new WordResponseDTO(word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordDeleteEvent {
|
export class WordDeleteEvent implements ConceptEvent {
|
||||||
type = 'delete';
|
type = "delete";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordEnableEvent {
|
export class WordEnableEvent implements ConceptEvent {
|
||||||
type = 'enable';
|
type = "enable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordDisableEvent {
|
export class WordDisableEvent implements ConceptEvent {
|
||||||
type = 'disable';
|
type = "disable";
|
||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user