Suite de l'intégratyion du jeu. De nombreux paquets sont indisponibles.

This commit is contained in:
batche
2022-12-16 10:51:40 +01:00
parent c2242c481b
commit 67f7d0e8ec
7 changed files with 53 additions and 63 deletions

View File

@@ -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;
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -1,9 +1,9 @@
import { Module } from '@nestjs/common';
import { GameController } from './game.controller';
import { GameService } from './game.service';
// import { Module } from '@nestjs/common';
// import { GameController } from './game.controller';
// import { GameService } from './game.service';
@Module({
controllers: [GameController],
providers: [GameService]
})
export class GameModule {}
// @Module({
// controllers: [GameController],
// providers: [GameService]
// })
// export class GameModule {}

View File

@@ -1,18 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { GameService } from './game.service';
// import { Test, TestingModule } from '@nestjs/testing';
// // import { GameService } from './game.service';
describe('GameService', () => {
let service: GameService;
// describe('GameService', () => {
// let service: GameService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [GameService],
}).compile();
// beforeEach(async () => {
// const module: TestingModule = await Test.createTestingModule({
// providers: [GameService],
// }).compile();
service = module.get<GameService>(GameService);
});
// service = module.get<GameService>(GameService);
// });
it('should be defined', () => {
expect(service).toBeDefined();
});
});
// it('should be defined', () => {
// expect(service).toBeDefined();
// });
// });

View File

@@ -1,4 +1,5 @@
import { Injectable } from '@nestjs/common';
// import { Injectable } from '@nestjs/common';
// @Injectable('game')
// export class GameService {}
@Injectable()
export class GameService {}

View File

@@ -0,0 +1 @@
import {RedisService} from "@nestjs/redis"