2024-01-15 19:26:51 -08:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
|
2024-02-27 18:38:00 -08:00
|
|
|
"time"
|
2024-01-15 19:26:51 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
type Transaction struct {
|
|
|
|
Id int `db:"trns_id" json:"Id"`
|
|
|
|
Amount string `db:"trns_amount" json:"Amount"`
|
|
|
|
Description sql.NullString `db:"trns_description" json:"Description"`
|
|
|
|
Account int `db:"trns_account" json:"Account"`
|
|
|
|
Bucket sql.NullInt64 `db:"trns_bucket" json:"Bucket"`
|
|
|
|
Date time.Time `db:"trns_date" json:"TransactionDate"`
|
|
|
|
}
|
|
|
|
|
2024-02-17 14:50:58 -08:00
|
|
|
type Account struct {
|
|
|
|
Id int `db:"acnt_id" json:"Id"`
|
2024-02-27 17:35:33 -08:00
|
|
|
DisplayName sql.NullString `db:"acnt_display_name" json:"DisplayName"`
|
2024-02-17 14:50:58 -08:00
|
|
|
Description sql.NullString `db:"acnt_description" json:"Description"`
|
|
|
|
}
|
|
|
|
|
2024-02-27 17:35:33 -08:00
|
|
|
type Bucket struct {
|
2024-02-27 18:38:00 -08:00
|
|
|
Id int `db:"bkt_id" json:"id"`
|
|
|
|
DisplayCode sql.NullString `db:"bkt_display_code" json:"DisplayCode"`
|
|
|
|
DisplayName sql.NullString `db:"bkt_display_name" json:"DisplayName"`
|
|
|
|
Description sql.NullString `db:"bkt_description" json:"Description"`
|
2024-02-27 17:35:33 -08:00
|
|
|
}
|
|
|
|
|
2024-01-15 19:26:51 -08:00
|
|
|
type HumanLegibleTransaction struct {
|
|
|
|
Id int `db:"trns_id" json:"Id"`
|
|
|
|
Amount string `db:"trns_amount" json:"Amount"`
|
|
|
|
Description sql.NullString `db:"trns_description" json:"Description"`
|
2024-02-27 18:38:00 -08:00
|
|
|
AccountName sql.NullString `db:"account_name" json:"AccountName"`
|
2024-01-15 19:26:51 -08:00
|
|
|
Account int `db:"trns_account" json:"Account"`
|
|
|
|
Bucket sql.NullInt64 `db:"trns_bucket" json:"Bucket"`
|
2024-02-27 18:38:00 -08:00
|
|
|
BucketName sql.NullString `db:"bucket_name" json:"BucketName"`
|
2024-01-15 19:26:51 -08:00
|
|
|
Date time.Time `db:"trns_date" json:"TransactionDate"`
|
|
|
|
}
|
2024-01-17 19:58:31 -08:00
|
|
|
|
2024-02-17 14:50:58 -08:00
|
|
|
type QuickTransactionType struct {
|
2024-02-27 18:38:00 -08:00
|
|
|
DisplayName string
|
2024-02-10 10:52:09 -08:00
|
|
|
}
|
|
|
|
|
2024-01-17 19:58:31 -08:00
|
|
|
type ChartjsData struct {
|
2024-02-27 18:38:00 -08:00
|
|
|
Labels []string `json:"labels"`
|
|
|
|
Data []int `json:"data"`
|
2024-01-18 18:57:03 -08:00
|
|
|
}
|
|
|
|
|
2024-01-19 21:05:08 -08:00
|
|
|
type TwoIntsItem struct {
|
2024-02-27 18:38:00 -08:00
|
|
|
Item1 int
|
|
|
|
Item2 int
|
2024-01-17 19:58:31 -08:00
|
|
|
}
|