-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#230 | Implement Admin Registration Application Summary Endpoint (#267)
- Loading branch information
1 parent
160c390
commit 62fe3cc
Showing
11 changed files
with
267 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
25 changes: 25 additions & 0 deletions
25
...va/com/ays/admin_user/model/dto/response/AdminUserRegisterApplicationSummaryResponse.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.ays.admin_user.model.dto.response; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* A DTO (Data Transfer Object) representing an admin user register application summary | ||
*/ | ||
@Getter | ||
@Setter | ||
public class AdminUserRegisterApplicationSummaryResponse { | ||
|
||
private String id; | ||
private Institution institution; | ||
|
||
/** | ||
* A DTO (Data Transfer Object) representing an institution in an admin user register application | ||
*/ | ||
@Getter | ||
@Setter | ||
public static class Institution { | ||
private String id; | ||
private String name; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...pper/AdminUserRegisterApplicationToAdminUserRegisterApplicationSummaryResponseMapper.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.ays.admin_user.model.mapper; | ||
|
||
import com.ays.admin_user.model.AdminUserRegisterApplication; | ||
import com.ays.admin_user.model.dto.response.AdminUserRegisterApplicationSummaryResponse; | ||
import com.ays.common.model.mapper.BaseMapper; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
/** | ||
* AdminUserRegisterApplicationToAdminUserRegisterApplicationSummaryResponseMapper is an interface that defines the mapping between an {@link AdminUserRegisterApplication} and an {@link AdminUserRegisterApplicationSummaryResponse}. | ||
* This interface uses the MapStruct annotation @Mapper to generate an implementation of this interface at compile-time. | ||
* <p>The class provides a static method {@code initialize()} that returns an instance of the generated mapper implementation. | ||
* <p>The interface extends the MapStruct interface {@link BaseMapper}, which defines basic mapping methods. | ||
* The interface adds no additional mapping methods, but simply defines the types to be used in the mapping process. | ||
*/ | ||
@Mapper | ||
public interface AdminUserRegisterApplicationToAdminUserRegisterApplicationSummaryResponseMapper extends BaseMapper<AdminUserRegisterApplication, AdminUserRegisterApplicationSummaryResponse> { | ||
|
||
/** | ||
* Initializes the mapper. | ||
* | ||
* @return the initialized mapper object. | ||
*/ | ||
static AdminUserRegisterApplicationToAdminUserRegisterApplicationSummaryResponseMapper initialize() { | ||
return Mappers.getMapper(AdminUserRegisterApplicationToAdminUserRegisterApplicationSummaryResponseMapper.class); | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
32 changes: 32 additions & 0 deletions
32
...in_user/util/exception/AysAdminUserRegisterApplicationNotExistByIdAndStatusException.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.ays.admin_user.util.exception; | ||
|
||
import com.ays.admin_user.model.enums.AdminUserRegisterApplicationStatus; | ||
import com.ays.common.util.exception.AysNotExistException; | ||
|
||
import java.io.Serial; | ||
|
||
/** | ||
* Exception indicating that an admin user register application does not exist with the specified ID. | ||
* This exception is a subclass of AysNotExistException, which is typically used to indicate that an entity or | ||
* resource does not exist. | ||
* Typically, this exception is thrown when an operation or query is performed on an admin user register application | ||
* entity using an ID that does not correspond to an existing admin user register application. | ||
*/ | ||
public class AysAdminUserRegisterApplicationNotExistByIdAndStatusException extends AysNotExistException { | ||
|
||
/** | ||
* Unique identifier for serialization. | ||
*/ | ||
@Serial | ||
private static final long serialVersionUID = 8056706849244878245L; | ||
|
||
/** | ||
* Constructs a new AysAdminUserRegisterApplicationNotExistByIdAndStatusException with the specified applicationId and applicationStatus. | ||
* | ||
* @param applicationId the applicationId of admin user register application. | ||
* @param applicationStatus the applicationStatus of admin user register application. | ||
*/ | ||
public AysAdminUserRegisterApplicationNotExistByIdAndStatusException(String applicationId, AdminUserRegisterApplicationStatus applicationStatus) { | ||
super("ADMIN USER REGISTER APPLICATION NOT EXIST! id:" + applicationId + ", status:" + applicationStatus); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.