fix created_at for all models
Marco Andronaco andronacomarco@gmail.com
Sun, 06 Oct 2024 14:47:01 +0200
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
src/app/models.go
→
src/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"`