From a5acdce64766205ca40ba05577791bf13681c157 Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 12 Jul 2023 09:30:56 +0200 Subject: [PATCH] Annotate some models --- models/answer.go | 4 ++-- models/question.go | 6 +++--- models/{test.go => quiz.go} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename models/{test.go => quiz.go} (100%) diff --git a/models/answer.go b/models/answer.go index 55ee370..931c818 100644 --- a/models/answer.go +++ b/models/answer.go @@ -1,6 +1,6 @@ package models type Answer struct { - ID string - Text string + ID string `json:"id"` + Text string `json:"text"` } diff --git a/models/question.go b/models/question.go index fb06704..0a25e9d 100644 --- a/models/question.go +++ b/models/question.go @@ -1,7 +1,7 @@ package models type Question struct { - ID string - Text string - AnswerIDs []string + ID string `json:"id"` + Text string `json:"text"` + AnswerIDs []string `json:"answer_ids"` } diff --git a/models/test.go b/models/quiz.go similarity index 100% rename from models/test.go rename to models/quiz.go