Skip to content

Data Model: User #47

Description

@echelonCodes

In this issue, create the User data model. Refer to the #46 for the table data types and columns.

Guide to creating migrations and models in this app

User:

Column DataType
id primary key, int
auth0_id fkey, auth0_logs
phone_number varchar(100)
email varchar(100)
created_at timestamp
updated_at timestamp
last_login timestamp

Completing this issue will involve:

  • A database migration that creates each schema.

  • Defining the models and their relations appropriately.

  • Writing basic unit testing for the functionality of the model. Models will be pretty bare bones, testing that it will be created and have the correct data attributes should be sufficient for this issue.

Dependency:

#48

Acceptance Criteria:

When I query an existing entry of this model
Then the database should return that row
And there should be a well-defined model instance with the data

When I want to save an instance of this model
Then the model instance should validate required fields
And the database should successfully save the model

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions