Skip to content

Commit

Permalink
Merge pull request #19 from SOPT-33-iOS-Team-1/feat/#13-separate_prog…
Browse files Browse the repository at this point in the history
…ram_type_api

feat:#13 program 엔티티 수정 및 status 추가
  • Loading branch information
kseysh authored Nov 25, 2023
2 parents bae531b + da4ed10 commit 93a69f8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 33 deletions.
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

0 comments on commit 93a69f8

Please sign in to comment.