Social Meal - social application - Add searching method and change database structure

in utopian-io •  6 years ago  (edited)

New Features

In this contribution I focused in:

1

Change event domain model and database structure. Because of one user can participate in many events and events can have multiple participated users, what is more event must have one owner. I decided to change structure of database. I changed relationship between these tables to many to many and one to many, thanks this changes next part of development will be much easier and faster.

2

Added a new feature connected with searching events by users. User have possibility to search events. This contribution allow users to search events by:

  • food type
  • dates (from, to)
  • owner, price
  • name
  • members number

I also added a sample data for testing.

screenshot from swagger with new searching method:

image.png

details from searching by price:

image.png

Response from request: searching by price from Postman:

image.png

Implementation

Implementation is divided into several parts. This is quite big change and new feature so I had to add some new classes, services, controllers and more.

  • screen with commits in Github
    image.png

As you can see in commits implementation contains:

  • add new domain model for eventUser table, change fluentAPI, new migrations for EntityFrameworkCore, and new ErrorCodes
  • add new resources and mapping it with domain models for request response
  • adaptation based event methods for add new event and edit existing to new database schema
  • add sample data for testing new features and refactor mapping
  • add new methods for searching events - changes in controllers, services and repositories

Links:



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @piach I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x