Documentation
¶
Index ¶
- func GetAllPeople(dbMap *gorp.DbMap) []interface{}
- func GetDebt(dbMap *gorp.DbMap, queryID int) interface{}
- func GetExpense(dbMap *gorp.DbMap, queryID int) interface{}
- func GetHouse(dbMap *gorp.DbMap, queryID int) interface{}
- func GetPerson(dbMap *gorp.DbMap, queryID int) interface{}
- func GetPersonsRoommates(dbMap *gorp.DbMap, person Person) []interface{}
- func GetRoommatesBalances(dbMap *gorp.DbMap, person Person) []interface{}
- type Balance
- type Debt
- type Expense
- type House
- type Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllPeople ¶
func GetExpense ¶
func GetPersonsRoommates ¶
func GetRoommatesBalances ¶
Types ¶
type Debt ¶
type Debt struct {
Id int `json:"id" db:"id"`
AmountInCents int `json:"amount_in_cents" db:"amount_in_cents"`
Person Person `json:"person" db:"person"`
Loaner Person `json:"loaner" db:"loaner"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
type Expense ¶
type Expense struct {
Id int `json:"id" db:"id"`
HouseId int `json:"house_id" db:"house_id"`
AmountInCents int `json:"amount_in_cents" db:"amount_in_cents"`
Name string `json:"name" db:"name"`
Description string `json:"description" db:"description"`
Notes string `json:"notes" db:"notes"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
Loaner Person `json:"loaner"`
Debts []Debt `json:"debts"`
}
type Person ¶
type Person struct {
Id int `json:"id" db:"id"`
HouseId int `json:"house_id" db:"house_id"`
Name string `json:"name" db:"name"`
Email string `json:"email" db:"email"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
// associations
Roommates []Person `json:"roommates"`
House House `json:"house"`
}
Click to show internal directories.
Click to hide internal directories.