Merged
Conversation
- new changesets
- Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc
Denis973
approved these changes
Apr 26, 2023
LordRenDS
approved these changes
Apr 29, 2023
# Conflicts: # src/main/java/com/provedcode/aws/service/S3Service.java
LordRenDS
added a commit
that referenced
this pull request
May 8, 2023
* Edit db structure * Working with sponsor * finished login and registration for sponsor * edit changeset * bugfix * S3.2US2&4 (#103) * US2 COMPLETED! - Created new PATCH edpoint (.../sponsors/id) * S3.2 us3 (#105) * us3 * add swagger kudos and sponsor * add ExceptionHandler * Updated liquibase: - new changesets * Removed exception handler for Exception.class * Code refactor: - Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc * Created PhotoService * Doc update * DB EDIT: SIZE UP * S3.2 refactor (#107) * Updated liquibase: - new changesets --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> Co-authored-by: Ren <sergeysolovyov2016@gmail.com> * AWS update: - PresignedURL - Scheduler for presigned url --------- Co-authored-by: Mykhailo Ordyntsev <102993813+Maslyna@users.noreply.github.com> Co-authored-by: Denis973 <46610112+Denis973@users.noreply.github.com> Co-authored-by: Maslyna <sanci324@gmail.com> Co-authored-by: Denis Boyko <denboy973@gmail.com>
Denis973
added a commit
that referenced
this pull request
May 16, 2023
* * Edit db structure * Working with sponsor * * finished login and registration for sponsor * edit changeset * bugfix * S3.2US2&4 (#103) * US2 COMPLETED! Created new PATCH edpoint (.../sponsors/id) * US2 COMPLETED 2nd TIME, YAY! * DELETE IS WORKING!!!!! *sounds of cry* * S3.2 us3 (#105) * us3 * us3 bug fix * bug fix * add swagger kudos and sponsor * add ExceptionHandler * Updated liquibase: - new changesets * BUGFIX: `GET(/api/v3/proofs/1/kudos)`` has problems after deleting a `sponsor` * Little update * Removed exception handler for Exception.class * Code refactor: - Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc * bug fix * aws update * Created PhotoService * minore update * refactored and optimized code * fix .findByLogin(authentication.getName()) - getTalentProofs * fix !userInfo.getTalent().getId().equals(talentId) * Doc update * New test endpoint for images * DB EDIT: SIZE UP * S3.2 refactor (#107) * Updated liquibase: - new changesets * BUGFIX: `GET(/api/v3/proofs/1/kudos)`` has problems after deleting a `sponsor` * Little update * Removed exception handler for Exception.class * Code refactor: - Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc * bug fix * aws update * Created PhotoService * minore update * refactored and optimized code * fix .findByLogin(authentication.getName()) - getTalentProofs * fix !userInfo.getTalent().getId().equals(talentId) * Doc update * New test endpoint for images * DB EDIT: SIZE UP --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> Co-authored-by: Ren <sergeysolovyov2016@gmail.com> * AWS update: PresignedURL * AWS update: Scheduler for presigned url * * Create table: - skill - talent skill * update table relationship * add index in user_info table on login * * edit data.sql * * add entity for Skills * edit existing entity: - remove TalentTalents and their references - add <Set> skills to TalentProof * S4.1T1-3 (#118) * AWS update * US1T3 FINISHED! --------- Co-authored-by: Maslyna <sanci324@gmail.com> * S4.1 tasks 4 5 (#119) * add getAllSkillsOnProof * add deleteSkillOnProof * S4.1S2T1 (#121) * Story 2 completed: filter by words * bugfix * bug fix in getTalentProofs --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> --------- Co-authored-by: Ren <sergeysolovyov2016@gmail.com> Co-authored-by: Denis973 <46610112+Denis973@users.noreply.github.com> Co-authored-by: Denis Boyko <denboy973@gmail.com> Co-authored-by: Ren <75202059+LordRenDS@users.noreply.github.com>
Denis973
added a commit
that referenced
this pull request
May 24, 2023
* * Edit db structure * Working with sponsor * * finished login and registration for sponsor * edit changeset * bugfix * S3.2US2&4 (#103) * US2 COMPLETED! Created new PATCH edpoint (.../sponsors/id) * US2 COMPLETED 2nd TIME, YAY! * DELETE IS WORKING!!!!! *sounds of cry* * S3.2 us3 (#105) * us3 * us3 bug fix * bug fix * add swagger kudos and sponsor * add ExceptionHandler * Updated liquibase: - new changesets * BUGFIX: `GET(/api/v3/proofs/1/kudos)`` has problems after deleting a `sponsor` * Little update * Removed exception handler for Exception.class * Code refactor: - Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc * bug fix * aws update * Created PhotoService * minore update * refactored and optimized code * fix .findByLogin(authentication.getName()) - getTalentProofs * fix !userInfo.getTalent().getId().equals(talentId) * Doc update * New test endpoint for images * DB EDIT: SIZE UP * S3.2 refactor (#107) * Updated liquibase: - new changesets * BUGFIX: `GET(/api/v3/proofs/1/kudos)`` has problems after deleting a `sponsor` * Little update * Removed exception handler for Exception.class * Code refactor: - Created and implemented new refactor idea use @annotations to documenting REST API with Open API --- Created: --- DeleteProofApiDoc DeleteSponsorApiDoc DeleteTalentApiDoc GetAllProofsApiDoc GetAllSponsorsApiDoc GetAllTalentsApiDoc GetAmountOfKudosApiDoc GetKudosForSponsorApiDoc GetSponsorApiDoc GetTalentApiDoc GetTalentInformationWithProofsApiDoc GetTalentProofByProofIdApiDoc PatchEditProofApiDoc PatchEditSponsorApiDoc PatchEditTalentApiDoc PostAddKudosToProofApiDoc PostSponsorRegistrationApiDoc PostTalentRegistrationApiDoc PostUserLoginApiDoc * bug fix * aws update * Created PhotoService * minore update * refactored and optimized code * fix .findByLogin(authentication.getName()) - getTalentProofs * fix !userInfo.getTalent().getId().equals(talentId) * Doc update * New test endpoint for images * DB EDIT: SIZE UP --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> Co-authored-by: Ren <sergeysolovyov2016@gmail.com> * AWS update: PresignedURL * AWS update: Scheduler for presigned url * * Create table: - skill - talent skill * update table relationship * add index in user_info table on login * * edit data.sql * * add entity for Skills * edit existing entity: - remove TalentTalents and their references - add <Set> skills to TalentProof * S4.1T1-3 (#118) * AWS update * US1T3 FINISHED! --------- Co-authored-by: Maslyna <sanci324@gmail.com> * S4.1 tasks 4 5 (#119) * add getAllSkillsOnProof * add deleteSkillOnProof * S4.1S2T1 (#121) * Story 2 completed: filter by words * bugfix * bug fix in getTalentProofs --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> * S4.2US1T1 (#129) * bugfix getProofKudos() in KudosService * Refactor schema and data to enable association of skills with proofs and talents separately Previously, tables were created to relate talent skills with talent proofs. This change separates the association of skills with talent proofs and talent. The `talent_skill` table now only links a talent with a skill, while a new `proof_skill` table relates a proof with a skill. This change also includes modifications to the `schema-V4.sql` file: adding the new `proof_skill` table, setting primary keys, and creating foreign key constraints. * Refactor entity classes and add many-to-many relationships for talents and skills The entity classes 'Skills', 'Talent' and 'TalentProof' have been refactored to add many-to-many relationships between 'Talent' and 'Skills'. The existing 'talent_skills' table has been removed and a new table 'proof_skill' has been added to handle the many-to-many relation. * Rename TalentSkillsService to ProofSkillsService and remove TalentSkills entity - Rename TalentSkillsService to ProofSkillsService for clarity - Remove TalentSkills entity which is no longer used * S4.2US1T2-3 (#131) * bug fix SkillsOnProofDTO * refactor SkillsOnProofDTO * add addSkillOnProof * bug fix addSkillOnProof * bug fix Talent * refactor FullTalentDTO and ShortTalentDTO * add controller deleteSkillFromTalent * add service deleteSkillFromTalent * bug fix * addSkillOnTalent refactor * add @notempty to SkillIdDTO * S4.2-FULL (#135) * Filter by talent skills * Code refactor: constraintViolationException * Code refactor: delete proof by id now deletes skills on talent, that can`t be approved * Code refactor: JWT token update * feat: Add tables for talent and sponsorship data This commit adds tables for talent skills and proofs. Sponsorship tables are also added, including sponsorship kudos. Foreign keys and indexes are defined. Signed-off-by: Ren <sergeysolovyov2016@gmail.com> * Add ProofSkill entity and refactor TalentProof entity to use it. The changes in this commit add a new "ProofSkill" entity and update the "TalentProof" entity to use it for the skills previously stored in a direct many-to-many relationship. This represents a more structured approach to modeling the relationship and better decouples the entities involved. Signed-off-by: Ren <sergeysolovyov2016@gmail.com> * Refactor Kudos entity to use ProofSkill instead of TalentProof in the skill field The Kudos entity is refactored to use the ProofSkill entity in the skill field instead of the TalentProof entity. ProofSkill entity is updated to add a OneToMany relationship to Kudos entity. The TalentProof entity is updated to remove the OneToMany relationship to Kudos entity. Signed-off-by: Ren <sergeysolovyov2016@gmail.com> * fix bug * add data-V5.sql * bug fix * refactor TalentService.java addSkillOnTalent * refactor TalentService.java addSkillOnTalent * refactor TalentProofController: deleteProofById * Code refactor: - TalentSkillsController: - addSkillOnProof now works - getAllSkillsOnProof now works * Code refactor: - TalentSkillsController: - deleteSkillOnProof now works * refactor * Refactor database schema for sprint 5 This commit changes the database schema for sprint 5, creating new tables and moving columns from one table to another. New tables include talents, sponsors, attached_files, contacts, descriptions, links, proofs, skills, talents_skills, proofs_skills, users_info, authorities, and users_authorities. ForeignKey constraints show table relationships. New data inserts and deletions also reflect the changes made to the schema. * Code refactor: old method from KudosController now works * Refactor SQL queries to use new table names and columns To improve the organization of the database, SQL queries were refactored to use new table names and columns. The corresponding code was modified to insert data into the updated tables. The commit message describes the changes made to the SQL statements and the affected tables without going into specifics. * Refactor database column constraints and entity attributes Changed constraints in Kudos and Sponsor entity tables, along with attributes and relationships. Also updated SkillMapper to reflect SkillDTO changes. * Refactor code by changing table names and some class names to follow naming convention. * Restructure table names for talents' skill sets, attached files, contact information Changed table names for talents' skill sets, attached files, and contact information for clarity and consistency. * Refactor entity names and table names for consistency This commit refactors entity and table names for coherence between TalentLink, TalentProof, and TalentDescription entities. * refactor: Rename Skills entity to Skill and update references in services and repositories The Skills entity has been renamed to Skill. All references to Skills have been updated in ProofSkillsService, TalentProofService, and SkillsRepository. This refactor allows for more intuitive and consistent code. * Refactor TalentService, Authority, and UserInfo entities - Use Skill instead of Skills to represent a unique skill - Use "authorities" instead of "authority" table name for UserInfo entity - Use "users_info" and "users_authorities" instead of "user_info" and "user_authorities" respectively for UserInfo entity This commit refactors TalentService, Authority, and UserInfo models to use Skill instead of Skills and updates table names for UserInfo entity to use plural form for consistency and clarity. * Update project version to 0.5.0-SNAPSHOT in pom.xml file * Refactor data retrieval and management in KudosService This commit has removed unused imports and introduced cleaner code for retrieving kudos from a sponsor. Skill's kudos retrieval was optimized by replacing a fetching architecture using flatMap() for the stream with collecting stream results into a hash table. Finally, the `KudosService` class has been refactored to accommodate these changes. In SkillsRepository, a minor fix has been made to ensure that the 'Skill' table is queried correctly. In 'dataSkill-V5.sql', the IDs in the insert statements have been removed, and the queries have been changed accordingly to make the statements more readable. Annotations have been added for easier reading. * S5 us3 (#146) * preparation for US3 * getAllKudosOnTalent * not yet getSkillWithLargestNumberOfKudos * finish getProofWithLargestNumberOfKudos * finish getSkillWithLargestNumberOfKudos * refactor addKudosToProof: you can give kudos even if you gave not a multiple of the amount * S5US1T3-4 (#147) * feat: Add endpoints for adding and getting kudos to skills This commit adds two new endpoints for adding kudos to a skill and getting the amount of kudos for a skill under a given proof. These endpoints require sponsor authentication and take a valid SetAmountKudos object. * Add access permission to PROOF API endpoint and modify H2 URL - Permit access to PROOF API endpoint by updating SecurityConfig.java. - Change H2 URL format in application-dev.properties. * Add KudosRepository and KudosService changes - Added a new interface method to KudosRepository that returns Kudos list by ProofSkill - Added getKudosForSponsor and getProofKudos methods to KudosService that returns kudos amount for sponsor and kudos amount with sponsor respectively * add @transactional(readOnly = true) to getSkillKudos * change the logic: * skill-id is an id from the skills table, not proofs_skills * Refactor wrong datasource configuration properties for H2 database * Update skill column size to 50 chars in talents_skills table The skill column in the talents_skills table has been increased from 30 chars to 50 chars to accommodate longer skill names. This update ensures compatibility with future use cases that may require longer skill names. * S5-email (#149) * refactor userInfo: add uuid and isLocked, add DeletedUser * add deleted-user-schema.sql and refactor user-info-schema-V5.sql * refactor register in AuthenticationServiceImpl * refactor application.properties * add EmailDefaultProps * add GlobalControllerAdvice * add EmailConfig * add EmailService and dependency * add ServerInfoConfig * refactor deleteTalentById, add email * refactor deleteSponsor, add email account recovery * add DeleteUsersScheduler * update properties * AWS minore update * update * sponsor service update * Requested update: sponsor can see amount of kudos on user account User restore account now available! * MERGE UPDATE * MERGE UPDATE --------- Co-authored-by: Denis Boyko <denboy973@gmail.com> * MERGE UPDATE --------- Signed-off-by: Ren <sergeysolovyov2016@gmail.com> Co-authored-by: Ren <sergeysolovyov2016@gmail.com> Co-authored-by: Denis973 <46610112+Denis973@users.noreply.github.com> Co-authored-by: Denis Boyko <denboy973@gmail.com> Co-authored-by: Ren <75202059+LordRenDS@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated code structure, added new documentating lifehack