Evently make use of two databases, one MongoDB and the other one Postgres SQL as project requirements. The next pages show each data model used in the project.
1 - Messages
Message
type Message struct {
// Unique identifier for the command
Id string
// Identifies the source of the command
Source string
// Identifies the target app
Target string
// The type of command
Type string
// Command generation time
GenerationTime time.Time
// The command data
Body map[string]any
}
2 - Mongo
Reminder
type Reminder struct {
EventId string
DateToSend time.Time
MessageToSend string
EmailsToNotify []string
}
3 - Postgres
Event
type Event struct {
Id string
Title string
Description string
Cost float32
Location string
Attendees []string
OrganizerName string
OrganizerEmail string
StartDate string
EndDate string
StartTime string
EndTime string
}
User
type User struct {
Email string
Name string
Password string
PurposeOfUse string
}