questionback

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuestionBackInit

func QuestionBackInit() (*gorm.DB, error)

题库缓存初始化

Types

type Question

type Question struct {
	gorm.Model
	Type    string `gorm:"column:type"`             //题目类型
	Content string `gorm:"column:content"`          //题目内容
	Answers string `gorm:"column:answer;type:TEXT"` // 答案,存储为 JSON
}

func (*Question) QuestionBackDeleteForTypeAndContent

func (question *Question) QuestionBackDeleteForTypeAndContent(db *gorm.DB) error

根据题目类型和内容删除题目

func (*Question) QuestionBackInsert

func (question *Question) QuestionBackInsert(db *gorm.DB) error

插入缓存题库

func (*Question) QuestionBackSelectsForTypeAndContent

func (question *Question) QuestionBackSelectsForTypeAndContent(db *gorm.DB) []Question

根据题目类型和内容查询题目

func (*Question) QuestionBackUpdateAnswerForTypeAndContent

func (question *Question) QuestionBackUpdateAnswerForTypeAndContent(db *gorm.DB) error

根据题目类型和内容更新题目

Jump to

Keyboard shortcuts

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