db

package
v0.0.0-...-3e7d5d6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Id               int
	Projectid        string `db:"project_id"`
	Casename         string `db:"case_name"`
	Used             bool
	PhoneNumber      string         `db:"phone_number"`
	Utc              sql.NullString `db:"utc"`
	Call_back        bool
	Allowed_start    string
	Allowed_stop     string
	Call_back_period string
}

type DB

type DB struct {
	Config *config.DBConfig
	DBConn *sqlx.DB
	Scheme string
}

func (*DB) ConnectDB

func (a *DB) ConnectDB() error

func (*DB) DBClose

func (a *DB) DBClose()

func (*DB) GetCases

func (a *DB) GetCases(dialerParams DialerParams) map[int]map[string]interface{}

func (*DB) GetCountCases

func (a *DB) GetCountCases(projectid string) int

func (*DB) GetDeferredCases

func (a *DB) GetDeferredCases(dialerParams DialerParams) map[int]map[string]interface{}

func (*DB) GetProjectParams

func (a *DB) GetProjectParams(projectid string) DialerParams

func (*DB) InsertDialCase

func (a *DB) InsertDialCase(dialCase map[string]interface{})

func (*DB) MarkCaseAsUsed

func (a *DB) MarkCaseAsUsed(project_id string, limit int)

func (*DB) SetDeferredDone

func (a *DB) SetDeferredDone(id int)

func (*DB) SetDialCount

func (a *DB) SetDialCount(id int)

func (*DB) SetStatusCall

func (a *DB) SetStatusCall(id int, status string)

func (*DB) SetTimeEndCall

func (a *DB) SetTimeEndCall(id int)

func (*DB) SortCases

func (a *DB) SortCases(sort string) string

type DeferredCases

type DeferredCases struct {
	Id           int
	Casename     string         `db:"case_name"`
	PhoneNumber  string         `db:"phone_number"`
	Utc          sql.NullString `db:"utc"`
	DeferredTime string
}

type DialerParams

type DialerParams struct {
	Id        int
	ProjectId string `db:"project_id"`
	Lines     int
	CallTime  string `db:"call_time"`
	CaseLimit int    `db:"case_limit"`
	Sort      string
	Type      string
	Exten     string
	Context   string
}

Jump to

Keyboard shortcuts

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