models

package
v0.0.0-...-3b69553 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB variable represents our connection to the database

Functions

func ConnectDatabase

func ConnectDatabase()

ConnectDatabase opens a sqllite3 database connection, and migrates the created models

Types

type Loan

type Loan struct {
	ID           uint    `json:"id" gorm:"primaryKey"`
	LoanName     string  `json:"loan_name"`
	Debt         float32 `json:"debt"`
	InterestRate float32 `json:"interest_rate"`
}

A Loan respresents a single loan of the user

Jump to

Keyboard shortcuts

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