Skip to content
Snippets Groups Projects
Commit f4146cfb authored by Sercan Yesildal's avatar Sercan Yesildal
Browse files

domain types developed

parent 3ef3764a
No related branches found
No related tags found
No related merge requests found
package main
import "gitlab.reutlingen-university.de/yesildas/myaktion-go/src/myaktion/model"
func main() {
campaign := model.Campaign{
Name: "Spenden für eine bessere Note",
OrganizerName: "Geheimnisvolle Ente",
TargetAmount: 5000,
DonationMinimum: 10,
AmountDonatedSoFar: 0,
Account: model.Account{
Name: "Dagobert Duck",
BankName: "Dagoberts Bank",
Number: "DE3414022023",
},
}
campaign.Donations = append(campaign.Donations, model.Donation{
Amount: 10,
DonorName: "Robin Wood",
ReceiptRequested: true,
Account: model.Account{
Name: "Robin Wood",
BankName: "Dagoberts Bank",
Number: "DE3414022000",
},
Status: model.IN_PROCESS,
})
}
package model
type Account struct {
Name string
BankName string
Number string
}
package model
type Campaign struct {
Name string
OrganizerName string
TargetAmount float64
DonationMinimum float64
AmountDonatedSoFar float64
Account Account
Donations []Donation
}
package model
const TRANSFERRED Status = "überwiesen"
const IN_PROCESS Status = "in Bearbeitung"
type Donation struct {
Amount float64
DonorName string
ReceiptRequested bool
Account Account
Status Status
}
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