Update model

This commit is contained in:
2024-08-19 10:25:40 +02:00
parent 5e94f44e27
commit de7c2cc82c
6 changed files with 90 additions and 1 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ node_modules
frontend/dist
build
bills.db
main.log

10
frontend/wailsjs/go/main/App.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from '../models';
import {time} from '../models';
export function GetBills():Promise<main.WailsBills>;
export function GetPaymentsForMonth(arg1:time.Time):Promise<main.WailsPayments>;
export function SetPaid(arg1:number,arg2:time.Time):Promise<main.WailsPayment>;

View File

@@ -0,0 +1,15 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function GetBills() {
return window['go']['main']['App']['GetBills']();
}
export function GetPaymentsForMonth(arg1) {
return window['go']['main']['App']['GetPaymentsForMonth'](arg1);
}
export function SetPaid(arg1, arg2) {
return window['go']['main']['App']['SetPaid'](arg1, arg2);
}

View File

@@ -0,0 +1,58 @@
export namespace main {
export class WailsBills {
static createFrom(source: any = {}) {
return new WailsBills(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
export class WailsPayment {
static createFrom(source: any = {}) {
return new WailsPayment(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
export class WailsPayments {
static createFrom(source: any = {}) {
return new WailsPayments(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
}
export namespace time {
export class Time {
static createFrom(source: any = {}) {
return new Time(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
}

5
go.mod
View File

@@ -4,7 +4,10 @@ go 1.21
toolchain go1.23.0
require github.com/wailsapp/wails/v2 v2.9.1
require (
github.com/mattn/go-sqlite3 v1.14.22
github.com/wailsapp/wails/v2 v2.9.1
)
require (
github.com/bep/debounce v1.2.1 // indirect

2
go.sum
View File

@@ -35,6 +35,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=