-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add : 3차 세미나 과제_PostCreateRequest record 생성 #7
- Loading branch information
1 parent
d05b23b
commit 3577cc3
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
week02/seminar/demo/src/main/java/com/example/demo/service/dto/post/PostCreateRequest.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,14 @@ | ||
package com.example.demo.service.dto.post; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Size; | ||
|
||
public record PostCreateRequest( | ||
@NotBlank(message = "글의 제목은 필수입니다.") | ||
String name, | ||
|
||
@NotBlank(message = "글의 내용은 필수입니다.") | ||
String content | ||
|
||
){} | ||
// name과 content가 필요함 |