Skip to content

feat: Add all freelancer profile CRUD operations#54

Merged
Ahmad45123 merged 16 commits intousers-command-implementationfrom
mahmoud/users-profile
May 5, 2024
Merged

feat: Add all freelancer profile CRUD operations#54
Ahmad45123 merged 16 commits intousers-command-implementationfrom
mahmoud/users-profile

Conversation

@MahmoudHosamGaber
Copy link
Collaborator

Add CRUD operations of the following classes:

  1. Education
  2. Experience
  3. Achievement
  4. Skill
  5. Language

MahmoudHosamGaber and others added 7 commits April 29, 2024 23:32
* Added `GetWallet` request and response

* Added `CreatePaymentRequest` request/response

* Added inheritance from the Command Request and Response class to the

* Added  request/response

* Added `createWallet` and `getWallet` unit testing

---------

Co-authored-by: AhmedNasserG <ahmednasser217217@gmail.com>
Co-authored-by: Abdulaziz-Hassan <abdulazizhza@gmail.com>
Update the user profile CRUD for better information hiding and move the requests and responses into the shared folder
Copy link
Collaborator

@Pandemic1617 Pandemic1617 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the MongoDB repositories are duplicated in the db folder.
Imports that use the repositories in the db package should be updated to use the repositories in the repositories package

Comment on lines +1 to +5
package com.workup.users.db;

import org.springframework.data.mongodb.repository.MongoRepository;

