Skip to content

Commit

Permalink
git commit -m "feat/#13 program 엔티티 수정 및 status 추가"
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Nov 25, 2023
1 parent fcb5d5d commit da4ed10
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 da4ed10

Please sign in to comment.