Skip to content

Commit

Permalink
[#110] feat: response DTO 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonyworld committed Jul 17, 2024
1 parent 248295e commit ff484f1
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.beat.domain.performance.application.dto.update;

public record CastUpdateResponse(
Long castId,
String castName,
String castRole,
String castPhoto
) {
public static CastUpdateResponse of(Long castId, String castName, String castRole, String castPhoto) {
return new CastUpdateResponse(castId, castName, castRole, castPhoto);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.beat.domain.performance.application.dto.update;

import com.beat.domain.performance.domain.BankName;
import com.beat.domain.performance.domain.Genre;

import java.util.List;

public record PerformanceUpdateResponse(
Long userId,
Long performanceId,
String performanceTitle,
Genre genre,
int runningTime,
String performanceDescription,
String performanceAttentionNote,
BankName bankName,
String accountNumber,
String accountHolder,
String posterImage,
String performanceTeamName,
String performanceVenue,
String performanceContact,
String performancePeriod,
int ticketPrice,
int totalScheduleCount,
List<ScheduleUpdateResponse> scheduleList,
List<CastUpdateResponse> castList,
List<StaffUpdateResponse> staffList
) {
public static PerformanceUpdateResponse of(Long userId, Long performanceId, String performanceTitle, Genre genre, int runningTime,
String performanceDescription, String performanceAttentionNote, BankName bankName, String accountNumber, String accountHolder,
String posterImage, String performanceTeamName, String performanceVenue, String performanceContact, String performancePeriod,
int ticketPrice, int totalScheduleCount, List<ScheduleUpdateResponse> scheduleList, List<CastUpdateResponse> castList, List<StaffUpdateResponse> staffList) {
return new PerformanceUpdateResponse(userId, performanceId, performanceTitle, genre, runningTime, performanceDescription, performanceAttentionNote, bankName, accountNumber,
accountHolder, posterImage, performanceTeamName, performanceVenue, performanceContact, performancePeriod, ticketPrice, totalScheduleCount, scheduleList, castList, staffList);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.beat.domain.performance.application.dto.update;

import com.beat.domain.schedule.domain.ScheduleNumber;

import java.time.LocalDateTime;

public record ScheduleUpdateResponse(
Long scheduleId,
LocalDateTime performanceDate,
int totalTicketCount,
int dueDate,
ScheduleNumber scheduleNumber
) {
public static ScheduleUpdateResponse of(Long scheduleId, LocalDateTime performanceDate, int totalTicketCount, int dueDate, ScheduleNumber scheduleNumber) {
return new ScheduleUpdateResponse(scheduleId, performanceDate, totalTicketCount, dueDate, scheduleNumber);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.beat.domain.performance.application.dto.update;

public record StaffUpdateResponse(
Long staffId,
String staffName,
String staffRole,
String staffPhoto
) {
public static StaffUpdateResponse of(Long staffId, String staffName, String staffRole, String staffPhoto) {
return new StaffUpdateResponse(staffId, staffName, staffRole, staffPhoto);
}
}

0 comments on commit ff484f1

Please sign in to comment.