From 836262a039b1724ff175e6cf5f3d25ee4bd93986 Mon Sep 17 00:00:00 2001 From: w8385 Date: Thu, 15 Feb 2024 05:19:53 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20poker=20interface=20&=20provider=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/poker/poker.interface.ts | 21 +++++++++++++++++++++ src/poker/poker.provider.ts | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/poker/poker.interface.ts create mode 100644 src/poker/poker.provider.ts diff --git a/src/poker/poker.interface.ts b/src/poker/poker.interface.ts new file mode 100644 index 0000000..5b22474 --- /dev/null +++ b/src/poker/poker.interface.ts @@ -0,0 +1,21 @@ +export interface Poker { + pokerId: string; + name: string; + createdAt: string; + participants: string[]; +} + +export interface Participant { + handle: string; + profileImage: string; + goal: number; + point: number; + problems: number[]; +} + +export interface PokerResult { + pokerId: string; + name: string; + createdAt: string; + results: Participant[]; +} diff --git a/src/poker/poker.provider.ts b/src/poker/poker.provider.ts new file mode 100644 index 0000000..13375de --- /dev/null +++ b/src/poker/poker.provider.ts @@ -0,0 +1,11 @@ +import { Inject, Injectable } from '@nestjs/common'; +import { UserService } from '../user/user.service'; +import { RedisClientType } from 'redis'; + +@Injectable() +export class PokerProvider { + constructor( + private readonly userService: UserService, + @Inject('REDIS') private readonly redisClient: RedisClientType, + ) {} +}