entities

package
v0.0.0-...-68a21f0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   uuid.UUID `db:"id"`
	Name string    `db:"name"`
	Type int       `db:"c_type"`
}

func (*Category) StringForBot

func (c *Category) StringForBot(botURL string) string

func (*Category) StringForManager

func (c *Category) StringForManager() string

type Dialog

type Dialog struct {
	ID        uuid.UUID  `db:"id"`
	UserID    int64      `db:"user_id"`
	ManagerID int64      `db:"manager_id"`
	StartedAt time.Time  `db:"started_at"`
	EndedAt   *time.Time `db:"ended_at"`
}

type Product

type Product struct {
	ID              uuid.UUID      `db:"id"`
	CategoryID      uuid.UUID      `db:"category_id"`
	Producer        string         `db:"producer"`
	Model           string         `db:"model"`
	Additional      string         `db:"additional"`
	OperatingSystem int            `db:"operating_system"`
	Description     string         `db:"description"`
	Photo           sql.NullString `db:"photo"`
	Price           float64        `db:"price"`
	OldPrice        float64        `db:"old_price"`
	IsSale          bool           `db:"is_sale"`
}

func (*Product) String

func (p *Product) String() string

func (*Product) StringForBot

func (p *Product) StringForBot(botURL string) string

func (*Product) StringForManager

func (p *Product) StringForManager(botURL string) string

func (*Product) StringWithoutDescription

func (p *Product) StringWithoutDescription() string

type Repair

type Repair struct {
	ID           uuid.UUID      `db:"id"`
	ProducerName string         `db:"producer_name"`
	ModelName    string         `db:"model_name"`
	Name         string         `db:"name"`
	Description  sql.NullString `db:"description"`
	Price        float64        `db:"price"`
}

func (*Repair) String

func (r *Repair) String() string

func (*Repair) StringForBot

func (r *Repair) StringForBot(botURL string) string

func (*Repair) StringWithoutDescription

func (r *Repair) StringWithoutDescription() string

type Reservation

type Reservation struct {
	ID        uuid.UUID `db:"id"`
	UserID    int64     `db:"user_id"`
	ProductID uuid.UUID `db:"product_id"`
	CreatedAt time.Time `db:"created_at"`
	Completed int       `db:"completed"`
}

type ReservationWithAdditionalData

type ReservationWithAdditionalData struct {
	Reservation
	CategoryName    string `db:"category_name"`
	ProductFullName string `db:"product_full_name"`
}

func (*ReservationWithAdditionalData) StringForBot

func (r *ReservationWithAdditionalData) StringForBot(botURL string) string

func (*ReservationWithAdditionalData) StringForManager

func (r *ReservationWithAdditionalData) StringForManager(botURL string) string

type State

type State struct {
	ID   string `db:"id"`
	Type int    `db:"s_type"`
	Data any    `db:"data"`
}

func (*State) DecodeData

func (s *State) DecodeData() error

func (*State) EncodeData

func (s *State) EncodeData() error

type User

type User struct {
	ID           int64     `db:"id"`
	Tag          string    `db:"tag"`
	IsManager    bool      `db:"is_manager"`
	IsBanned     bool      `db:"is_banned"`
	RegisteredAt time.Time `db:"registered_at"`
}

func (*User) String

func (u *User) String() string

Jump to

Keyboard shortcuts

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