repository

package
v0.0.0-...-4b44fdb Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *gorm.DB) *DB

func (*DB) GetAllWallet

func (db *DB) GetAllWallet() ([]TbWallet, error)

func (*DB) GetWalletDetail

func (db *DB) GetWalletDetail(cid, accNo string) ([]TmpWalletDetail, error)

func (*DB) PostAddBalance

func (db *DB) PostAddBalance(req TbTransaction, status string) (int64, error)

func (*DB) PostCreateNewWallet

func (db *DB) PostCreateNewWallet(req TbWallet, reqWAcc TbWalletAccount, reqTrans TbTransaction) (int64, error)

func (*DB) PostDeductBalance

func (db *DB) PostDeductBalance(req TbTransaction) (int64, error)

func (*DB) PostWalletStatus

func (db *DB) PostWalletStatus(req TbWalletAccount) (int64, error)

type TbTransaction

type TbTransaction struct {
	TransNo   string    `gorm:"column:trans_no" json:"trans_no"`
	Type      string    `gorm:"column:type" json:"type"`
	AccountNo string    `gorm:"column:account_no" json:"account_no"`
	Amount    float64   `gorm:"column:amount" json:"amount"`
	TransDt   time.Time `gorm:"column:trans_dt" json:"trans_dt"`
	CreatedDt time.Time `gorm:"column:created_dt" json:"created_dt"`
	CreatedBy string    `gorm:"column:created_by" json:"created_by"`
	UpdatedDt time.Time `gorm:"column:updated_dt" json:"updated_dt"`
	UpdatedBy string    `gorm:"column:updated_by" json:"updated_by"`
}

func (TbTransaction) TableName

func (TbTransaction) TableName() string

type TbWallet

type TbWallet struct {
	CitizenId   string    `gorm:"column:citizen_id" json:"citizen_id"`
	Title       string    `gorm:"column:title" json:"title"`
	Firstname   string    `gorm:"column:firstname" json:"firstname"`
	Lastname    string    `gorm:"column:lastname" json:"lastname"`
	Address     string    `gorm:"column:address" json:"address"`
	Subdistrict string    `gorm:"column:subdistrict" json:"subdistrict"`
	District    string    `gorm:"column:district" json:"district"`
	Province    string    `gorm:"column:province" json:"province"`
	ZipCode     string    `gorm:"column:zipcode" json:"zipcode"`
	Tel         string    `gorm:"column:tel" json:"tel"`
	CreatedDt   time.Time `gorm:"column:created_dt" json:"created_dt"`
	CreatedBy   string    `gorm:"column:created_by" json:"created_by"`
	UpdatedDt   time.Time `gorm:"column:updated_dt" json:"updated_dt"`
	UpdatedBy   string    `gorm:"column:updated_by" json:"updated_by"`
}

func (TbWallet) TableName

func (TbWallet) TableName() string

type TbWalletAccount

type TbWalletAccount struct {
	CitizenId string    `gorm:"column:citizen_id" json:"citizen_id"`
	AccountNo string    `gorm:"column:account_no" json:"account_no"`
	Balance   float64   `gorm:"column:balance" json:"balance"`
	Status    string    `gorm:"column:status" json:"status"`
	Remark    string    `gorm:"column:remark" json:"remark"`
	CreatedDt time.Time `gorm:"column:created_dt" json:"created_dt"`
	CreatedBy string    `gorm:"column:created_by" json:"created_by"`
	UpdatedDt time.Time `gorm:"column:updated_dt" json:"updated_dt"`
	UpdatedBy string    `gorm:"column:updated_by" json:"updated_by"`
}

func (TbWalletAccount) TableName

func (TbWalletAccount) TableName() string

type TmpWalletDetail

type TmpWalletDetail struct {
	AccountNo string `gorm:"column:account_no" json:"account_no"`
	CitizenId string `gorm:"column:citizen_id" json:"citizen_id"`
	Title     string `gorm:"column:title" json:"title"`
	Firstname string `gorm:"column:firstname" json:"firstname"`
	Lastname  string `gorm:"column:lastname" json:"lastname"`
	Balance   string `gorm:"column:balance" json:"balance"`
	Status    string `gorm:"column:status" json:"status"`
	Remark    string `gorm:"column:remark" json:"remark"`
}

Jump to

Keyboard shortcuts

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