Merged
Conversation
Closed
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.
This pull request introduces a new feature to provide an aggregated summary of quota usage and allocation for members, along with several supporting changes and some minor naming corrections. The main focus is on implementing the quota summary use case, exposing it via the API, and updating the data access and domain layers to support the required statistics.
Quota summary feature:
GetQuotasSummaryUseCaseabstract class and its implementationDefaultGetQuotasSummaryUseCase, which aggregates total members, total allocated quota, total used storage, and total available quota. (application/src/main/java/com/callv2/drive/application/member/quota/retrieve/summary/GetQuotasSummaryUseCase.java[1]DefaultGetQuotasSummaryUseCase.java[2]GetQuotasSummaryOutputto encapsulate the summary data. (GetQuotasSummaryOutput.javaapplication/src/main/java/com/callv2/drive/application/member/quota/retrieve/summary/GetQuotasSummaryOutput.javaR1-R9)/admin/members/quotas/summarytoMemberAdminAPIand implemented it inMemberAdminController, returning aQuotaSummaryResponse. (MemberAdminAPI.java[1] [2];QuotaSummaryResponse.java[3]MemberUseCaseConfig.javainfrastructure/src/main/java/com/callv2/drive/infrastructure/configuration/usecase/MemberUseCaseConfig.javaR64-R68)Domain and persistence support for quota statistics:
count()andsumAllQuota()methods toMemberGatewayand implemented them inDefaultMemberGatewayandMemberJpaRepository. (MemberGateway.java[1] [2];DefaultMemberGateway.java[3] [4]sumAllContentSize()toFileGatewayand implemented it inFileJPAGatewayandFileJpaRepository. (FileGateway.java[1]FileJPAGateway.java[2]FileJpaRepository.java[3]API and naming consistency improvements:
CreateRequestQuotaInput.java[1]DefaultCreateRequestQuotaUseCase.java[2]MemberAPI.java[3]MemberAdminAPI.java[4]MemberJpaEntityand related code to usequotaAmount,quotaInBytes, and similar consistent field names. (MemberJpaEntity.java[1] [2]DefaultMemberGateway.java[3]These changes collectively enable administrators to retrieve an overview of quota allocation and usage, and improve overall code clarity and maintainability.