Skip to content

Commit 7f47452

Browse files
committed
refactor : DTO 스키마 추가
1 parent 697d54e commit 7f47452

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
package com.back.web7_9_codecrete_be.domain.artists.dto.request;
22

3+
import jakarta.validation.constraints.NotNull;
4+
import jakarta.validation.constraints.Size;
5+
36
public record CreateRequest(
7+
@NotNull(message = "아티스트 이름은 필수로 입력해야합니다.")
8+
@Size(max = 200, message = "아티스트 이름은 200자를 넘길 수 없습니다.")
49
String artistName,
10+
11+
@Size(max = 150, message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다.")
512
String artistGroup,
13+
14+
@NotNull(message = "아티스트 타입은 필수로 입력해야합니다(SOLO or GROUP)")
615
String artistType,
16+
17+
@NotNull(message = "장르는 필수로 입력해야합니다.")
18+
@Size(max = 30, message = "장르는 30자를 넘길 수 없습니다.")
719
String genreName
820
) {
921
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
package com.back.web7_9_codecrete_be.domain.artists.dto.request;
22

3+
import jakarta.validation.constraints.Size;
4+
35
public record UpdateRequest(
6+
@Size(max = 200, message = "아티스트 이름은 200자를 넘길 수 없습니다.")
47
String artistName,
8+
9+
@Size(max = 150, message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다.")
510
String artistGroup,
11+
612
String artistType,
13+
14+
@Size(max = 30, message = "장르 이름은 30자를 넘길 수 없습니다.")
715
String genreName
816
) {
917
}

0 commit comments

Comments
 (0)