domain

package
v0.0.0-...-56fefa2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 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 Answer

type Answer struct {
	ID                string    `db:"id"`
	TaskID            string    `db:"task_id"`
	TeamID            string    `db:"team_id"`
	StartTime         time.Time `db:"start_time"`
	AdditionalPoints  int       `db:"additional_points"`
	AnswerText        string    `db:"answer_text"`
	AnswerImageBase64 string    `db:"answerImageBase64"`
	Result            bool      `db:"result"`
}

Answer

Таблица ответов на задания

type AnswerSecret

type AnswerSecret struct {
	ID           ID     `db:"id"`
	SecretID     ID     `db:"secret_id"`
	AnswerTypeID int    `db:"answer_type_id"`
	Data         string `db:"data"`
}

AnswerSecret

Таблица ответов на секретные задания

type AnswerType

type AnswerType struct {
	ID    int    `db:"id"`
	Title string `db:"title"`
}

AnswerType

Таблица типов ответов

type ID

type ID string

ID

Тип первичного ключа (uuid) в таблицах

func (ID) String

func (id ID) String() string

String

Явное преобразование типа ID в тип string

type Member

type Member struct {
	Id   string        `db:"id"`
	Name string        `db:"name"`
	Role sql.NullInt64 `db:"role"`
}

type Role

type Role struct {
	ID    int    `db:"id"`
	Title string `db:"title"`
}

Role

Таблица ролей в команде

type Secret

type Secret struct {
	ID          ID     `db:"id"`
	Title       string `db:"title"`
	Description string `db:"description"`
}

Secret

Таблица секретных заданий

type Task

type Task struct {
	ID           ID     `db:"id"`
	Title        string `db:"title"`
	Description  string `db:"description"`
	TypeID       int    `db:"type_id"`
	MaxPoints    int    `db:"max_points"`
	MinPoints    int    `db:"min_points"`
	AnswerTypeID int    `db:"answer_type_id"`
	TypeName     string
	StartedTime  time.Time
}

Task

Таблица заданий

type TaskDifficulty

type TaskDifficulty struct {
	ID    int    `db:"id"`
	Title string `db:"title"`
}

TaskDifficulty

Таблица уровней сложности заданий

type TaskType

type TaskType struct {
	ID         int    `db:"id"`
	Title      string `db:"title"`
	IsActive   bool
	Count      int
	TeamAmount int
}

type TaskTypes

type TaskTypes []TaskType

type Team

type Team struct {
	TeamId  string `db:"id"`
	Title   string `db:"title"`
	Points  int    `db:"points"`
	Members []Member
}

Team

Таблица команд

type TeamSecret

type TeamSecret struct {
	ID        ID         `db:"id"`
	SecretID  ID         `db:"secret_id"`
	TeamID    ID         `db:"team_id"`
	StartTime time.Time  `db:"start_time"`
	EndTime   *time.Time `db:"end_time"`
}

TeamSecret

Таблица связи секретных заданий и команд

type TeamTask

type TeamTask struct {
	ID               ID         `db:"id"`
	TaskID           ID         `db:"task_id"`
	TeamID           ID         `db:"team_id"`
	StartTime        time.Time  `db:"start_time"`
	EndTime          *time.Time `db:"end_time"`
	AdditionalPoints int        `db:"additional_points"`
}

TeamTask

Таблица связи заданий и команд

type User

type User struct {
	ID             ID     `db:"id"`
	Password       string `db:"password"`
	PhoneNumber    string `db:"phone_number"`
	Email          string `db:"email"`
	EmailConfirmed bool   `db:"email_confirmed"`
	Telegram       string `db:"telegram"`
	VK             string `db:"vk"`
	StudyGroup     string `db:"group"`
	FIO            string `db:"name"`
	TeamID         *ID    `db:"team_id"`
	RoleID         *int   `db:"role_id"`
	IsAdmin        bool   `db:"is_admin"`
}

User

Таблица пользователей

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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