-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
376 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/fledge/fledgeserver/canary/dto/CanaryProfileGetResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.fledge.fledgeserver.canary.dto; | ||
|
||
import com.fledge.fledgeserver.canary.entity.CanaryProfile; | ||
import com.fledge.fledgeserver.member.entity.Member; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.util.Date; | ||
|
||
@Getter | ||
@Schema(description = "후원하기에서 자립준비청년 프로필 조회 응답 DTO") | ||
public class CanaryProfileGetResponseDto { | ||
|
||
@Schema(description = "닉네임", example = "카드값줘체리") | ||
private String nickname; | ||
|
||
@Schema(description = "자기 소개", example = "안녕하세요, 저는...") | ||
private String introduction; | ||
|
||
|
||
public CanaryProfileGetResponseDto(CanaryProfile canaryProfile) { | ||
this.nickname = canaryProfile.getMember().getNickname(); | ||
this.introduction = canaryProfile.getIntroduction(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/fledge/fledgeserver/promise/entity/Promise.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.fledge.fledgeserver.promise.entity; | ||
|
||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
public enum Promise { | ||
ONCE("ONCE"), // 1회 인증 | ||
WEEKLY("WEEKLY"), // 4주간 매 주 인증 | ||
MONTHLY("MONTHLY"); // 3개월간 매 달 인증 | ||
|
||
private final String key; | ||
public String getKey() { return key; } | ||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/com/fledge/fledgeserver/promise/entity/PromiseLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.fledge.fledgeserver.promise.entity; | ||
|
||
import com.fledge.fledgeserver.common.entity.BaseTimeEntity; | ||
import com.fledge.fledgeserver.member.entity.Member; | ||
import com.fledge.fledgeserver.support.entity.Support; | ||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class PromiseLog extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id", nullable = false) | ||
private Member member; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "support_id", nullable = false) | ||
private Support support; | ||
|
||
@Column(nullable = false) | ||
private LocalDate startDate; | ||
|
||
@Column(nullable = false) | ||
private LocalDate endDate; | ||
|
||
@Column(nullable = false) | ||
private PromiseStatus promiseStatus; | ||
|
||
@Builder | ||
public PromiseLog(Member member, Support support, LocalDate startDate, LocalDate endDate, PromiseStatus promiseStatus) { | ||
this.member = member; | ||
this.support = support; | ||
this.startDate = startDate; | ||
this.endDate = endDate; | ||
this.promiseStatus = promiseStatus; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/fledge/fledgeserver/promise/entity/PromiseStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.fledge.fledgeserver.promise.entity; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
public enum PromiseStatus { | ||
PENDING("PENDING"), // 인증 대기중 | ||
VERIFIED("VERIFIED"), // 인증 완료 | ||
UNVERIFIED("UNVERIFIED"); // 인증하지 않음 | ||
|
||
|
||
private final String key; | ||
|
||
public String getStatus() { | ||
return key; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.