models

package
v0.0.0-...-9b663ca Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Question

type Question struct {
	base.DefaultModel
	Type       int8           `gorm:"NOT NULL;comment:题型"`
	Title      string         `gorm:"size:50;NOT NULL;comment:标题"`
	Content    string         `gorm:"size:1000;NOT NULL;comment:内容"`
	Tags       pq.StringArray `gorm:"type:varchar(10)[];comment:标签"`
	Answer     string         `gorm:"size:1000;NOT NULL;comment:答案"`
	Difficulty string         `gorm:"size:10;NOT NULL;comment:难度"`
}

func NewQuestion

func NewQuestion() *Question

func NewQuestionFromPB

func NewQuestionFromPB(in *pb.CreateQuestionRequest) *Question

func (*Question) ToQuestionPBs

func (m *Question) ToQuestionPBs(data []*Question) []*pb.Question

ToQuestionPBs ..

Jump to

Keyboard shortcuts

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