Skip to content
Snippets Groups Projects
Commit 37c60dc0 authored by Emanuel Petrinovic's avatar Emanuel Petrinovic
Browse files

add json mapping to modells

parent 2978693d
No related branches found
No related tags found
No related merge requests found
package model
type Account struct {
Name string
BankName string
Number string
Name string `json:name`
BankName string `json:bankname`
Number string `json:number`
}
package model
type Campaign struct {
ID uint
Name string
OrganizerName string
TargetAmmount float64
DonationMinimum float64
AmmountDonatedSoFar float64
Donations []Donation
Account
ID uint `json:id`
Name string `json:name`
OrganizerName string `json:organizername`
TargetAmmount float64 `json:targetammount`
DonationMinimum float64 `json:donationminimum`
AmmountDonatedSoFar float64 `json: ammountdonatedsofar`
Donations []Donation `json: donations`
Account Account `account`
}
package model
type Donation struct {
Ammount float64
DonorName string
ReceiptRequested bool
Status
Account
Ammount float64 `json:ammount`
DonorName string `json:donorname`
ReceiptRequested bool `json:receiptrequested`
Status Status `json:status`
Account Account `json:account`
}
type Status string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment