b2c_model

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const B2CTable = "b2c_transactions"

B2CTable is table name for b2c transactions

Variables

This section is empty.

Functions

This section is empty.

Types

type DailyStat added in v1.1.1

type DailyStat struct {
	ID                     uint   `gorm:"primaryKey;autoIncrement"`
	OrgShortCode           string `gorm:"index;type:varchar(20);not null"`
	Date                   string `gorm:"index;type:varchar(10);not null"`
	TotalTransactions      int32  `gorm:"type:int(10);not null"`
	SuccessfulTransactions int32
	FailedTransactions     int32
	TotalAmountTransacted  float32        `gorm:"index;type:float(15)"`
	TotalCharges           float32        `gorm:"index;type:float(15)"`
	CreatedAt              time.Time      `gorm:"autoCreateTime"`
	UpdatedAt              time.Time      `gorm:"autoCreateTime"`
	DeletedAt              gorm.DeletedAt `gorm:"index"`
}

DailyStat contains statistics for a day

func (*DailyStat) TableName added in v1.1.1

func (*DailyStat) TableName() string

TableName ...

type Payment

type Payment struct {
	ID                            uint   `gorm:"primaryKey;autoIncrement"`
	InitiatorID                   string `gorm:"index;type:varchar(50)"`
	InitiatorTransactionReference string `gorm:"index;type:varchar(50)"`
	InitiatorCustomerReference    string `gorm:"index;type:varchar(50)"`
	InitiatorCustomerNames        string `gorm:"type:varchar(50)"`

	Msisdn       string  `gorm:"index;type:varchar(15)"`
	OrgShortCode string  `gorm:"index;type:varchar(15)"`
	CommandId    string  `gorm:"index;type:varchar(30)"`
	Amount       float32 `gorm:"index;type:float(10)"`

	ConversationID           string `gorm:"index;type:varchar(50);not null"`
	OriginatorConversationID string `gorm:"index;type:varchar(50);not null"`
	ResponseDescription      string `gorm:"type:varchar(300)"`
	ResponseCode             string `gorm:"index;type:varchar(10)"`
	ResultCode               string `gorm:"index;type:varchar(10)"`
	ResultDescription        string `gorm:"type:varchar(300)"`

	WorkingAccountFunds float32        `gorm:"type:float(10)"`
	UtilityAccountFunds float32        `gorm:"type:float(10)"`
	MpesaCharges        float32        `gorm:"type:float(10)"`
	OnfonCharges        float32        `gorm:"type:float(10)"`
	RecipientRegistered bool           `gorm:"index;type:tinyint(1)"`
	MpesaReceiptId      sql.NullString `gorm:"index;type:varchar(50);unique"`
	ReceiverPublicName  string         `gorm:"type:varchar(50)"`

	Status    string `gorm:"index;type:varchar(30)"`
	Source    string `gorm:"index;type:varchar(30)"`
	Tag       string `gorm:"index;type:varchar(30)"`
	Succeeded string `gorm:"index;type:enum('YES','NO', 'UNKNOWN');default:NO"`
	Processed string `gorm:"index;type:enum('YES','NO');default:NO"`

	TransactionTime sql.NullTime `gorm:"index;type:datetime(6)"`
	UpdatedAt       time.Time    `gorm:"autoUpdateTime;type:datetime(6)"`
	CreatedAt       time.Time    `gorm:"index;autoCreateTime;type:datetime(6);not null"`
}

Payment is B2C payment model

func (*Payment) TableName

func (*Payment) TableName() string

TableName is table name for model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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