all repos — piggy @ ed5fd22c5fa0cb0923a3d5db1f9869a3cc61e340

Dead simple finance manager in Go, HTML and JS.

fix created_at for all models
Marco Andronaco andronacomarco@gmail.com
Sun, 06 Oct 2024 14:47:01 +0200
commit

ed5fd22c5fa0cb0923a3d5db1f9869a3cc61e340

parent

bbb48c59b31feefe1c469fb20c41527184610062

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/app/models.gosrc/app/models.go

@@ -6,7 +6,7 @@ )

type Bookmaker struct { ID uint `json:"id"` - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at" gorm:"<-:create"` UpdatedAt time.Time `json:"updated_at"` Name string `json:"name" gorm:"not null" `

@@ -15,7 +15,7 @@ }

type Account struct { ID uint `json:"id"` - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at" gorm:"<-:create"` UpdatedAt time.Time `json:"updated_at"` Name string `json:"name" gorm:"not null"`

@@ -23,7 +23,7 @@ }

type Record struct { ID uint `json:"id" gorm:"primaryKey"` - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at" gorm:"<-:create"` UpdatedAt time.Time `json:"updated_at"` Done bool `json:"done" gorm:"not null"`

@@ -38,7 +38,7 @@ }

type Entry struct { ID uint `json:"id"` - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at" gorm:"<-:create"` UpdatedAt time.Time `json:"updated_at"` RecordID uint `json:"record_id" gorm:"not null"`

@@ -61,7 +61,7 @@ }

type SubEntry struct { ID uint `json:"id"` - CreatedAt time.Time `json:"created_at"` + CreatedAt time.Time `json:"created_at" gorm:"<-:create"` UpdatedAt time.Time `json:"updated_at"` EntryID uint `json:"entry_id" gorm:"not null"`