domain

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.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 Answer

type Answer struct {
	Analysis     AnswerElement
	Basic        AnswerElement
	Intermediate AnswerElement
	Advanced     AnswerElement
}

type AnswerElement

type AnswerElement struct {
	ID        int64
	Content   string
	Keywords  string
	Shorthand string
	Highlight string
	Guidance  string
}

type Case

type Case struct {
	Id int64
	// 作者
	Uid      int64
	Labels   []string
	Title    string
	Content  string
	CodeRepo string
	// 关键字,辅助记忆,提取重点
	Keywords string
	// 速记,口诀
	Shorthand string
	// 亮点
	Highlight string
	// 引导点
	Guidance string
	Status   CaseStatus
	Ctime    time.Time
	Utime    time.Time
}

type CaseStatus

type CaseStatus uint8
const (
	// UnknownStatus 未知
	UnknownStatus CaseStatus = 0
	// UnPublishedStatus 未发布
	UnPublishedStatus CaseStatus = 1
	// PublishedStatus 发布
	PublishedStatus CaseStatus = 2
)

func (CaseStatus) ToUint8

func (s CaseStatus) ToUint8() uint8

type Question

type Question struct {
	ID      int64
	UID     int64
	Title   string
	Labels  []string
	Content string
	Status  uint8
	Answer  Answer
	Utime   time.Time
}

type QuestionSet

type QuestionSet struct {
	Id  int64
	Uid int64
	// 标题
	Title string
	// 描述
	Description string

	// 题集中引用的题目,
	Questions []int64
	Utime     time.Time
}

type QuestionStatus

type QuestionStatus uint8

func (QuestionStatus) ToUint8

func (s QuestionStatus) ToUint8() uint8

type SearchResult

type SearchResult struct {
	Cases       []Case
	Questions   []Question
	Skills      []Skill
	QuestionSet []QuestionSet
	// contains filtered or unexported fields
}

func (*SearchResult) SetCases

func (s *SearchResult) SetCases(cases []Case)

func (*SearchResult) SetQuestionSet

func (s *SearchResult) SetQuestionSet(qs []QuestionSet)

func (*SearchResult) SetQuestions

func (s *SearchResult) SetQuestions(qs []Question)

func (*SearchResult) SetSkills

func (s *SearchResult) SetSkills(skills []Skill)

type Skill

type Skill struct {
	ID           int64
	Labels       []string
	Name         string
	Desc         string
	Basic        SkillLevel
	Intermediate SkillLevel
	Advanced     SkillLevel
	Ctime        time.Time
	Utime        time.Time
}

type SkillLevel

type SkillLevel struct {
	ID        int64
	Desc      string
	Ctime     time.Time
	Utime     time.Time
	Questions []int64
	Cases     []int64
}

Jump to

Keyboard shortcuts

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