model

package
v0.0.0-...-b70bbfa Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindOneResp

type FindOneResp struct {
	Title    string              `json:"title"`
	Content  []SessionContentDto `json:"content"`
	Editable bool                `json:"editable"`
	Tg       bool                `json:"tg"`
	ID       uuid.UUID           `json:"id"`
}

FindOneResp модель для ответа на запрос получения сессии по id.

type ListResp

type ListResp struct {
	Sessions []SessionDto `json:"sessions"`
}

ListResp модель для ответа на запрос списка сессий.

type NewSessionResp

type NewSessionResp struct {
	ID uuid.UUID `json:"id"`
}

NewSessionResp модель для ответа на запрос создания сессии.

type RenameReq

type RenameReq struct {
	Title string    `json:"title" validate:"required"`
	ID    uuid.UUID `json:"id" validate:"required"`
}

RenameReq модель для запроса на переименование сессии.

type SessionContentDao

type SessionContentDao struct {
	Response model.ResponseDao `db:"response"`
	Query    model.QueryDao    `db:"query"`
}

SessionContentDao модель сообщений и запросов в сессии.

type SessionContentDto

type SessionContentDto struct {
	Response model.ResponseDto `json:"response"`
	Query    model.QueryDto    `json:"query"`
}

SessionContentDto модель для передачи контента сессии внутри сервиса.

type SessionDao

type SessionDao struct {
	CreatedAt time.Time `db:"created_at"`
	Username  string    `db:"username"`
	Title     string    `db:"title"`
	IsDeleted bool      `db:"is_deleted"`
	Tg        bool      `db:"tg"`
	TgID      int64     `db:"tg_id"`
	ID        uuid.UUID `db:"id"`
}

SessionDao модель для хранения сессии в базе данных.

func (SessionDao) ToDto

func (s SessionDao) ToDto() SessionDto

ToDto конвертирует SessionDao в SessionDto.

type SessionDto

type SessionDto struct {
	CreatedAt time.Time `json:"created_at"`
	Title     string    `json:"title"`
	Tg        bool      `json:"tg"`
	TgID      int64     `json:"tg_id"`
	ID        uuid.UUID `json:"id"`
}

SessionDto модель для передачи сессии внутри сервиса.

type SessionMeta

type SessionMeta struct {
	Username  string `db:"username"`
	Title     string `db:"title"`
	IsDeleted bool   `db:"is_deleted"`
	Tg        bool   `db:"tg"`
}

SessionMeta метаинформация о сессии.

Jump to

Keyboard shortcuts

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