nitro-renderer/packages/events/src/session/RoomSessionWordQuizEvent.ts

112 lines
2.1 KiB
TypeScript
Raw Normal View History

2024-03-19 21:53:17 -04:00
import { IQuestion, IRoomSession } from '@nitrots/api';
2021-03-16 22:02:09 -04:00
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionWordQuizEvent extends RoomSessionEvent
{
2021-06-23 04:52:35 -05:00
public static QUESTION: string = 'RWPUW_NEW_QUESTION';
public static FINISHED: string = 'RWPUW_QUESION_FINSIHED';
public static ANSWERED: string = 'RWPUW_QUESTION_ANSWERED';
2021-03-16 22:02:09 -04:00
private _id: number = -1;
private _pollType: string = null;
private _pollId: number = -1;
private _questionId: number = -1;
private _duration: number = -1;
2021-11-15 20:28:08 -06:00
private _question: IQuestion = null;
2021-03-16 22:02:09 -04:00
private _userId: number = -1;
private _value: string;
private _answerCounts: Map<string, number>;
constructor(k: string, _arg_2: IRoomSession, _arg_3: number = -1)
{
super(k, _arg_2);
this._id = _arg_3;
}
public get id(): number
{
return this._id;
}
2021-06-23 04:52:35 -05:00
public get pollType(): string
2021-03-16 22:02:09 -04:00
{
return this._pollType;
}
2022-11-03 01:39:10 -04:00
public set pollType(pollType: string)
2021-03-16 22:02:09 -04:00
{
2022-11-03 01:39:10 -04:00
this._pollType = pollType;
2021-03-16 22:02:09 -04:00
}
2021-06-23 04:52:35 -05:00
public get pollId(): number
2021-03-16 22:02:09 -04:00
{
return this._pollId;
}
2021-06-23 04:52:35 -05:00
public set pollId(k: number)
2021-03-16 22:02:09 -04:00
{
this._pollId = k;
}
2021-06-23 04:52:35 -05:00
public get questionId(): number
2021-03-16 22:02:09 -04:00
{
return this._questionId;
}
2021-06-23 04:52:35 -05:00
public set questionId(k: number)
2021-03-16 22:02:09 -04:00
{
this._questionId = k;
}
public get duration(): number
{
return this._duration;
}
public set duration(k: number)
{
this._duration = k;
}
2021-11-15 20:28:08 -06:00
public get question(): IQuestion
2021-03-16 22:02:09 -04:00
{
return this._question;
}
2021-11-15 20:28:08 -06:00
public set question(k: IQuestion)
2021-03-16 22:02:09 -04:00
{
this._question = k;
}
public get userId(): number
{
return this._userId;
}
public set userId(k: number)
{
this._userId = k;
}
public get value(): string
{
return this._value;
}
2022-11-03 01:39:10 -04:00
public set value(value: string)
2021-03-16 22:02:09 -04:00
{
2022-11-03 01:39:10 -04:00
this._value = value;
2021-03-16 22:02:09 -04:00
}
2021-06-23 04:52:35 -05:00
public get answerCounts(): Map<string, number>
2021-03-16 22:02:09 -04:00
{
return this._answerCounts;
}
2021-06-23 04:52:35 -05:00
public set answerCounts(k: Map<string, number>)
2021-03-16 22:02:09 -04:00
{
this._answerCounts = k;
}
2021-06-23 04:52:35 -05:00
}