Suite de l'intégratyion du jeu. De nombreux paquets sont indisponibles.
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
import { IsBoolean, IsEmail, IsNotEmpty, IsString } from 'class-validator';
|
|
||||||
|
|
||||||
export class CreateUsersDto {
|
|
||||||
@IsString()
|
|
||||||
@IsNotEmpty()
|
|
||||||
readonly username: string;
|
|
||||||
readonly fortyTwoId: string;
|
|
||||||
@IsEmail()
|
|
||||||
readonly email: string;
|
|
||||||
@IsString()
|
|
||||||
readonly image_url: string;
|
|
||||||
@IsString()
|
|
||||||
readonly status: string;
|
|
||||||
@IsBoolean()
|
|
||||||
readonly isEnabledTwoFactorAuth: boolean;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||||
|
|
||||||
|
@Entity('game')
|
||||||
|
export class game {
|
||||||
|
|
||||||
|
@PrimaryGeneratedColumn()
|
||||||
|
id: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
playerOneUsername: string
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
playerTwoUsername: string
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
playerOneUsernameResult : number
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
playerTwoUsernameResult : number
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
gameServerIdOfTheMatch: string
|
||||||
|
|
||||||
|
@Column({default: false}) //éric pourra trouver un meilleur mot : ongoing ?
|
||||||
|
isMatchIsFinished: boolean
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Entity('gameParty')
|
|
||||||
export class gameParty {
|
|
||||||
|
|
||||||
@PrimaryGeneratedColumn()
|
|
||||||
id: number;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
playerOne: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
playerTwo: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
resultOfTheMatch: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
gameServerIdOfTheMatch: string
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Module } from '@nestjs/common';
|
// import { Module } from '@nestjs/common';
|
||||||
import { GameController } from './game.controller';
|
// import { GameController } from './game.controller';
|
||||||
import { GameService } from './game.service';
|
// import { GameService } from './game.service';
|
||||||
|
|
||||||
@Module({
|
// @Module({
|
||||||
controllers: [GameController],
|
// controllers: [GameController],
|
||||||
providers: [GameService]
|
// providers: [GameService]
|
||||||
})
|
// })
|
||||||
export class GameModule {}
|
// export class GameModule {}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
// import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { GameService } from './game.service';
|
// // import { GameService } from './game.service';
|
||||||
|
|
||||||
describe('GameService', () => {
|
// describe('GameService', () => {
|
||||||
let service: GameService;
|
// let service: GameService;
|
||||||
|
|
||||||
beforeEach(async () => {
|
// beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
// const module: TestingModule = await Test.createTestingModule({
|
||||||
providers: [GameService],
|
// providers: [GameService],
|
||||||
}).compile();
|
// }).compile();
|
||||||
|
|
||||||
service = module.get<GameService>(GameService);
|
// service = module.get<GameService>(GameService);
|
||||||
});
|
// });
|
||||||
|
|
||||||
it('should be defined', () => {
|
// it('should be defined', () => {
|
||||||
expect(service).toBeDefined();
|
// expect(service).toBeDefined();
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
// import { Injectable } from '@nestjs/common';
|
||||||
|
|
||||||
|
// @Injectable('game')
|
||||||
|
// export class GameService {}
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class GameService {}
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
import {RedisService} from "@nestjs/redis"
|
||||||
Reference in New Issue
Block a user