refactor-architecture #27

Merged
rov merged 11 commits from refactor-architecture into main 2026-03-18 16:55:37 -03:00
142 changed files with 411 additions and 400 deletions
Showing only changes of commit 9f1437f056 - Show all commits

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi; package com.magamochi;
import org.springframework.amqp.rabbit.annotation.EnableRabbit; import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client; package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry; import io.github.resilience4j.retry.annotation.Retry;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client; package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry; import io.github.resilience4j.retry.annotation.Retry;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client; package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry; import io.github.resilience4j.retry.annotation.Retry;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.client; package com.magamochi.client;
import com.magamochi.mangamochi.model.dto.MangaDexMangaDTO; import com.magamochi.model.dto.MangaDexMangaDTO;
import io.github.resilience4j.retry.annotation.Retry; import io.github.resilience4j.retry.annotation.Retry;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client; package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry; import io.github.resilience4j.retry.annotation.Retry;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.common.dto; package com.magamochi.common.dto;
import jakarta.annotation.Nullable; import jakarta.annotation.Nullable;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.common.dto; package com.magamochi.common.dto;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.common.exception; package com.magamochi.common.exception;
public class ConflictException extends RuntimeException { public class ConflictException extends RuntimeException {
public ConflictException(String message) { public ConflictException(String message) {

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.common.exception; package com.magamochi.common.exception;
import com.magamochi.mangamochi.common.dto.ErrorResponseDTO; import com.magamochi.common.dto.ErrorResponseDTO;
import java.time.Instant; import java.time.Instant;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.common.exception; package com.magamochi.common.exception;
public class NotFoundException extends RuntimeException { public class NotFoundException extends RuntimeException {
public NotFoundException(String message) { public NotFoundException(String message) {

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.common.exception; package com.magamochi.common.exception;
public class UnprocessableException extends RuntimeException { public class UnprocessableException extends RuntimeException {
public UnprocessableException(String message) { public UnprocessableException(String message) {

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config; package com.magamochi.config;
import org.springframework.amqp.core.Queue; import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config; package com.magamochi.config;
import com.google.common.util.concurrent.RateLimiter; import com.google.common.util.concurrent.RateLimiter;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config; package com.magamochi.config;
import java.net.URI; import java.net.URI;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.config; package com.magamochi.config;
import com.magamochi.mangamochi.security.JwtRequestFilter; import com.magamochi.security.JwtRequestFilter;
import com.magamochi.mangamochi.service.CustomUserDetailsService; import com.magamochi.service.CustomUserDetailsService;
import com.magamochi.mangamochi.util.JwtUtil; import com.magamochi.util.JwtUtil;
import java.util.List; import java.util.List;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config; package com.magamochi.config;
import lombok.NonNull; import lombok.NonNull;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -1,8 +1,11 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.*; import com.magamochi.model.dto.AuthenticationRequestDTO;
import com.magamochi.mangamochi.service.UserService; import com.magamochi.model.dto.AuthenticationResponseDTO;
import com.magamochi.model.dto.RefreshTokenRequestDTO;
import com.magamochi.model.dto.RegistrationRequestDTO;
import com.magamochi.service.UserService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.GenreDTO; import com.magamochi.model.dto.GenreDTO;
import com.magamochi.mangamochi.service.GenreService; import com.magamochi.service.GenreService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import java.util.List; import java.util.List;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;

View File

@ -1,13 +1,13 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.client.NtfyClient; import com.magamochi.client.NtfyClient;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand; import com.magamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.mangamochi.model.repository.UserRepository; import com.magamochi.model.repository.UserRepository;
import com.magamochi.mangamochi.queue.UpdateMangaDataProducer; import com.magamochi.queue.UpdateMangaDataProducer;
import com.magamochi.mangamochi.task.ImageCleanupTask; import com.magamochi.task.ImageCleanupTask;
import com.magamochi.mangamochi.task.MangaFollowUpdateTask; import com.magamochi.task.MangaFollowUpdateTask;
import com.magamochi.mangamochi.task.UpdateMangaListTask; import com.magamochi.task.UpdateMangaListTask;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -1,9 +1,9 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.*; import com.magamochi.model.dto.MangaChapterImagesDTO;
import com.magamochi.mangamochi.model.enumeration.ArchiveFileType; import com.magamochi.model.enumeration.ArchiveFileType;
import com.magamochi.mangamochi.service.MangaChapterService; import com.magamochi.service.MangaChapterService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,8 +1,11 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.*; import com.magamochi.model.dto.MangaChapterDTO;
import com.magamochi.mangamochi.service.MangaService; import com.magamochi.model.dto.MangaDTO;
import com.magamochi.model.dto.MangaListDTO;
import com.magamochi.model.dto.MangaListFilterDTO;
import com.magamochi.service.MangaService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import java.util.List; import java.util.List;

View File

@ -1,9 +1,10 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.*; import com.magamochi.model.dto.ImportMangaResponseDTO;
import com.magamochi.mangamochi.service.MangaImportService; import com.magamochi.model.dto.ImportRequestDTO;
import com.magamochi.mangamochi.service.ProviderManualMangaImportService; import com.magamochi.service.MangaImportService;
import com.magamochi.service.ProviderManualMangaImportService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.ImportReviewDTO; import com.magamochi.model.dto.ImportReviewDTO;
import com.magamochi.mangamochi.service.MangaImportReviewService; import com.magamochi.service.MangaImportReviewService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import java.util.List; import java.util.List;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.*; import com.magamochi.model.dto.ProviderListDTO;
import com.magamochi.mangamochi.service.ProviderService; import com.magamochi.service.ProviderService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.controller; package com.magamochi.controller;
import com.magamochi.mangamochi.common.dto.DefaultResponseDTO; import com.magamochi.common.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.service.UserFavoriteMangaService; import com.magamochi.service.UserFavoriteMangaService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -1,6 +0,0 @@
package com.magamochi.mangamochi.model.enumeration;
public enum ArchiveFileType {
CBZ,
CBR
}

View File

@ -1,5 +0,0 @@
package com.magamochi.mangamochi.model.enumeration;
public enum UserRole {
USER
}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.enumeration.UserRole; import com.magamochi.model.enumeration.UserRole;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
public record AuthenticationResponseDTO( public record AuthenticationResponseDTO(

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.enumeration.MangaStatus; import com.magamochi.model.enumeration.MangaStatus;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
public record ContentProviderMangaInfoResponseDTO( public record ContentProviderMangaInfoResponseDTO(

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.Genre; import com.magamochi.model.entity.Genre;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaImportReview; import com.magamochi.model.entity.MangaImportReview;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.time.Instant; import java.time.Instant;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import static java.util.Objects.isNull; import static java.util.Objects.isNull;
import com.magamochi.mangamochi.model.entity.Language; import com.magamochi.model.entity.Language;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaChapter; import com.magamochi.model.entity.MangaChapter;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
public record MangaChapterDownloadCommand(Long chapterId) {} public record MangaChapterDownloadCommand(Long chapterId) {}

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaChapter; import com.magamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaChapterImage; import com.magamochi.model.entity.MangaChapterImage;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.util.Comparator; import java.util.Comparator;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.util.UUID; import java.util.UUID;

View File

@ -1,12 +1,12 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import static java.util.Objects.isNull; import static java.util.Objects.isNull;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaAlternativeTitle; import com.magamochi.model.entity.MangaAlternativeTitle;
import com.magamochi.mangamochi.model.entity.MangaChapter; import com.magamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaProvider; import com.magamochi.model.entity.MangaProvider;
import com.magamochi.mangamochi.model.enumeration.ProviderStatus; import com.magamochi.model.enumeration.ProviderStatus;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import static java.util.Objects.nonNull; import static java.util.Objects.nonNull;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import java.util.List; import java.util.List;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
public record MangaListUpdateCommand(String contentProviderName, Integer page) {} public record MangaListUpdateCommand(String contentProviderName, Integer page) {}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import java.util.List; import java.util.List;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.*; import com.magamochi.model.entity.Provider;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
public record RegistrationRequestDTO(String name, String email, String password) {} public record RegistrationRequestDTO(String name, String email, String password) {}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import java.util.List; import java.util.List;
import lombok.Builder; import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; import lombok.Getter;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
public record UpdateMangaDataCommand(Long mangaId) {} public record UpdateMangaDataCommand(Long mangaId) {}

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto; package com.magamochi.model.dto;
public record UpdateMangaFollowChapterListCommand(Long mangaProviderId) {} public record UpdateMangaFollowChapterListCommand(Long mangaProviderId) {}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import java.time.Instant; import java.time.Instant;
import lombok.Builder; import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.*; import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.*; import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.*; import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.*; import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import com.magamochi.mangamochi.model.enumeration.ProviderStatus; import com.magamochi.model.enumeration.ProviderStatus;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;
import java.util.List; import java.util.List;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import com.magamochi.mangamochi.model.enumeration.UserRole; import com.magamochi.model.enumeration.UserRole;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.util.Set; import java.util.Set;
import lombok.*; import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity; package com.magamochi.model.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.*; import lombok.*;

View File

@ -0,0 +1,6 @@
package com.magamochi.model.enumeration;
public enum ArchiveFileType {
CBZ,
CBR
}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.enumeration; package com.magamochi.model.enumeration;
public enum MangaStatus { public enum MangaStatus {
ONGOING, ONGOING,

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.enumeration; package com.magamochi.model.enumeration;
public enum ProviderStatus { public enum ProviderStatus {
ACTIVE, ACTIVE,

View File

@ -0,0 +1,5 @@
package com.magamochi.model.enumeration;
public enum UserRole {
USER
}

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Author; import com.magamochi.model.entity.Author;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Genre; import com.magamochi.model.entity.Genre;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Image; import com.magamochi.model.entity.Image;
import java.util.UUID; import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Language; import com.magamochi.model.entity.Language;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaAlternativeTitle; import com.magamochi.model.entity.MangaAlternativeTitle;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface MangaAlternativeTitlesRepository public interface MangaAlternativeTitlesRepository

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Author; import com.magamochi.model.entity.Author;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaAuthor; import com.magamochi.model.entity.MangaAuthor;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaChapter; import com.magamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaChapterImage; import com.magamochi.model.entity.MangaChapterImage;
import java.util.List; import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaChapter; import com.magamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaProvider; import com.magamochi.model.entity.MangaProvider;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;

View File

@ -1,6 +1,8 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.*; import com.magamochi.model.entity.Genre;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.MangaGenre;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaImportReview; import com.magamochi.model.entity.MangaImportReview;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface MangaImportReviewRepository extends JpaRepository<MangaImportReview, Long> { public interface MangaImportReviewRepository extends JpaRepository<MangaImportReview, Long> {

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaProvider; import com.magamochi.model.entity.MangaProvider;
import com.magamochi.mangamochi.model.entity.Provider; import com.magamochi.model.entity.Provider;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Provider; import com.magamochi.model.entity.Provider;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User; import com.magamochi.model.entity.User;
import com.magamochi.mangamochi.model.entity.UserFavoriteManga; import com.magamochi.model.entity.UserFavoriteManga;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User; import com.magamochi.model.entity.User;
import com.magamochi.mangamochi.model.entity.UserMangaFollow; import com.magamochi.model.entity.UserMangaFollow;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository; package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.User; import com.magamochi.model.entity.User;
import java.util.Optional; import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,11 +1,11 @@
package com.magamochi.mangamochi.model.specification; package com.magamochi.model.specification;
import static java.util.Objects.nonNull; import static java.util.Objects.nonNull;
import com.magamochi.mangamochi.model.dto.MangaListFilterDTO; import com.magamochi.model.dto.MangaListFilterDTO;
import com.magamochi.mangamochi.model.entity.Author; import com.magamochi.model.entity.Author;
import com.magamochi.mangamochi.model.entity.Manga; import com.magamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User; import com.magamochi.model.entity.User;
import jakarta.persistence.criteria.*; import jakarta.persistence.criteria.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaChapterDownloadCommand; import com.magamochi.model.dto.MangaChapterDownloadCommand;
import com.magamochi.mangamochi.service.MangaChapterService; import com.magamochi.service.MangaChapterService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaChapterDownloadCommand; import com.magamochi.model.dto.MangaChapterDownloadCommand;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand; import com.magamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.mangamochi.service.MangaImportService; import com.magamochi.service.MangaImportService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand; import com.magamochi.model.dto.UpdateMangaDataCommand;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaFollowChapterListCommand; import com.magamochi.model.dto.UpdateMangaFollowChapterListCommand;
import com.magamochi.mangamochi.service.MangaService; import com.magamochi.service.MangaService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaFollowChapterListCommand; import com.magamochi.model.dto.UpdateMangaFollowChapterListCommand;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue; package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaListUpdateCommand; import com.magamochi.model.dto.MangaListUpdateCommand;
import com.magamochi.mangamochi.service.MangaListService; import com.magamochi.service.MangaListService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;

Some files were not shown because too many files have changed in this diff Show More