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

feat(dto): refactor dto structure #123

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.communitymanager.controller;

import evrentan.community.communitymanager.dto.Community;
import evrentan.community.communitymanager.dto.entity.Community;
import evrentan.community.communitymanager.service.CommunityService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.communitymanager.dto;
package evrentan.community.communitymanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.communitymanager.exception;
package evrentan.community.communitymanager.dto.exception;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.communitymanager.dto;
package evrentan.community.communitymanager.dto.other;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package evrentan.community.communitymanager.entity;

import evrentan.community.communitymanager.dto.entity.Community;
import jakarta.persistence.*;
import lombok.*;

import java.util.UUID;

/**
* Community Entity Class represents the community table in the database.
* It is represented by {@link evrentan.community.communitymanager.dto.Community} in DTO level.
* It is represented by {@link Community} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package evrentan.community.communitymanager.exception;

import evrentan.community.communitymanager.dto.exception.CustomRestError;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.BadRequestException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.communitymanager.impl;

import evrentan.community.communitymanager.dto.Community;
import evrentan.community.communitymanager.dto.entity.Community;
import evrentan.community.communitymanager.entity.CommunityEntity;
import evrentan.community.communitymanager.mapper.CommunityMapper;
import evrentan.community.communitymanager.repository.CommunityRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.communitymanager.impl;

import evrentan.community.communitymanager.dto.MyConfigurationProperty;
import evrentan.community.communitymanager.dto.other.MyConfigurationProperty;
import evrentan.community.communitymanager.service.TestService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.communitymanager.mapper;

import evrentan.community.communitymanager.dto.Community;
import evrentan.community.communitymanager.dto.entity.Community;
import evrentan.community.communitymanager.entity.CommunityEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.communitymanager.service;

import evrentan.community.communitymanager.dto.Community;
import evrentan.community.communitymanager.dto.entity.Community;

import java.util.List;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.controller;

import evrentan.community.usermanager.dto.ApplicationUser;
import evrentan.community.usermanager.dto.entity.ApplicationUser;
import evrentan.community.usermanager.service.ApplicationUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.controller;

import evrentan.community.usermanager.dto.UserType;
import evrentan.community.usermanager.dto.entity.UserType;
import evrentan.community.usermanager.service.UserTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.usermanager.dto;
package evrentan.community.usermanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.usermanager.dto;
package evrentan.community.usermanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package evrentan.community.usermanager.entity;

import evrentan.community.usermanager.dto.entity.ApplicationUser;
import jakarta.persistence.*;
import lombok.*;

Expand All @@ -8,7 +9,7 @@

/**
* Application User Entity Class represents the application_user table in the database.
* It is represented by {@link evrentan.community.usermanager.dto.ApplicationUser} in DTO level.
* It is represented by {@link ApplicationUser} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package evrentan.community.usermanager.entity;

import evrentan.community.usermanager.dto.entity.UserType;
import jakarta.persistence.*;
import lombok.*;

Expand All @@ -8,7 +9,7 @@

/**
* User Type Entity Class represents the user_type table in the database.
* It is represented by {@link evrentan.community.usermanager.dto.UserType} in DTO level.
* It is represented by {@link UserType} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.impl;

import evrentan.community.usermanager.dto.ApplicationUser;
import evrentan.community.usermanager.dto.entity.ApplicationUser;
import evrentan.community.usermanager.entity.ApplicationUserEntity;
import evrentan.community.usermanager.mapper.ApplicationUserMapper;
import evrentan.community.usermanager.repository.ApplicationUserRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.impl;

import evrentan.community.usermanager.dto.UserType;
import evrentan.community.usermanager.dto.entity.UserType;
import evrentan.community.usermanager.entity.UserTypeEntity;
import evrentan.community.usermanager.mapper.UserTypeMapper;
import evrentan.community.usermanager.repository.UserTypeRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.mapper;

import evrentan.community.usermanager.dto.ApplicationUser;
import evrentan.community.usermanager.dto.entity.ApplicationUser;
import evrentan.community.usermanager.entity.ApplicationUserEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.mapper;

import evrentan.community.usermanager.dto.UserType;
import evrentan.community.usermanager.dto.entity.UserType;
import evrentan.community.usermanager.entity.UserTypeEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.service;

import evrentan.community.usermanager.dto.ApplicationUser;
import evrentan.community.usermanager.dto.entity.ApplicationUser;

import java.util.List;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.usermanager.service;

import evrentan.community.usermanager.dto.UserType;
import evrentan.community.usermanager.dto.entity.UserType;

import java.util.List;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.controller;

import evrentan.community.venuemanager.dto.Room;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Room;
import evrentan.community.venuemanager.dto.entity.VenueRoom;
import evrentan.community.venuemanager.service.RoomService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.controller;

import evrentan.community.venuemanager.dto.Venue;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Venue;
import evrentan.community.venuemanager.dto.entity.VenueRoom;
import evrentan.community.venuemanager.service.VenueService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.venuemanager.dto;
package evrentan.community.venuemanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.venuemanager.dto;
package evrentan.community.venuemanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package evrentan.community.venuemanager.dto;
package evrentan.community.venuemanager.dto.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package evrentan.community.venuemanager.entity;

import evrentan.community.venuemanager.dto.entity.Room;
import jakarta.persistence.*;
import lombok.*;

import java.util.UUID;

/**
* Room Entity Class represents the venue table in the database.
* It is represented by {@link evrentan.community.venuemanager.dto.Room} in DTO level.
* It is represented by {@link Room} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package evrentan.community.venuemanager.entity;

import evrentan.community.venuemanager.dto.entity.Venue;
import jakarta.persistence.*;
import lombok.*;

import java.util.UUID;

/**
* Venue Entity Class represents the venue table in the database.
* It is represented by {@link evrentan.community.venuemanager.dto.Venue} in DTO level.
* It is represented by {@link Venue} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package evrentan.community.venuemanager.entity;

import evrentan.community.venuemanager.dto.entity.VenueRoom;
import jakarta.persistence.*;
import lombok.*;

import java.util.UUID;

/**
* VenueRoom Entity Class represents the venue_room table in the database.
* It is represented by {@link evrentan.community.venuemanager.dto.VenueRoom} in DTO level.
* It is represented by {@link VenueRoom} in DTO level.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.impl;

import evrentan.community.venuemanager.dto.Room;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Room;
import evrentan.community.venuemanager.dto.entity.VenueRoom;
import evrentan.community.venuemanager.entity.RoomEntity;
import evrentan.community.venuemanager.mapper.RoomMapper;
import evrentan.community.venuemanager.mapper.VenueRoomMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.impl;

import evrentan.community.venuemanager.dto.Venue;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Venue;
import evrentan.community.venuemanager.dto.entity.VenueRoom;
import evrentan.community.venuemanager.entity.VenueEntity;
import evrentan.community.venuemanager.mapper.VenueMapper;
import evrentan.community.venuemanager.mapper.VenueRoomMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.venuemanager.mapper;

import evrentan.community.venuemanager.dto.Room;
import evrentan.community.venuemanager.dto.entity.Room;
import evrentan.community.venuemanager.entity.RoomEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.venuemanager.mapper;

import evrentan.community.venuemanager.dto.Venue;
import evrentan.community.venuemanager.dto.entity.Venue;
import evrentan.community.venuemanager.entity.VenueEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package evrentan.community.venuemanager.mapper;

import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.VenueRoom;
import evrentan.community.venuemanager.entity.VenueRoomEntity;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.service;

import evrentan.community.venuemanager.dto.Room;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Room;
import evrentan.community.venuemanager.dto.entity.VenueRoom;

import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -86,7 +86,7 @@ public interface RoomService {
*
* @param roomId room id to be assigned to the venue
* @param assignedVenueRoom venue that the room is assigned to
* @return UUID which is the id of the VenueRoom instance. Please, see the {@link evrentan.community.venuemanager.dto.VenueRoom} class for details.
* @return UUID which is the id of the VenueRoom instance. Please, see the {@link VenueRoom} class for details.
*
* @author <a href="https://github.com/evrentan">Evren Tan</a>
* @since 1.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package evrentan.community.venuemanager.service;

import evrentan.community.venuemanager.dto.Venue;
import evrentan.community.venuemanager.dto.VenueRoom;
import evrentan.community.venuemanager.dto.entity.Venue;
import evrentan.community.venuemanager.dto.entity.VenueRoom;

import java.util.List;
import java.util.UUID;
Expand Down
Loading