public interface AchievementRepository extends MongoRepository<Achievement, String> {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate file. already exists in repositories

Comment on lines +1 to +5
package com.workup.users.db;

import org.springframework.data.mongodb.repository.MongoRepository;

public interface EducationRepository extends MongoRepository<Education, String> {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate file. already exists in repositories

Comment on lines +1 to +5
package com.workup.users.db;

import org.springframework.data.mongodb.repository.MongoRepository;

public interface ExperienceRepository extends MongoRepository<Experience, String> {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate file. already exists in repositories

Comment on lines +1 to +5
package com.workup.users.db;

import org.springframework.data.mongodb.repository.MongoRepository;

public interface FreelancerRepository extends MongoRepository<Freelancer, String> {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate file. already exists in repositories

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Pandemic1617 Pandemic1617 self-requested a review May 5, 2024 09:44
@Ahmad45123 Ahmad45123 merged commit d8f600b into users-command-implementation May 5, 2024
@Ahmad45123 Ahmad45123 deleted the mahmoud/users-profile branch May 5, 2024 17:52
Ahmad45123 added a commit that referenced this pull request May 10, 2024
* Created Users module, and added FreelancerRegister request and response

* Updated added builder annotation to FreelancerRegisterResponse and removed redundant @nonnull

* Removed the NonNull annotation to make the class compatible with the Builder annotation

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Added the DB Schema discussed in the meeting with all of its required dependencies

URL: https://docs.spring.io/spring-data/mongodb/reference/mongodb/mapping/document-references.html
Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Deleted commented file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Added Client Schema (I forgot about it last time :|)

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Added Empty Lines to remove GitHub Warnings

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* added some commands

* organized imports

* added Client Get Profile

* added photo requests

* added resume command

* added user command map

* small fix

removed default value for success

* feat: Add freelancer skills CRUD

* feat: Add Freelancer language CRUD

* feat: Add freelancer education CRUD

* feat: Add freelancer experiences CRUD

* feat: Add freelancer achievement CRUD

* fix: Add db repositories

* fix: Add repositories to the user command and add document collections

* lint: Use linting

* refactored requests and responses into shared folder

* fix: Change withSuccess to withStatusCode

* added tests template

* refactored code to use http satus code

* added rabbitmq listeners

* added env vars and small fixes

* reformat

* reformat

* builds successfully

* tests working using test containers

* fix: Update user profile CRUD

Update the user profile CRUD for better information hiding and move the requests and responses into the shared folder

* fix: Remove duplicate files

* feat: Add user profile commands to the command map

* feat: Add all freelancer profile CRUD operations (#54)

* feat: Add freelancer skills CRUD

* feat: Add Freelancer language CRUD

* feat: Add freelancer education CRUD

* feat: Add freelancer experiences CRUD

* feat: Add freelancer achievement CRUD

* fix: Add db repositories

* fix: Add repositories to the user command and add document collections

* lint: Use linting

* fix: Change withSuccess to withStatusCode

* Payments `GetWallet` and `CreateWallet` unit testing  (#58)

* Added `GetWallet` request and response

* Added `CreatePaymentRequest` request/response

* Added inheritance from the Command Request and Response class to the

* Added  request/response

* Added `createWallet` and `getWallet` unit testing

---------

Co-authored-by: AhmedNasserG <ahmednasser217217@gmail.com>
Co-authored-by: Abdulaziz-Hassan <abdulazizhza@gmail.com>

* fix: Update user profile CRUD

Update the user profile CRUD for better information hiding and move the requests and responses into the shared folder

* fix: Remove duplicate files

---------

Co-authored-by: Abdullah Ahmad Fouad <57245606+Abdullah204@users.noreply.github.com>
Co-authored-by: AhmedNasserG <ahmednasser217217@gmail.com>
Co-authored-by: Abdulaziz-Hassan <abdulazizhza@gmail.com>

* feat: Add function handlers to RabbitMQ

* feat: Create UsersTestUtils to contain redundant testing logic

* feat: Add test for adding functionality

Added tests for the Adding operations and changed the implementation to use the userId in the CommandRequest class

* feat: Create views for education, experience and achievements

feat: Create views for education, experience and achievements and update the commands to use userId in the CommandRequest class

* fix: Update tests and commands to use userId in the CommandRequest class

* added client set photo commands

* added missing rabbitmq listeners

* added tests for freelancer and client endpoints

* test: Add testing for the update requests

* fix: Change the update commands to use userId instead of freelancer_id

* test: Add tests for delete operations

Add tests for delete operations and change the commands to use userId instead of freelancer_id

* added formatting make command

* small refactor that isolated test utils

* changed naming standard for request endpoints to camelCase

* Users Authentication Requests/Responses (#53)

* Created Users module, and added FreelancerRegister request and response

* Updated added builder annotation to FreelancerRegisterResponse and removed redundant @nonnull

* Removed the NonNull annotation to make the class compatible with the Builder annotation

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Deleted commented file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Revert "Deleted commented file"

This reverts commit f9b11cf.

* Added all required Authentication (register/login) requests and responses

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Deleted useless file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Created Users module, and added FreelancerRegister request and response

* Updated added builder annotation to FreelancerRegisterResponse and removed redundant @nonnull

* Removed the NonNull annotation to make the class compatible with the Builder annotation

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Deleted commented file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Revert "Deleted commented file"

This reverts commit f9b11cf.

* Added all required Authentication (register/login) requests and responses

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Deleted useless file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Created Users module, and added FreelancerRegister request and response

* Updated added builder annotation to FreelancerRegisterResponse and removed redundant @nonnull

* Removed the NonNull annotation to make the class compatible with the Builder annotation

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Deleted commented file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Revert "Deleted commented file"

This reverts commit f9b11cf.

* Added all required Authentication (register/login) requests and responses

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Deleted useless file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Updated the annotations to match the ones requested by @Ahmad45123

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Linting

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Linting

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Handled Inheritance bug

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Removed the success boolean as suggested by @Ahmad45123

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Addressed Noureldin's comments

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Created Users module, and added FreelancerRegister request and response

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Created Users module, and added FreelancerRegister request and response

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Added all required Authentication (register/login) requests and responses

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Created Users module, and added FreelancerRegister request and response

* Addressed @Ahmad45123's comments and created a test to verify the serialization process.

* Added all required Authentication (register/login) requests and responses

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Updated the annotations to match the ones requested by @Ahmad45123

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Linting

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Handled Inheritance bug

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Removed the success boolean as suggested by @Ahmad45123

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Addressed Noureldin's comments

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

---------

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Linting

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Deleted empty file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Restored accidentally deleted file

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>

* Users auth commands (#83)

---------

Signed-off-by: Akram-Fahim <akramadel2001@gmail.com>
Co-authored-by: Akram-Fahim <akramadel2001@gmail.com>
Co-authored-by: Mahmoud Gaber <mahmoudhosam44@gmail.com>
Co-authored-by: Mahmoud Gaber <89939442+MahmoudHosamGaber@users.noreply.github.com>
Co-authored-by: Abdullah Ahmad Fouad <57245606+Abdullah204@users.noreply.github.com>
Co-authored-by: AhmedNasserG <ahmednasser217217@gmail.com>
Co-authored-by: Abdulaziz-Hassan <abdulazizhza@gmail.com>
Co-authored-by: Ahmed Elwasefi <a.m.elwasefi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants