model

package
v0.0.0-...-c68f626 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdGiveMeSome    = "give_me_some"
	CmdAddAddress    = "add_address"
	CmdAddInstagram  = "add_instagram"
	CmdAddWishes     = "add_wishes"
	CmdAddPersonName = "add_name"
	CmdMyData        = "my_data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Base

	Telegram   string
	Instagram  string
	PersonName string
	Address    string
	Wishes     string

	Approved bool

	// Not added yet
	Email string
	Phone string
}

func (Address) IsEmpty

func (p Address) IsEmpty() bool

func (Address) String

func (p Address) String() string

type Base

type Base struct {
	ID int64
	Timestamps
}

Base : the common properties of all gorm models

type State

type State struct {
	Base

	ChatID            int64
	GivenAddressesCtr int
	PreviousCmd       string
	FileIDs           map[string]string
	Telegram          string
	Users             []*User
}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt
}

type User

type User struct {
	Base
	BookingID *int64
	Requested *bool
	CheckedIn *bool
}

Jump to

Keyboard shortcuts

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