Documentation ¶
Index ¶
- func ChamaAccountProto(db *ChamaAccount) (*transaction.ChamaAccount, error)
- func ChamaMemberProto(db *ChamaMember) (*chama.ChamaMember, error)
- func ChamaProto(db *Chama) (*chama.Chama, error)
- func LoanProductProto(db *LoanProduct) (*loan.LoanProduct, error)
- func LoanProto(db *Loan) (*loan.Loan, error)
- func TransactionProto(db *Transaction) (*transaction.Transaction, error)
- type Chama
- type ChamaAccount
- type ChamaMember
- type Loan
- type LoanProduct
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChamaAccountProto ¶
func ChamaAccountProto(db *ChamaAccount) (*transaction.ChamaAccount, error)
func ChamaMemberProto ¶
func ChamaMemberProto(db *ChamaMember) (*chama.ChamaMember, error)
func LoanProductProto ¶
func LoanProductProto(db *LoanProduct) (*loan.LoanProduct, error)
func TransactionProto ¶
func TransactionProto(db *Transaction) (*transaction.Transaction, error)
Types ¶
type Chama ¶
type Chama struct { ID uint `gorm:"primaryKey;autoIncrement"` CreatorID string `gorm:"type:varchar(50);not null"` Name string `gorm:"type:varchar(50);not null"` Description string `gorm:"type:varchar(200)"` Status string `gorm:"type:varchar(100)"` AccountBalance float64 `gorm:"type:float(15)"` Active bool `gorm:"type:tinyint(1)"` UpdatedAt time.Time `gorm:"autoUpdateTime"` CreatedAt time.Time `gorm:"autoCreateTime"` }
type ChamaAccount ¶
type ChamaAccount struct { ID uint `gorm:"primaryKey;autoIncrement"` OwnerID string `gorm:"type:varchar(50);not null"` AccountName string `gorm:"type:varchar(50);not null"` AccountType string `gorm:"type:varchar(30);not null"` Withdrawable bool `gorm:"type:tinyint(1)"` TotalDepositedAmount float64 `gorm:"type:float(15)"` AvailableAmount float64 `gorm:"type:float(15)"` TotalWithdrawnAmount float64 `gorm:"type:float(15)"` LastDepositedAmount float64 `gorm:"type:float(15)"` LastWithdrawnAmount float64 `gorm:"type:float(15)"` Active bool `gorm:"type:tinyint(1)"` UpdatedAt time.Time `gorm:"autoUpdateTime"` CreatedAt time.Time `gorm:"autoCreateTime"` }
func ChamaAccountModel ¶
func ChamaAccountModel(pb *transaction.ChamaAccount) (*ChamaAccount, error)
func (*ChamaAccount) TableName ¶
func (*ChamaAccount) TableName() string
type ChamaMember ¶
type ChamaMember struct { ID uint `gorm:"primaryKey;autoIncrement"` ChamaID string `gorm:"type:varchar(15);not null"` FirstName string `gorm:"type:varchar(30);not null"` LastName string `gorm:"type:varchar(30);not null"` Phone string `gorm:"type:varchar(15);not null"` IDNumber string `gorm:"type:varchar(10);not null"` Email string `gorm:"type:varchar(50)"` Residence string `gorm:"type:varchar(100)"` Status string `gorm:"type:varchar(100)"` Beneficiaries []byte `gorm:"type:json"` Guarantees []byte `gorm:"type:json"` JobDetails []byte `gorm:"type:json"` KYC []byte `gorm:"type:json"` Active bool `gorm:"type:tinyint(1)"` UpdatedAt time.Time `gorm:"autoUpdateTime"` CreatedAt time.Time `gorm:"autoCreateTime"` }
func ChamaMemberModel ¶
func ChamaMemberModel(pb *chama.ChamaMember) (*ChamaMember, error)
func (*ChamaMember) TableName ¶
func (*ChamaMember) TableName() string
type Loan ¶
type Loan struct { ID uint `gorm:"primaryKey;autoIncrement"` ChamaID string `gorm:"type:varchar(15);not null"` ProductID string `gorm:"type:varchar(15);not null"` MemberID string `gorm:"type:varchar(15);not null"` LoaneeNames string `gorm:"type:varchar(30);not null"` LoaneePhone string `gorm:"type:varchar(15);not null"` NationalID string `gorm:"type:varchar(10);not null"` LoaneeEmail string `gorm:"type:varchar(50)"` Approved bool `gorm:"type:tinyint(1)"` DurationDays int32 `gorm:"type:int(10)"` InterestRate float32 `gorm:"type:float(3)"` LoanAmount float64 `gorm:"type:float(15)"` SettledAmount float64 `gorm:"type:float(15)"` PenaltyAmount float64 `gorm:"type:float(15)"` UpdatedAt time.Time `gorm:"autoUpdateTime"` CreatedAt time.Time `gorm:"autoCreateTime"` }
type LoanProduct ¶
type LoanProduct struct { ID uint `gorm:"primaryKey;autoIncrement"` ChamaID string `gorm:"type:varchar(15);not null"` Name string `gorm:"type:varchar(50);not null"` Description string `gorm:"type:varchar(200)"` InterestRate float32 `gorm:"type:float(3)"` LoanDurationDays int32 `gorm:"type:int(10)"` LoanMinimumAmount float64 `gorm:"type:float(15)"` LoanMaximumAmount float64 `gorm:"type:float(15)"` LoanAccountBalance float64 `gorm:"type:float(15)"` LoanInterestBalance float64 `gorm:"type:float(15)"` LoanSettledBalance float64 `gorm:"type:float(15)"` SettledLoans int32 `gorm:"type:int(10)"` ActiveLoans int32 `gorm:"type:int(10)"` TotalLoans int32 `gorm:"type:int(10)"` UpdatedAt time.Time `gorm:"autoUpdateTime"` CreatedAt time.Time `gorm:"autoCreateTime"` }
func LoanProductModel ¶
func LoanProductModel(pb *loan.LoanProduct) (*LoanProduct, error)
func (*LoanProduct) TableName ¶
func (*LoanProduct) TableName() string
type Transaction ¶
type Transaction struct { ID uint `gorm:"primaryKey;autoIncrement"` ActorID string `gorm:"type:varchar(50);not null"` AccountID string `gorm:"type:varchar(50);not null"` Description string `gorm:"type:varchar(200);not null"` TransactionType string `gorm:"type:varchar(30);not null"` TransactionAmount float64 `gorm:"type:float(15)"` CreatedAt time.Time `gorm:"autoCreateTime"` }
func TransactionModel ¶
func TransactionModel(pb *transaction.Transaction) (*Transaction, error)
func (*Transaction) TableName ¶
func (*Transaction) TableName() string
Click to show internal directories.
Click to hide internal directories.