storage

package
v0.0.0-...-b624db7 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATE_NEED_PHONE    = "need phone"
	STATE_NEED_ADDRESS  = "need address"
	STATE_NEED_FARE     = "need fare"
	STATE_ORDER_CREATED = "order created"
)

Variables

This section is empty.

Functions

func GetGormDB

func GetGormDB(dbName string) *gorm.DB

func MigrateAll

func MigrateAll(db *gorm.DB)

Types

type Address

type Address struct {
	gorm.Model
	ChatID int64
	Text   string
}

func GetLastAddressByChatID

func GetLastAddressByChatID(db *gorm.DB, chatID int64) []Address

type Phone

type Phone struct {
	gorm.Model
	ChatID int64
	Text   string
}

func GetLastPhonesByChatID

func GetLastPhonesByChatID(db *gorm.DB, chatID int64) []Phone

type Session

type Session struct {
	gorm.Model
	ChatID  int64
	Phone   string
	Address string
	FareId  int
	State   string
	OrderId int
}

func GetSessionByChatID

func GetSessionByChatID(db *gorm.DB, chatID int64) Session

Jump to

Keyboard shortcuts

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