Skip to content

Latest commit

 

History

History
97 lines (82 loc) · 3.47 KB

File metadata and controls

97 lines (82 loc) · 3.47 KB

Contents

Table Contains
account account (parent) info
prompt student writing prompts
story student-uploaded stories
student student (child) info
reading core Story Squad readings

Table Requirements

Account

Name Type Required Unique Notes
account_id uuid yes yes account id (auto-generated)
email string yes yes email linked to account
username string yes yes account username for display
student_ids text array no no array of student ids linked to account
hashed_pin string yes no hash of pin for main account user
settings json yes no account settings and info
stripe JSON object no no stripe info
paid_until datetime no no updates when back end receives payment notice from Stripe

Prompt

Name Type Required Unique Notes
prompt_id uuid yes yes prompt id
reading_id uuid yes no foreign key for reading
prompt_info json no no info re: prompt, including text

Reading

Name Type Required Unique Notes
reading_id int yes yes id for reading file (auto-increments)
s3_url string no no URL for reading file (during development)
s3_key string no no S3 key for reading file access
about json no no data, description, and statistics (added as needed)
prompts json no no prompts related to this reading

Story

Name Type Required Unique Notes
story_id uuid yes yes story id
student_id uuid yes no foreign key for student
prompt_id uuid yes no foreign key for prompt id
s3_url string no no URL for story file (during development)
s3_key string no no S3 key for story file access
about json no no includes metrics from DS

Student

Name Type Required Unique Notes
student_id uuid yes yes student id
account_id uuid yes no foreign key for account
username string yes yes student username
hashed_pin string yes no hash of pin for student user
settings json no no student profile/settings
records json no no student records/history

JSON object contents

account.settings

{ "format": "determined by front end" }

prompt.prompt_info

{ "format": "determined by front end" }

story.about

{ "format": "determined by front end" }

student.settings

{ "format": "determined by front end" }

student.records

{ "format": "determined by front end" }

reading.about

{ "format": "determined by front end" }

reading.prompts

{ "format": "determined by front end" }