hack4impact-uiuc / 7000-languages

Helping Indigenous communities around the world teach, learn and sustain their languages
GNU General Public License v3.0
12 stars 2 forks source link

Create Language Schemas #6

Closed ashayp22 closed 2 years ago

ashayp22 commented 2 years ago

Is your feature request related to a problem? Please describe.

Before we write any endpoints dealing with creating languages or collecting language data, we need to define schemas for any data related to languages. Schemas are JSON objects that defines the the structure and contents of your data.

Describe the solution you'd like

We will need to define a couple of schemas:

Schema 1: Course

Description: The data for a course for a specific endangered language. This will have a one-to-many relationship with the User model. Fields:

Schema 1.5: Course Details

Fields:

Schema 2: Unit

Fields:

Schema 3: Lesson

Fields:

Schema 4: Vocab

Description: A word/phrase in an endangered language. Fields:

We can define these schemas in api/src/models in a file called language.js. In the end, it should look similar to the code in home.js. This past H4I project also has good examples on how to code this.

ashayp22 commented 2 years ago

@nroy20 @jessicasingh7 I've updated this issue with three more fields underneath the Course Schema: privacy_level, hashed_password, and salt. Please add those as well :)