wenda

package
v1.4.3-RC Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswersTab

type AnswersTab struct {
	Question uint32 `json:"question" db:"question"` // 问题标识号
	QQ       uint64 `json:"qq"       db:"qq"`       // QQ 标识号
	Answer   string `json:"answer"   db:"answer"`   // 作答内容
	Time     string `json:"time"     db:"time"`     // 时刻
	Mark     string `json:"mark"     db:"mark"`     // 标记
}

AnswersTab 回答表

type Detail

type Detail struct {
	// 包含问题和回答还有群人的数据
	Questions *QuestionsTab // 问题
	Answers   []*AnswersTab // 回答
	Members   *GroupMembers // 群成员
}

Detail 问答详情 内部缓存结构体 不应该被返回给 API 客户端

type GroupMembers

type GroupMembers map[uint64]string // GroupMembers 群成员

type Groups

type Groups map[uint64]string // Groups 群

type QuestionsTab

type QuestionsTab struct {
	ID      uint32              `json:"id"      db:"id"`      // 标识号
	Type    uint8               `json:"type"    db:"type"`    // 类型
	Subject uint8               `json:"subject" db:"subject"` // 学科
	Creator string              `json:"creator" db:"creator"` // 创建者
	Date    time.Time           `json:"date"    db:"date"`    // 创建日期
	Topic   QuestionsTopicField `json:"topic"   db:"topic"`   // 主题
	Status  uint8               `json:"status"  db:"status"`  // 状态
	Market  bool                `json:"market"  db:"market"`  // 是否发布至问题市场
}

QuestionsTab 问题表

type QuestionsTopicField

type QuestionsTopicField struct {
	Target uint64 `json:"target"` // 目标
	// 问题
	Question []struct {
		Type string `json:"type"`
		Data string `json:"data"`
	} `json:"question"`
	Options []string `json:"options"` // 选项
	Key     string   `json:"key"`     // 答案
}

QuestionsTopicField 问题主题字段

type Result

type Result struct {
	Count uint8              `json:"count" db:"count"` // 作答人数
	Right []uint64           `json:"right" db:"right"` // 正确学生
	Wrong []ResultWrongField `json:"wrong" db:"wrong"` // 错误学生
}

Result 结果

type ResultWrongField

type ResultWrongField struct {
	Type  string   `json:"type"`  // 类型
	Value []uint64 `json:"value"` // 学生
}

ResultWrongField 结果错误学生字段

type Runtime

type Runtime map[uint32][]*websocket.Conn // Runtime 运行时

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL