structs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallLog

type CallLog struct {
	ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	// Caller is the calling phone number.
	Caller string `json:"caller" bson:"caller,omitempty"`
	// InboundNumber is the called number.
	InboundNumber string `json:"inboundNumber" bson:"inboundNumber,omitempty"`
	// Date holds the exact date the call was recorded.
	Date time.Time `json:"date" bson:"date,omitempty"`
	// DurationSeconds is the duration in seconds the call took.
	DurationSeconds uint64 `json:"durationSeconds,omitempty" bson:"durationSeconds,omitempty"`
	// The call type.
	CallType string `json:"callType,omitempty" bson:"callType,omitempty"`
	// DateStr holds a string representation of the date in
	// the format of YYYY-MM-DD for indexing.
	DateStr string `json:"datestr" bson:"datestr,omitempty"`
	// Agent is the agent that participated in the call
	Agent string `json:"agent,omitempty" bson:"agent,omitempty"`
	// AgentUserId is the ID of the user that accepted the call.
	AgentUserId string `json:"userId,omitempty" bson:"userId,omitempty"`
	// CustomerID is the ID of the customer that participated in the call.
	CustomerID string `json:"customerID,omitempty" bson:"customerID,omitempty"`
	// CustomerSource is the source of the customer record.
	CustomerSource string `json:"customerSource,omitempty" bson:"customerSource,omitempty"`
	// Error might be set to true if an error occurred during transfer of the call.
	// The exact error is unknown and should be investigated by an administrator.
	Error bool `json:"error,omitempty" bson:"error,omitempty"`
	// TransferTarget is set to the destination of call transfer.
	TransferTarget string `json:"transferTarget,omitempty" bson:"transferTarget,omitempty"`
}

CallLog represents an incoming call.

func (CallLog) ToProto

func (log CallLog) ToProto() *pbx3cxv1.CallEntry

type Overwrite

type Overwrite struct {
	// ID is the a unique ID of the overwrite
	ID primitive.ObjectID `bson:"_id,omitempty" json:"_id"`

	// From holds the datetime at which the overwrite is considered active.
	From time.Time `bson:"from" json:"from"`

	// To holds teh datetime at which the overwrite should not be considered active
	// anymore.
	To time.Time `bson:"to" json:"to"`

	// UserID is the name of the CIS user that is in duty instead.
	UserID string `bson:"userId,omitempty" json:"userId,omitempty"`

	// PhoneNumber is the phone-number that is in duty instead.
	PhoneNumber string `bson:"phoneNumber,omitempty" json:"phoneNumber,omitempty"`

	// DisplayName can be set to a arbitrary value and is used for UI display purposes when
	// duty is changed to a phone-number instead of a user.
	DisplayName string `bson:"displayName,omitempty" json:"displayName,omitempty"`

	// Deleted is set to true if this overwrite has been deleted or superseded.
	Deleted bool `bson:"deleted,omitempty" json:"deleted,omitempty"`

	// CreatedBy is set to the name of the CIS user that created the overwrite.
	CreatedBy string `bson:"createdBy,omitempty" json:"createdBy"`

	// CreatedAt holds the time at which the overwrite has been created.
	CreatedAt time.Time `bson:"createdAt,omitempty" json:"createdAt"`
}

Overwrite defines an overwrite for the emergency doctor-on-duty at a given date.

func (Overwrite) ToProto

func (ov Overwrite) ToProto() *pbx3cxv1.Overwrite

Jump to

Keyboard shortcuts

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