| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import type { SocketMessage as BaseSocketMessage, SocketMessageType } from '@d8d-appcontainer/types';
- // 基础答题记录
- export interface AnswerRecord {
- date: string;
- price: string;
- holdingStock: string;
- holdingCash: string;
- profitAmount: number;
- profitPercent: number;
- index: number;
- }
- // 答题内容
- export interface QuizContent {
- date: string;
- price: number | string;
- holdingStock: string;
- holdingCash: string;
- userId: string;
- }
- // 题目状态
- export interface QuizState {
- date: string;
- price: number | string;
- }
- export type ExamSocketMessageType = SocketMessageType | 'question' | 'answer' | 'settlement' | 'submit' | 'restart';
- // Socket消息
- export interface ExamSocketMessage extends Omit<BaseSocketMessage, 'type' | 'content'> {
- type: ExamSocketMessageType;
- content: QuizContent;
- }
- // Socket房间消息
- export interface ExamSocketRoomMessage {
- roomId: string;
- message: ExamSocketMessage;
- }
- // 答案
- export interface Answer extends QuizContent {
- userId: string;
- profitAmount?: number;
- profitPercent?: number;
- totalProfitAmount?: number;
- totalProfitPercent?: number;
- }
- // 教室数据
- export interface ClassroomData {
- classroom_no: string;
- status: string;
- training_date: string;
- code: string;
- }
- // 累计结果
- export interface CumulativeResult {
- userId: string;
- totalProfitAmount: number;
- totalProfitPercent: number;
- }
|