-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT/#102] 약관 동의 여부 관련 기능 구현 #103
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7432298
feat: 약관 동의 여부 관리 엔티티 생성
Kyoung-M1N b3f40fe
feat: 회원가입 시 약관 동의 여부 포함
Kyoung-M1N bbd7f01
Merge branch 'develop' into feat/102/terms-agreement
Kyoung-M1N 2585218
fix: 누락된 필드 추가
Kyoung-M1N 6f13cca
refactor: 항목별 시간대 별도 저장 컬럼 추가
Kyoung-M1N File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
...rc/main/java/org/sopt/routee/member/internal/controller/dto/request/AgreementRequest.java
This file contains hidden or 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,22 @@ | ||
| package org.sopt.routee.member.internal.controller.dto.request; | ||
|
|
||
| import org.sopt.routee.member.internal.service.dto.command.AgreementCommand; | ||
|
|
||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record AgreementRequest( | ||
| @NotNull // 서비스 이용 약관 | ||
| Boolean serviceTerms, | ||
| @NotNull // 개인정보 처리 방침 | ||
| Boolean privacyPolicy, | ||
| @NotNull // 위치기반 서비스 이용약관 | ||
| Boolean locationServiceTerms, | ||
| @NotNull // 만 14세 이상 여부 | ||
| Boolean over14, | ||
| @NotNull // 마케팅 활용 및 광고성 정보 수신 동의 | ||
| Boolean marketingConsent | ||
| ) { | ||
| public AgreementCommand toCommand() { | ||
| return new AgreementCommand(serviceTerms, privacyPolicy, locationServiceTerms, over14, marketingConsent); | ||
| } | ||
| } |
This file contains hidden or 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
72 changes: 72 additions & 0 deletions
72
routee-member/src/main/java/org/sopt/routee/member/internal/entity/MemberAgreement.java
This file contains hidden or 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,72 @@ | ||
| package org.sopt.routee.member.internal.entity; | ||
|
|
||
| import java.time.Instant; | ||
| import java.time.ZoneId; | ||
|
|
||
| import org.sopt.routee.entity.BaseEntity; | ||
|
|
||
| import io.hypersistence.utils.hibernate.id.Tsid; | ||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.FetchType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.JoinColumn; | ||
| import jakarta.persistence.OneToOne; | ||
| import jakarta.persistence.Table; | ||
| import jakarta.persistence.UniqueConstraint; | ||
| import lombok.AccessLevel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Entity | ||
| @Getter | ||
| @Builder | ||
| @Table(name = "member_agreement", | ||
| uniqueConstraints = { | ||
| @UniqueConstraint( | ||
| name = "uk_member_agreement_member_id", | ||
| columnNames = {"member_id"}) | ||
| }) | ||
| @AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class MemberAgreement extends BaseEntity { | ||
| @Id | ||
| @Tsid | ||
| private Long id; | ||
|
|
||
| @OneToOne(fetch = FetchType.LAZY, optional = false) | ||
| @JoinColumn(name = "member_id", nullable = false, updatable = false) | ||
| private Member member; | ||
|
|
||
| @Column(name = "service_terms_agreed_at") | ||
| private Instant serviceTermsAgreedAt; | ||
|
|
||
| @Column(name = "service_terms_agreed_zone") | ||
| private ZoneId serviceTermsAgreedZone; | ||
|
|
||
| @Column(name = "privacy_policy_agreed_at") | ||
| private Instant privacyPolicyAgreedAt; | ||
|
|
||
| @Column(name = "privacy_policy_agreed_zone") | ||
| private ZoneId privacyPolicyAgreedZone; | ||
|
|
||
| @Column(name = "location_service_terms_agreed_at") | ||
| private Instant locationServiceTermsAgreedAt; | ||
|
|
||
| @Column(name = "location_service_terms_agreed_zone") | ||
| private ZoneId locationServiceTermsAgreedZone; | ||
|
|
||
| @Column(name = "over14_confirmed_at") | ||
| private Instant over14ConfirmedAt; | ||
|
|
||
| @Column(name = "over14_confirmed_zone") | ||
| private ZoneId over14ConfirmedZone; | ||
|
|
||
| @Column(name = "marketing_consent_agreed_at") | ||
| private Instant marketingConsentAgreedAt; | ||
|
|
||
| @Column(name = "marketing_consent_agreed_zone") | ||
| private ZoneId marketingConsentAgreedZone; | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
...java/org/sopt/routee/member/internal/exception/RequiredAgreementNotAcceptedException.java
This file contains hidden or 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,11 @@ | ||
| package org.sopt.routee.member.internal.exception; | ||
|
|
||
| import org.sopt.routee.exception.BaseException; | ||
| import org.sopt.routee.member.internal.code.ErrorCode; | ||
|
|
||
| public class RequiredAgreementNotAcceptedException extends BaseException { | ||
|
|
||
| public RequiredAgreementNotAcceptedException() { | ||
| super(ErrorCode.REQUIRED_AGREEMENT_NOT_ACCEPTED); | ||
| } | ||
| } |
This file contains hidden or 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
16 changes: 16 additions & 0 deletions
16
...r/src/main/java/org/sopt/routee/member/internal/repository/MemberAgreementRepository.java
This file contains hidden or 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,16 @@ | ||
| package org.sopt.routee.member.internal.repository; | ||
|
|
||
| import java.util.Optional; | ||
|
|
||
| import org.sopt.routee.member.internal.entity.MemberAgreement; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface MemberAgreementRepository extends JpaRepository<MemberAgreement, Long> { | ||
|
|
||
| Optional<MemberAgreement> findByMember_Id(Long memberId); | ||
|
|
||
| boolean existsByMember_Id(Long memberId); | ||
|
|
||
| void deleteByMember_Id(Long memberId); | ||
|
|
||
| } |
This file contains hidden or 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
10 changes: 10 additions & 0 deletions
10
...r/src/main/java/org/sopt/routee/member/internal/service/dto/command/AgreementCommand.java
This file contains hidden or 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,10 @@ | ||
| package org.sopt.routee.member.internal.service.dto.command; | ||
|
|
||
| public record AgreementCommand( | ||
| boolean serviceTerms, | ||
| boolean privacyPolicy, | ||
| boolean locationServiceTerms, | ||
| boolean over14, | ||
| boolean marketingConsent | ||
| ) { | ||
| } |
6 changes: 5 additions & 1 deletion
6
...er/src/main/java/org/sopt/routee/member/internal/service/dto/command/RegisterCommand.java
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| package org.sopt.routee.member.internal.service.dto.command; | ||
|
|
||
| import java.time.ZoneId; | ||
|
|
||
| import org.sopt.routee.external.api.type.OAuthProvider; | ||
|
|
||
| public record RegisterCommand( | ||
| OAuthProvider provider, | ||
| String idToken, | ||
| String nickname | ||
| String nickname, | ||
| AgreementCommand agreement, | ||
| ZoneId timeZone | ||
| ) { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.