custdb

package
v0.0.0-...-568f4c1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.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 Customer

type Customer struct {
	Id          string
	PhoneNumber string
	Name        string
	Gender      string
}

type CustomerDB

type CustomerDB struct {
	Connection *sql.DB
}

func NewCustomerDB

func NewCustomerDB(conn *sql.DB) *CustomerDB

func (*CustomerDB) CommitLinkRequest

func (c *CustomerDB) CommitLinkRequest(linkreq string, res string) error

func (*CustomerDB) CreateNew

func (c *CustomerDB) CreateNew(phonenumber string, name string) (*Customer, error)

func (*CustomerDB) CreateRequest

func (c *CustomerDB) CreateRequest(req *RequestData) (string, error)

func (*CustomerDB) GetCustomer

func (c *CustomerDB) GetCustomer(phonenumber string) (bool, *Customer, error)

func (*CustomerDB) GetLinkRequestData

func (db *CustomerDB) GetLinkRequestData(reqid string) (*RequestData, error)

func (*CustomerDB) GetPendingRequest

func (c *CustomerDB) GetPendingRequest(cust *Customer, ref string) (string, error)

func (*CustomerDB) UpdateCustomer

func (c *CustomerDB) UpdateCustomer(cust_id string, name string, gender string) error

func (*CustomerDB) UpdateLinkRequestCode

func (c *CustomerDB) UpdateLinkRequestCode(linkreq string, code string, slpart string) error

func (*CustomerDB) UpdateLinkRequestVoucher

func (c *CustomerDB) UpdateLinkRequestVoucher(linkreq string, vou_id string) error

type RequestData

type RequestData struct {
	Customer   *Customer
	Ref        string
	RoomId     string
	VoubatchId string
	VouId      string
	Intent     string
	Message    string
	JsonData   string
}

Jump to

Keyboard shortcuts

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