Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Database Information #112

Merged
merged 2 commits into from
Dec 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions src/docs/database/DatabaseInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Database Documentation

This documentation guide details out the database technology used for this MCT application.

## Technology

**MongoDB** is a non-relational database program which is document-oriented, scalable, flexible, and widely used in development.

Goals:

- Storage of commands sent to a satellite
- Storage of satellites used in the MCT application
- Storage of users

See [MongoDB's Documentation](https://www.mongodb.com/docs/) for more information.

## Schemas

### User Model

UserRole: ‘OPERATOR’ | ‘ADMIN’

| Field | Type |
| ---------- | ------------------------ |
| id | string |
| email | string |
| role | string |
| satellites | string[] of Satellite id |
| createdAt | Date |
| updatedAt | Date |

### Satellite Model

| Field | Type |
| ------------- | ------------------- |
| id | string |
| name | string |
| intlCode | string |
| operators | string[] of User id |
| validCommands | string[] |
| createdAt | Date |
| updatedAt | Date |

### User Model

ScheduleType: ‘LIVE’ | ‘FUTURE’

| Field | Type |
| ------------------ | ------------ |
| id | string |
| commands | string[] |
| executionTimestamp | Date |
| satellite | Satellite id |
| requestType | ScheduleType |
| status | boolean |
| user | User id |
| createdAt | Date |
| updatedAt | Date |

### Log Model

| Field | Type |
| --------- | ------------ |
| id | string |
| data | Object |
| satellite | Satellite id |
| schedule | Schedule id |
| createdAt | Date |
| updatedAt | Date |