Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 세션테이블 '제목' 컬럼 추가 #38

Merged
merged 1 commit into from
Jun 27, 2024
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
Expand Up @@ -12,6 +12,8 @@ public record AddSessionRequest(
Long generationId,
MultipartFile sessionImage,
@NotNull
String title,
@NotNull
String description,
ItIssue itIssue,
Networking networking,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public record SessionListResponse(
Long sessionId,
Integer sessionNumber,
String title,
String photoUrl,
String description,
Long generationId,
Expand All @@ -15,6 +16,7 @@ public static SessionListResponse from(Session session) {
return new SessionListResponse(
session.getId(),
session.getNumber(),
session.getTitle(),
(session.getPhotoS3Info() != null) ? session.getPhotoS3Info().getUrl() : null,
session.getDescription(),
session.getGeneration().getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public record UpdateSessionRequest(
MultipartFile sessionImage,
@NotNull
Boolean isPhotoUpdated,
String title,
String description,
@NotNull
ItIssue itIssue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class Session extends BaseTimeEntity {
@Column(name = "session_number")
private Integer number;

@Column(name = "session_title", length = 100)
private String title;

@Embedded
private S3Info photoS3Info;

Expand All @@ -58,9 +61,10 @@ public class Session extends BaseTimeEntity {
private SessionContents sessionContents;

@Builder
public Session(Integer number, S3Info s3Info, String description, Generation generation, SessionContents sessionContents) {
public Session(Integer number, S3Info s3Info, String title, String description, Generation generation, SessionContents sessionContents) {
this.number = number;
this.photoS3Info = s3Info;
this.title = title;
this.description = description;
this.generation = generation;
this.sessionContents = sessionContents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public AddSessionResponse addSession(AddSessionRequest request) throws ImageExce
.s3Info(s3Info)
.description(request.description())
.generation(findGeneration)
.title(request.title())
.sessionContents(SessionContents.builder()
.csEducation(request.csEducation())
.devTalk(request.devTalk())
Expand Down
Loading