model

package
v0.0.0-...-abeb4b5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Year    uint64   `json:"year" bson:"year"`
	URL     string   `json:"url" bson:"url"`
	Authors []string `json:"authors" bson:"authors"`
}

type Document

type Document struct {
	Name string

	Theme string
	Class int

	Template *Template
	Tasks    []*Task
}

type Layout

type Layout struct {
	Begin string `json:"begin" bson:"begin"`
	Task  string `json:"task" bson:"task"`
	End   string `json:"end" bson:"end"`
}

type Tag

type Tag struct {
	Class      uint64   `json:"class" bson:"class"`
	Complexity uint64   `json:"complexity" bson:"complexity"`
	Olympic    bool     `json:"olympic" bson:"olympic"`
	Themes     []string `json:"themes" bson:"themes"`
	Book       Book     `json:"book" bson:"book"`
}

type Task

type Task struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Task      string             `json:"task" bson:"task"`
	Answer    string             `json:"answer" bson:"answer"`
	Help      string             `json:"help" bson:"help"`
	Solution  string             `json:"solution" bson:"solution"`
	Tag       Tag                `json:"tag" bson:"tag"`
	CreatedAt time.Time          `json:"createdAt" bson:"createdAt"`
	UpdatedAt *time.Time         `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"`
	DeletedAt *time.Time         `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"`
}

type Template

type Template struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Name      string             `json:"name" bson:"name"`
	Author    string             `json:"author" bson:"author"`
	Layout    Layout             `json:"layout" bson:"layout"`
	CreatedAt time.Time          `json:"createdAt" bson:"createdAt"`
	UpdatedAt *time.Time         `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"`
	DeletedAt *time.Time         `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"`
}

Jump to

Keyboard shortcuts

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