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

feat:#13 program 엔티티 수정 및 status 추가 #19

Merged
merged 1 commit into from
Nov 25, 2023
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
15 changes: 0 additions & 15 deletions src/main/java/org/sopt/sopkerton/program/domain/Employment.java

This file was deleted.

9 changes: 6 additions & 3 deletions src/main/java/org/sopt/sopkerton/program/domain/Program.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@

@Getter
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "program_type")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@Table(name = "programs")
public abstract class Program extends BaseEntity {
public class Program extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "program_id")
Expand All @@ -34,7 +32,9 @@ public abstract class Program extends BaseEntity {
private String title;

private String imageUrl;

private String type;

@Enumerated(value = EnumType.STRING)
private Status status;

Expand All @@ -46,4 +46,7 @@ public abstract class Program extends BaseEntity {

@Column(nullable = false)
private String content;

private int volunteerHours;
private int salary;
}
5 changes: 4 additions & 1 deletion src/main/java/org/sopt/sopkerton/program/domain/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
@Getter
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public enum Status {
REGISTER, DONE;
REGISTER("지원"),
DONE("완료");

private final String value;
}
14 changes: 0 additions & 14 deletions src/main/java/org/sopt/sopkerton/program/domain/Volunteering.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public record ProgramListResponse(
String title,
String registerAt,
String imageUrl,
String status,
String Region
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public List<ProgramListResponse> getProgramListByProgramType(String programType)
program.getTitle(),
formatToLocalDate(program.getRegisterAt()),
program.getImageUrl(),
program.getStatus().getValue(),
program.getRegion()
))
.collect(Collectors.toList());
Expand Down