-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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) |
| 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:
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