feat: 설문조사를 새 방식으로 구현

This commit is contained in:
2022-05-15 20:55:14 +09:00
parent 93895bfb6b
commit 2e2e991c98
11 changed files with 514 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
import type { ValidResponse } from "@/util/callSammoAPI";
export type VoteInfo = {
id: number;
title: string;
multipleOptions: number;
startDate: string;
endDate: string;
options: string[];
}
export type VoteComment = {
id: number;
voteID: number;
generalID: number;
nationName: string;
generalName: string;
text: string;
}
export type VoteListResult = ValidResponse & {
votes: Record<string, VoteInfo>;
}
export type VoteDetailResult = ValidResponse & {
voteInfo: VoteInfo,
votes: [number[], number][],
comments: VoteComment[],
}