model

package
v0.0.0-...-ca8b2fb Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answers

type Answers []int8

func (*Answers) Scan

func (a *Answers) Scan(src interface{}) error

func (Answers) Value

func (a Answers) Value() (driver.Value, error)

type Options

type Options []string

func (*Options) Scan

func (o *Options) Scan(src interface{}) error

func (Options) Value

func (o Options) Value() (driver.Value, error)

type QuizChoice

type QuizChoice struct {
	Id     int64   `json:"id" gorm:"primary_key;type:bigint"`
	RoomId int64   `json:"quiz_id" gorm:"not null;type:bigint"`
	UserId int64   `json:"user_id" gorm:"not null;type:bigint"`
	Title  string  `json:"title" gorm:"not null;type:text"`
	Option Options `json:"option" gorm:"type:json;not null"`
	Answer Answers `json:"answer" gorm:"type:json;not null"`
}

type QuizJudge

type QuizJudge struct {
	Id     int64  `json:"id" gorm:"primary_key;type:bigint"`
	RoomId int64  `json:"room_id" gorm:"not null;type:bigint"`
	UserId int64  `json:"user_id" gorm:"not null;type:bigint"`
	Title  string `json:"title" gorm:"not null;type:text"`
	Answer bool   `json:"answer" gorm:"type:boolean;not null"`
}

type QuizStatus

type QuizStatus struct {
	QuestionId  int64   `json:"question_id"`
	RoomId      int64   `json:"room_id"`
	RequiredNum int64   `json:"required_num"`
	CurrentNum  int64   `json:"current_num"`
	AcceptRate  float64 `json:"start_time"`
}

Jump to

Keyboard shortcuts

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