From 7d3ac45ffa2e1d5a64cc47bde0f1d107b2f25075 Mon Sep 17 00:00:00 2001
From: Sercan Yesildal <sercan.yesildal@gmail.com>
Date: Mon, 17 Apr 2023 15:12:29 +0200
Subject: [PATCH] json tags added

---
 src/myaktion/model/account.go  |  6 +++---
 src/myaktion/model/campaign.go | 14 +++++++-------
 src/myaktion/model/donation.go | 10 +++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/myaktion/model/account.go b/src/myaktion/model/account.go
index d2e74b4..8628334 100644
--- a/src/myaktion/model/account.go
+++ b/src/myaktion/model/account.go
@@ -1,7 +1,7 @@
 package model
 
 type Account struct {
-	Name     string
-	BankName string
-	Number   string
+	Name     string `json:"name"`
+	BankName string `json:"bankName"`
+	Number   string `json:"number"`
 }
diff --git a/src/myaktion/model/campaign.go b/src/myaktion/model/campaign.go
index 2fb5dcf..d7e04b6 100644
--- a/src/myaktion/model/campaign.go
+++ b/src/myaktion/model/campaign.go
@@ -1,11 +1,11 @@
 package model
 
 type Campaign struct {
-	Name               string
-	OrganizerName      string
-	TargetAmount       float64
-	DonationMinimum    float64
-	AmountDonatedSoFar float64
-	Account            Account
-	Donations          []Donation
+	Name               string     `json:"name"`
+	OrganizerName      string     `json:"organizerName"`
+	TargetAmount       float64    `json:"targetAmount"`
+	DonationMinimum    float64    `json:"donationMinimum"`
+	AmountDonatedSoFar float64    `json:"amountDonatedSoFar"`
+	Account            Account    `json:"account"`
+	Donations          []Donation `json:"donations"`
 }
diff --git a/src/myaktion/model/donation.go b/src/myaktion/model/donation.go
index 4c80e6d..972e219 100644
--- a/src/myaktion/model/donation.go
+++ b/src/myaktion/model/donation.go
@@ -6,11 +6,11 @@ const (
 )
 
 type Donation struct {
-	Amount           float64
-	DonorName        string
-	ReceiptRequested bool
-	Account          Account
-	Status           Status
+	Amount           float64 `json:"amount"`
+	DonorName        string  `json:"donorName"`
+	ReceiptRequested bool    `json:"receiptRequested"`
+	Account          Account `json:"account"`
+	Status           Status  `json:"status"`
 }
 
 type Status string
-- 
GitLab