This document describes the schema of our MongoDB database. These collections will support the main functionalities of our food donation platform, including user management, donation management, request management, communication management, data analytics, and system settings.
Stores personal information and history of users.
Fields:
_id
: Unique identifier for the userusername
: Username of the userpassword
: Password of the useremail
: Email of the userrole
: Role of the user, possible values include "donor", "recipient", and "administrator"profile
: Contains additional information such as contact details, preferenceshistory
: List of past donations or requests made by the user
Stores information about donations.
Fields:
_id
: Unique identifier for the donationdonorId
: ID of the donoritemDescription
: Description of the donated itemquantity
: Quantity of the donated itemexpiryDate
: Expiry date of the donated itempickupAvailability
: Availability for pickup of the donated itemlocation
: Location of the donationstatus
: Status of the donation, possible values include "pending", "approved", and "rejected"
Stores information about donation requests.
Fields:
_id
: Unique identifier for the requestrecipientId
: ID of the recipientdonationId
: ID of the donationrequestMessage
: Message of the requeststatus
: Status of the request, possible values include "pending", "approved", and "rejected"
Stores communication messages between users or administrators.
Fields:
_id
: Unique identifier for the messagesenderId
: ID of the senderrecipientId
: ID of the recipientmessage
: Content of the messagetimestamp
: Time of sending the message
Stores analytics and reporting data.
Fields:
_id
: Unique identifier for the datadate
: Date of the datadonationCount
: Number of donationsuserCount
: Number of usersparticipationRate
: Rate of participation
Stores system settings and configurations.
Fields:
_id
: Unique identifier for the settingsettingName
: Name of the settingsettingValue
: Value of the setting