models

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

README

models

介绍

{以下是 Gitee 平台说明,您可以替换此简介 Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 https://gitee.com/enterprises}

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

View Source
const (
	// 未拨打
	CallStatusNotCall = iota + 1

	// 未接听
	CallStatusFailed       // 呼叫失败
	CallStatusBusy         // 用户忙
	CallStatusOutOfService // 不在服务区
	CallStatusStopService  // 已停机
	CallStatusReject       // 拒接
	CallStatusPowerOff     // 已关机
	CallStatusInvalid      // 无效
	CallStatusLimited      // 被限制
	CallStatusLineErr      // 线路错误
	CallStatusNotAnswer    // 未接听

	// 已接听
	CallStatusAccept       // 已接听
	CallStatusOpenWindow   // 弹屏
	CallStatusListen       // 监听
	CallStatusIntervention // 介入
)
View Source
const (
	MarketUnknown = iota + 1
	MarketFailed
	MarketSuccess
)

营销结果

Variables

This section is empty.

Functions

func DelAccount

func DelAccount(user string) error

func GetActiveNumbersByAppId

func GetActiveNumbersByAppId(appId string) (*[]IpccAppNumbers, error)

func GetAllActiveNumbersByAppId

func GetAllActiveNumbersByAppId(appId string, offset int) (*[]IpccAppNumbers, error)

func GetAllAppsFromId

func GetAllAppsFromId(pageSize, page, id int) (result *[]IpccAppInfo, err error)

func GetLostSessionId

func GetLostSessionId(number string) (sessionId string, err error)

func GetNumberByMd5

func GetNumberByMd5(md5 string) (string, error)

func GetRouterAddrByBrand

func GetRouterAddrByBrand(brand string) (addr string, port int, err error)

func GetRouterAddrByNumber

func GetRouterAddrByNumber(number string) (addr string, port int, err error)

func GetSipRegHost

func GetSipRegHost(user string) (string, int, error)

func Init

func Init(user, pwd, serv string) error

func InsertNewAccount

func InsertNewAccount(user, pwd string) error

func InsertNewFile

func InsertNewFile(fileId, name, path, describ, appid string) bool

func InsertRecordDetailsToDb

func InsertRecordDetailsToDb(records []RecordTextDetail) bool

func ListTaskInfo

func ListTaskInfo(companyId int)

func RegAsrKeys

func RegAsrKeys()

func RegConfAsrServ

func RegConfAsrServ()

func RegFile

func RegFile()

func RegIpccAppChangeStatus

func RegIpccAppChangeStatus()

func RegIpccAppManager

func RegIpccAppManager()

func RegIpccBillsRecord

func RegIpccBillsRecord()

func RegIpccBillsTtsRecord

func RegIpccBillsTtsRecord()

func RegIpccLostRepair

func RegIpccLostRepair()

func RegIpccNumberManager

func RegIpccNumberManager()

func RegIpccRecord

func RegIpccRecord()

func RegIpccSipRouter

func RegIpccSipRouter()

func RegIpccTtsManager

func RegIpccTtsManager()

func RegLostAndFind

func RegLostAndFind()

func RegSSRC

func RegSSRC()

func RegSipAccount

func RegSipAccount()

func RegSipClient

func RegSipClient(user, clientAddr, server string) error

func RegSipRegistor

func RegSipRegistor()

func RegStatusModel

func RegStatusModel()

func RegTaskInfo

func RegTaskInfo()

func SaveLostToDb

func SaveLostToDb(number, sessionId string) bool

func SaveRecordToDb

func SaveRecordToDb(records []*IpccRecordFile) bool

func SaveTtsRecordToDb

func SaveTtsRecordToDb(records []*IpccBillsTts) bool

func UpdateAsrDelay

func UpdateAsrDelay(delay int) error

func UpdateStatus

func UpdateStatus() error

func UpdateTTSStatus

func UpdateTTSStatus(ttsInfo string) error

Types

type BasicModel

type BasicModel struct {
	Status  int32     `json:"-"`
	Deleted bool      `json:"-"`
	Created time.Time `orm:"auto_now_add; type(datetime)" json:"-"`
	Updated time.Time `orm:"auto_now; type(datetime)" json:"-"`
}

type CallRecord

type CallRecord struct {
	Id            int64
	CompanyId     int64     `orm:"description(被叫所属企业id)"`
	MobileId      int64     `orm:"description(被叫id)"`
	TaskId        int64     `orm:"description(被叫所属任务id)"`
	ServiceId     int64     `orm:"description(所属座席id)"`
	CallId        string    `orm:"description(呼叫id)"`
	Caller        string    `orm:"description(主叫/线路标识)"`
	Called        string    `orm:"description(被叫号码)"`
	RecordUrl     string    `orm:"description(录音地址)"`
	BillDuration  int       `orm:"description(账单计费时长/min)"`
	CallDuration  int       `orm:"description(呼叫时长/s)"`
	AgentDuration int       `orm:"description(座席介入时长/s)"`
	StartTime     time.Time `orm:"null;description(呼叫开始时间)"`
	AnswerTime    time.Time `orm:"null;description(接听时间时间)"`
	TransferTime  time.Time `orm:"null;description(转接时间)"`
	EndTime       time.Time `orm:"null;description(呼叫结束时间)"`
	Intention     int32     `orm:"null;description(意向分类)"`
	MarketResult  int32     `orm:"null;description(营销结果)"`
	BasicModel
}

呼叫记录表

type IpccAppChangeStatus

type IpccAppChangeStatus struct {
	Id           int
	UpdateStatus int
	Describ      string
	UpdateTime   time.Time
}

func GetAsrDelay

func GetAsrDelay() (IpccAppChangeStatus, error)

func GetChangeStatus

func GetChangeStatus() (IpccAppChangeStatus, error)

func GetDisplayNumber

func GetDisplayNumber() (IpccAppChangeStatus, error)

func GetTTSChangeStatus

func GetTTSChangeStatus() (IpccAppChangeStatus, error)

func GetTransferNumber

func GetTransferNumber() (IpccAppChangeStatus, error)

type IpccAppInfo

type IpccAppInfo struct {
	Id          int
	AppId       string `orm:"column(appid)"`
	AppName     string
	CallAddress string
	Active      int
	Brand       string
	RingCheck   bool
}

func GetAppsByAppid

func GetAppsByAppid(appId string) (result *IpccAppInfo, err error)

type IpccAppNumbers

type IpccAppNumbers struct {
	Id           int
	AppId        string    `orm:"column(appid)"`
	Number       string    `orm:"column(number)"`
	Describ      string    `orm:"column(dercrib)"`
	EnterpriseId string    `orm:"column(enterpriseId)"`
	TimeCreate   time.Time `orm:"column(timeCreate)"`
	NumberStatus string    `orm:"column(numberStatus)"`
	RouterAddr   string    `orm:"column(addr)"`
	RouterPort   int       `orm:"column(port)"`
}

type IpccBillsTts

type IpccBillsTts struct {
	Id        int
	Text      string
	Appid     string
	CreatTime time.Time
	CallId    string
	TextCount int
	BillTimes int
}

type IpccConfigAsrKeys

type IpccConfigAsrKeys struct {
	Id        int
	KeyStr    string
	NumStatus int
	Describ   string
	Create    time.Time `orm:"auto_now;type(datetime)"`
	Weight    int
	Active    bool
}

func GetAllKeysStatus

func GetAllKeysStatus() ([]IpccConfigAsrKeys, error)

type IpccConfigAsrServ

type IpccConfigAsrServ struct {
	Id        int
	Brand     string
	ServAddr  string
	Port      int
	Active    bool
	CreatTime time.Time
}

func GetAllAsrServs

func GetAllAsrServs() ([]IpccConfigAsrServ, error)

type IpccFileInfo

type IpccFileInfo struct {
	Id         int
	FileId     string
	FileName   string
	Path       string
	Describe   string
	CreateTime time.Time
	Appid      string
	Active     int
}

type IpccLostNumberFind

type IpccLostNumberFind struct {
	Id         int
	Md5        string
	RealNumber string
	Describ    string    `orm:"null"`
	UpdateTime time.Time `orm:"null"`
}

type IpccLostRepair

type IpccLostRepair struct {
	Id         int
	Number     string
	SessionId  string
	CreateTime time.Time
}

type IpccRecordFile

type IpccRecordFile struct {
	Id         int
	AppId      string
	Caller     string
	Callee     string
	CallId     string
	RecordUrl  string
	CreateTime time.Time
	Expair     time.Time
}

type IpccSipClient

type IpccSipClient struct {
	PkClientUser string `orm:"size(64);pk"`
	RegServer    string
	ClientAddr   string
	UpDateTime   time.Time `orm:"auto_now;type(datetime)"`
}

type IpccSipRouterBrand

type IpccSipRouterBrand struct {
	Id         int
	Brand      string
	RouterAddr string
	Port       int
	Active     bool
	CreateTime time.Time
}

type IpccSipRouterNumber

type IpccSipRouterNumber struct {
	Id         int
	Number     string
	RouterAddr string
	Port       int
	Active     bool
	CreateTime time.Time
}

type IpccStatusCallcenter

type IpccStatusCallcenter struct {
	Id             int    `orm:"pk"`
	Name           string //组件名称:固定callcenter
	Addr           string //服务IP
	Port           int    //端口
	Dsid           string
	Tags           string //用于检索
	Version        string //运行版本号
	Status         int    //组件状态:1 服务中,2 升级中,3 下线
	CallNumbers    int    //当前通话数
	TtsStatus      int    //TTS状态:1 服务中,2 升级中,3 下线
	AsrStatus      int    //ASR状态
	FsStatus       int    //FS状态
	ChannelNumbers int    //当前通道数
	Callback       string //http服务 url
	MgrStauts      int    //管理状态
	TransferPort   int    //转接端口
	LastAlive      int64  //上次心跳时间戳
	LastUpdate     time.Time
	FdOpens        int
	CpuUsage       int
	Connects       int
}

func GetCallCenter

func GetCallCenter() (result []IpccStatusCallcenter, errRet error)

type IpccStatusKernel

type IpccStatusKernel struct {
	Id             int    `orm:"pk"`
	Name           string //组件名称:固定cckernel
	Addr           string //服务IP
	Port           int    //端口
	Tags           string //用于检索
	Version        string //运行版本号
	Status         int    //组件状态:1 服务中,/*2 升级中,*/3 下线
	SessionNumbers int    //当前会话数
	Dsid           string
	Callback       string    //http服务 url
	LastAlive      time.Time //上次心跳时间。小写字母开头,json序列化时会忽略此字段
	MgrStatus      int       // 管理状态:1 服务中,2 升级中,3 下线
}

func GetCCkernel

func GetCCkernel() (result []IpccStatusKernel, errRet error)

type IpccTtsInfo

type IpccTtsInfo struct {
	//Id     int64  `orm:"pk"`
	TtsId  string `orm:"size(16);unique;column(ttsId);pk"`
	Name   string
	Update time.Time `orm:"auto_now;type(datetime)"`
}

func GetAllTtsInfo

func GetAllTtsInfo() (result []IpccTtsInfo, err error)

type Mobile

type Mobile struct {
	Id        int64
	TaskId    int64
	CompanyId int64
	Phone     string
	VarTts1   string `orm:"null"`
	VarTts2   string `orm:"null"`
	VarTts3   string `orm:"null"`
	VarTts4   string `orm:"null"`
	BasicModel
}

电话号码表

type RecordTextDetail

type RecordTextDetail struct {
	Id          int64
	Idx         int    `orm:"description(序号)`
	CallId      string `orm:"description(呼叫id)"`
	Type        string `orm:"description(文本类型 PERSON: 客户 ROBOT: 机器人文本)"`
	Text        string `orm:"description(语音文本)"`
	StartOffset int    `orm:"description(录音起始偏移量)"`
	EndOffset   int    `orm:"description(录音结束偏移量)"`
}

func GetRecordsByCallId

func GetRecordsByCallId(callId string) (records []RecordTextDetail, err error)

type SipAccount

type SipAccount struct {
	Id         int
	Username   string `orm:"size(16);unique"`
	Password   string `orm:"size(16)"`
	UpdateTime time.Time
}

func GetAccountInfo

func GetAccountInfo(user string) (*SipAccount, error)

type Ssrc

type Ssrc struct {
	Ssrc     uint32 `orm:"pk"`
	KernelId string
	Expair   time.Time
	Create   time.Time `orm:"auto_now;type(datetime)"`
	Invalid  int32
}

func GetKernelIdBySsrc

func GetKernelIdBySsrc(ssrc uint32) (*Ssrc, error)

type TWebankBill

type TWebankBill struct {
	Id     int
	Callid string
	// contains filtered or unexported fields
}

func GetBillByCallId

func GetBillByCallId(callid string) (TWebankBill, error)

type TimeModel

type TimeModel struct {
	Created time.Time `orm:"auto_now_add; type(datetime)"`
	Updated time.Time `orm:"auto_now; type(datetime)"`
}

Jump to

Keyboard shortcuts

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