From 3ed2a66acdd3379d2107a7baaee6f20413b22439 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 14 Dec 2024 17:21:31 +0100 Subject: [PATCH] some further moddeling --- database/models.go | 15 ++++++++++----- go.mod | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/database/models.go b/database/models.go index 89bd157..4a39c88 100644 --- a/database/models.go +++ b/database/models.go @@ -1,20 +1,25 @@ package database +import "time" + type Account struct { - Number int - Name string - Kind string + ID uint + Name string + Kind string } type Transaction struct { + ID uint Amount float32 Debit bool - OffsetAccount int - Account int + OffsetAccount uint + Account uint + Time time.Time Description string } type User struct { + ID uint Name string Password string } diff --git a/go.mod b/go.mod index 204d4bb..525b943 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/LeRoid-hub/Bookholder-API go 1.22.1 -require github.com/joho/godotenv v1.5.1 // indirect +require github.com/joho/godotenv v1.5.1