Charity APIs and Schemas
Charity APIs
APIs and Microservices
Database Schemas
Diagram examples
Charities Table
Column | Type | Description |
---|---|---|
charity_id | integer | Primary key for the charity |
charity_name | string | Name of the charity |
description | string | Description of the charity |
category | string | Category of the charity (e.g. education, health, environment) |
location | string | Location of the charity |
website | string | Website of the charity |
created_at | datetime | Timestamp of when the charity was added to the database |
updated_at | datetime | Timestamp of when the charity was last updated |
Donations Table
Column | Type | Description |
---|---|---|
donation_id | integer | Primary key for the donation |
charity_id | integer | Foreign key to the charities table for the charity that received the donation |
donor_id | integer | Foreign key to the donors table for the donor who made the donation |
amount | decimal | Amount of the donation |
created_at | datetime | Timestamp of when the donation was added to the database |
updated_at | datetime | Timestamp of when the donation was last updated |
Reviews Table
Column | Type | Description |
---|---|---|
review_id | integer | Primary key for the review |
charity_id | integer | Foreign key to the charities table for the charity that was reviewed |
reviewer_id | integer | Foreign key to the reviewers table for the reviewer who wrote the review |
rating | integer | Rating given to the charity (e.g. 1-5 stars) |
comment | string | Optional comment left by the reviewer |
created_at | datetime | Timestamp of when the review was added to the database |
updated_at | datetime | Timestamp of when the review was last updated |
Reviewers Table
Column | Type | Description |
---|---|---|
reviewer_id | integer | Primary key for the reviewer |
name | string | Name of the reviewer |
string | Email address of the reviewer | |
password | string | Hashed password of the reviewer |
created_at | datetime | Timestamp of when the reviewer account was created |
updated_at | datetime | Timestamp of when the reviewer account was last updated |