Skip to content
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,9 +1,9 @@
package com.tiki.server.auth.dto.request;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record SignInRequest(
@NonNull String email,
@NonNull String password
@NotNull String email,
@NotNull String password
) {
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.tiki.server.auth.dto.response;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

import static lombok.AccessLevel.PRIVATE;

@Builder(access = PRIVATE)
public record ReissueGetResponse(
@NonNull String accessToken
@NotNull String accessToken
) {

public static ReissueGetResponse from(String accessToken) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.tiki.server.auth.dto.response;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

import static lombok.AccessLevel.PRIVATE;

@Builder(access = PRIVATE)
public record SignInGetResponse(
@NonNull String accessToken,
@NonNull String refreshToken
@NotNull String accessToken,
@NotNull String refreshToken
) {

public static SignInGetResponse from(String accessToken, String refreshToken) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tiki/server/common/dto/BaseResponse.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tiki.server.common.dto;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public interface BaseResponse {
boolean success();
@NonNull String message();
@NotNull String message();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import static lombok.AccessLevel.PRIVATE;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record ErrorCodeResponse(
boolean success,
int code,
@NonNull String message
@NotNull String message
) implements BaseResponse {

public static ErrorCodeResponse of(int code, String message) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tiki/server/common/dto/ErrorResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import static lombok.AccessLevel.PRIVATE;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record ErrorResponse(
boolean success,
@NonNull String message
@NotNull String message
) implements BaseResponse {

public static ErrorResponse of(String message) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tiki/server/common/dto/SuccessResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import com.fasterxml.jackson.annotation.JsonInclude;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record SuccessResponse<T>(
boolean success,
@NonNull String message,
@NotNull String message,
@JsonInclude(value = NON_NULL) T data
) implements BaseResponse {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.tiki.server.document.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record DocumentCreateRequest(
@Schema(description = "파일 이름", example = "tiki.jpg")
@NonNull String fileName,
@NotNull String fileName,
@Schema(description = "파일 url", example = "https://.../tiki.jpg")
@NonNull String fileUrl,
@NotNull String fileUrl,
@Schema(description = "파일 key", example = "....jpg")
@NonNull String fileKey,
@NotNull String fileKey,
@Schema(description = "파일 용량", example = "1.23")
double capacity
@NotNull double capacity
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import java.util.List;

import jakarta.validation.constraints.NotNull;

public record DocumentsCreateRequest(
List<DocumentCreateRequest> documents
@NotNull List<DocumentCreateRequest> documents
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import com.tiki.server.document.entity.DeletedDocument;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record DeletedDocumentsGetResponse(
List<DeletedDocumentGetResponse> deletedDocuments
@NotNull List<DeletedDocumentGetResponse> deletedDocuments
) {

public static DeletedDocumentsGetResponse from(final List<DeletedDocument> deletedDocuments) {
Expand All @@ -22,10 +22,10 @@ public static DeletedDocumentsGetResponse from(final List<DeletedDocument> delet

@Builder(access = PRIVATE)
private record DeletedDocumentGetResponse(
long documentId,
@NonNull String name,
@NonNull String url,
double capacity
@NotNull long documentId,
@NotNull String name,
@NotNull String url,
@NotNull double capacity
) {

private static DeletedDocumentGetResponse from(final DeletedDocument deletedDocument) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import com.tiki.server.document.entity.Document;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record DocumentsGetResponse(
List<DocumentInfoGetResponse> documents
@NotNull List<DocumentInfoGetResponse> documents
) {

public static DocumentsGetResponse from(final List<Document> documents) {
Expand All @@ -23,11 +23,11 @@ public static DocumentsGetResponse from(final List<Document> documents) {

@Builder(access = PRIVATE)
private record DocumentInfoGetResponse(
long documentId,
@NonNull String name,
@NonNull String url,
double capacity,
@NonNull LocalDateTime createdTime
@NotNull long documentId,
@NotNull String name,
@NotNull String url,
@NotNull double capacity,
@NotNull LocalDateTime createdTime
) {

public static DocumentInfoGetResponse from(final Document document) {
Expand Down
28 changes: 14 additions & 14 deletions src/main/java/com/tiki/server/drive/dto/DriveGetResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import com.tiki.server.document.entity.Document;
import com.tiki.server.folder.entity.Folder;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record DriveGetResponse(
List<DocumentGetResponse> documents,
List<FolderGetResponse> folders
@NotNull List<DocumentGetResponse> documents,
@NotNull List<FolderGetResponse> folders
) {

public static DriveGetResponse of(final List<Document> documents, final List<Folder> folders) {
Expand All @@ -26,12 +26,12 @@ public static DriveGetResponse of(final List<Document> documents, final List<Fol

@Builder(access = PRIVATE)
private record DocumentGetResponse(
long documentId,
@NonNull String name,
@NonNull String url,
double capacity,
@NonNull LocalDateTime createdTime,
@NonNull String type
@NotNull long documentId,
@NotNull String name,
@NotNull String url,
@NotNull double capacity,
@NotNull LocalDateTime createdTime,
@NotNull String type
) {

public static DocumentGetResponse from(final Document document) {
Expand All @@ -48,11 +48,11 @@ public static DocumentGetResponse from(final Document document) {

@Builder(access = PRIVATE)
private record FolderGetResponse(
long folderId,
@NonNull String name,
@NonNull LocalDateTime createdTime,
@NonNull String path,
@NonNull String type
@NotNull long folderId,
@NotNull String name,
@NotNull LocalDateTime createdTime,
@NotNull String path,
@NotNull String type
) {

private static FolderGetResponse from(Folder folder) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.tiki.server.emailverification.dto.request;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record CodeVerificationRequest(
@NonNull
String email,
@NonNull
String code
@NotNull String email,
@NotNull String code
) {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tiki.server.emailverification.dto.request;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record EmailRequest(
@NonNull String email
@NotNull String email
) {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tiki.server.external.dto.request;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record PreSignedUrlRequest(
@NonNull String fileFormat
@NotNull String fileFormat
) {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tiki.server.external.dto.request;

import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record S3DeleteRequest(
@NonNull String fileKey
@NotNull String fileKey
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import static lombok.AccessLevel.PRIVATE;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.NonNull;

@Builder(access = PRIVATE)
public record PreSignedUrlResponse(
@NonNull String fileName,
@NonNull String url
@NotNull String fileName,
@NotNull String url
) {

public static PreSignedUrlResponse of(String fileName, String url) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.tiki.server.folder.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.NonNull;
import jakarta.validation.constraints.NotNull;

public record FolderCreateRequest(
@Schema(description = "폴더 이름", example = "폴더 1")
@NonNull String name
@NotNull String name
) {
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.tiki.server.folder.dto.request;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

public record FolderNameUpdateRequest(
@Schema(description = "수정할 폴더 이름", requiredMode = REQUIRED, example = "수정할 폴더 1")
@Schema(description = "수정할 폴더 이름", example = "수정할 폴더 1")
@NotNull String name
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import static lombok.AccessLevel.PRIVATE;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;

@Builder(access = PRIVATE)
public record FolderCreateResponse(
long folderId
@NotNull long folderId
) {

public static FolderCreateResponse from(long folderId) {
Expand Down
Loading
Loading