26.5 投票系统
26.5.1 投票(Polls)实现(src/polls.ts)
src/polls.ts)数据模型
// src/polls.ts
export type PollInput = {
question: string; // 投票问题
options: string[]; // 选项列表(至少 2 个)
maxSelections?: number; // 最多可选几项(默认 1 = 单选)
durationHours?: number; // 投票持续时间(小时)
};
export type NormalizedPollInput = {
question: string;
options: string[];
maxSelections: number; // 必填(已填充默认值)
durationHours?: number;
};输入校验
持续时间归一化
平台集成
平台
投票能力
最大选项数
最长持续时间
对应文件
通道能力声明
架构设计理念
本节小结
Last updated