Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cc 02 user models #5

Merged
merged 3 commits into from
Sep 26, 2023
Merged

Cc 02 user models #5

merged 3 commits into from
Sep 26, 2023

Conversation

ddusichka
Copy link
Contributor

Description

We created models for User, Customer, and Admin. We tested that these new models can be created, updated, and deleted from the database.

Note that the Customer model has commented out fields. We will uncomment these and update the tests in CC-03 once CC-01 is merged.

How Has This Been Tested?

We wrote unit tests in db_test.go checking the creation, updating, and deletion of our new models.

Checklist:

  • [ Yes ] I have performed a self-review of my code
  • [ Yes ] I have reached out to another developer to review my code
  • [ Yes ] I have commented my code, particularly in hard-to-understand areas
  • [ Yes ] New and existing unit tests pass locally with my changes

@ddusichka ddusichka linked an issue Sep 24, 2023 that may be closed by this pull request
@matherg
Copy link
Contributor

matherg commented Sep 25, 2023

Looks good. Only thing is that we only need binding: required on the Input types. This is because the input types are what is going to be sent to our api. Basically, when we want to add or update something, we will send an API request with the input type in json format. Binding : required means the json must include that field. Since the input type is the only type that will be sent, it is the only type that needs the "binding : required". After you guys remove that, I'll merge it in.

@joey-tsai
Copy link
Contributor

Removed bindings for all non-Input types.

@matherg matherg merged commit 52216ae into main Sep 26, 2023
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CC-02: User Models
4 participants