Skip to content

Create Table: User #15

@ExperimentsInHonesty

Description

@ExperimentsInHonesty

Overview

We need to create the User table so that we can automate user permissions and accounts creation

Details

A table and a model are the same thing

Action Items

  • identify if table has a description (see spreadsheet under Resources)
    • if not, reach out to PD leads
  • identify and document (below) what other tables are associated (see ERD under Resources)
  • create a single model in Django (defining schema)
  • Write a test for the relationships this model will have with other models (e.g., creating a user and assigning them a set of permissions on a project). - no relationships yet since this is the only model
  • Write an API end point
  • write API unit tests
  • Document the endpoint in Swagger

Resources/Instructions

Items to document (referenced above)

Description

  • List of users

Data Fields

  1. Copied from spreadsheet and checked off according to ERD. Data fields are bolded and relation fields are not.

    • id
    • name_first
    • name_last
    • gmail
    • preferred_email
    • created
    • user_status_id (FK)
    • practice_area_current
    • job_title_current
    • practice_area_target
    • job_title_target
    • desired_roles
    • availability - this has been converted into a related table user_availability
    • current_skills
    • target_skills
    • linkedin_account
    • referred_by (FK)
    • github_handle
    • phone
    • texting_ok
    • slack_id
    • time_zone
    • conduct - 8/10 meeting: Nicole informed that this was converted to the more generic user_check record
    • updated
    • password - this is not used with Cognito authentication
  2. In ERD only - none

  3. Combined table

name Data Rela. in ERD in sheet notes
id x x x PK
name_first x x x
name_last x x x
gmail x x x
preferred_email x x x
created x x x
job_title_current x x x
availability x x this has been converted into a related table user_availability
current_skills x x x
target_skills x x x
linkedin_account x x x
github_handle x x x
phone x x x
texting_ok x x x
slack_id x x x
time_zone x x x
conduct x x 8/10 meeting: Nicole informed that this was converted to the more generic user_check record
updated x x x
password x x x this is not used with Cognito authentication
user_status_id x x x FK
practice_area_current x x x
practice_area_target x x x
desired_roles x x x
referred_by x x x FK

Associated Tables

  1. Copied from spreadsheet and checked off according to ERD

    • cancelled_event (one-to-many)
    • check_in (one-to-many)
    • permission (one-to-many)
    • permission_history (one-to-many)
    • user_availability (one-to-many)
    • user_check (one-to-many)
    • user_employment_change (one-to-many)
    • win (one-to-many)
    • user_status_type (many-to-one)
    • project (array of IDs) - this has been converted to a sort of junction table called permission in the ERD
  2. In ERD only

    • practice_area (many-to-many)
    • referrer (many-to-one)

Swagger Endpoint Link

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅Done

Relationships

None yet

Development

No branches or pull requests

Issue actions