From ce0720d881d76d660b34b40f6fb8ef08c2d679db Mon Sep 17 00:00:00 2001 From: Miroslav Misek Date: Fri, 18 Apr 2025 17:53:53 +0200 Subject: [PATCH] json tags --- entities.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entities.go b/entities.go index 0427978..c77b4a0 100644 --- a/entities.go +++ b/entities.go @@ -8,9 +8,9 @@ import ( // EntityBase contains common columns for all tables. type EntityBase struct { - ID uuid.UUID `gorm:"type:uuid;primary_key;"` - CreatedAt time.Time - UpdatedAt *time.Time + ID uuid.UUID `gorm:"type:uuid;primary_key;" json:"id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt *time.Time `json:"updated_at"` //DeletedAt *time.Time }