Skip to content

[feat/#320] 온보딩 서비스 약관 정보 추가#321

Merged
dudwntjs merged 20 commits intodevelopfrom
feat/#320-onboarding-agreement-view
Nov 4, 2025
Merged

[feat/#320] 온보딩 서비스 약관 정보 추가#321
dudwntjs merged 20 commits intodevelopfrom
feat/#320-onboarding-agreement-view

Conversation

@dudwntjs
Copy link
Copy Markdown
Contributor

@dudwntjs dudwntjs commented Nov 3, 2025

📄 작업 내용

  • 프로그레스바 4단계로 수정
  • OnboardingAgreementView 구현
  • 서비스 약관 GET, 온보딩 완료 PATCH 구현
  • 스웨거 도메인에 맞춰서 네트워크 구조 변경(Onboarding 도메인이 없더라구요...?다 User로 넣었심)
구현 내용 iPhone 13 mini iPhone 16 pro
OnboardingAgreementView
GET 잘 받아와지고 프로그레스바 4단계로 잘 나눠짐(마지막뷰)

💻 주요 코드 설명

OnboardingCompleteInfo 모델

struct OnboardingCompleteInfo: Encodable {
    let policyAgreementInfos: [PolicyAgreementInfo]
    let townId: Int
    let townName: String
    let persona: String
    let nickname: String

    init(
        townId: Int,
        townName: String,
        persona: String,
        nickname: String,
        policyAgreementInfos: [PolicyAgreementInfo] = [] // 기본값 추가
    ) {
        self.townId = townId
        self.townName = townName
        self.persona = persona
        self.nickname = nickname
        self.policyAgreementInfos = policyAgreementInfos
    }
}
  • 서버 스펙에 맞춰 policyAgreementInfos 필드를 OnboardingCompleteInfo 모델에 추가
  • UserCompleteResponseDTO.toEntity() 호출 시 policyAgreementInfos 인자를 생략할 수 있도록
    기본값([])을 가지는 커스텀 이니셜라이저를 추가함요

🔗 연결된 이슈

👀 기타 더 이야기해볼 점

어.. 깃 꼬엿는데... 해결햇어요... 어차피 들킬 것 같아서... 말씀드려요

스크린샷 2025-11-03 오후 10 04 09

@dudwntjs dudwntjs requested a review from a team November 3, 2025 13:04
@dudwntjs dudwntjs self-assigned this Nov 3, 2025
@dudwntjs dudwntjs added ☀️ youngju 영주가함! 🛠️ feat 새로운 기능 구현 시 사용 labels Nov 3, 2025
@dudwntjs dudwntjs linked an issue Nov 3, 2025 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Collaborator

@SeungWon1125 SeungWon1125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굉장히 빠르네요 ㄷ 고생하셧슴니당 🫡

Comment on lines +11 to +16
let title: String
let isRequired: Bool
let isChecked: Bool
var showsChevron: Bool = false
let onTap: () -> Void

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private으로 감추고 생성자 넣어주는 거 어떤가요?

@SeungWon1125 SeungWon1125 self-requested a review November 3, 2025 17:01
@dudwntjs dudwntjs requested a review from a team November 3, 2025 17:02
Copy link
Copy Markdown
Collaborator

@SeungWon1125 SeungWon1125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미안합니다 궁금한 게 또 생김ㅎ

import Foundation

struct OnboardingCompleteRequestDTO: RequestModelType {
struct UserCompleteRequestDTO: Encodable, RequestModelType {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 RequestModelType만 해도 될 거 같습니닷

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +10 to +20
struct UserPoliciesResponseDTO: Decodable, ResponseModelType {
let userPolicies: [PolicyDTO]
}

struct PolicyDTO: Decodable {
let id: Int
let policyType: String
let title: String
let content: String
let required: Bool
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요기도 둘 다 ResponseModelType만 채택해도 될 거 같슴당

Comment on lines +10 to +36
struct OnboardingCompleteInfo: Encodable {
let policyAgreementInfos: [PolicyAgreementInfo]
let townId: Int
let townName: String
let persona: String
let nickname: String

init(
townId: Int,
townName: String,
persona: String,
nickname: String,
policyAgreementInfos: [PolicyAgreementInfo] = []
) {
self.townId = townId
self.townName = townName
self.persona = persona
self.nickname = nickname
self.policyAgreementInfos = policyAgreementInfos
}
}

struct PolicyAgreementInfo: Encodable {
let policyId: Int
let isAgree: Bool
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entity인데 Encodable을 채택한 이유가 있나요? 궁금

Copy link
Copy Markdown
Contributor Author

@dudwntjs dudwntjs Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR에 적혀잇는 부분인데... 잘못 생각햇어요ㅠ
도메인에 policyAgreementInfos 추가 + 기본값 이니셜라이져 햇었고.... 동작은 되지만 설계상 구리구리하다 생각하긴 햇거던요.....

지금 현재 OnboardingCompleteInfo(Entity)Encodable을 채택 → 도메인 모델이 네트워크 전송 책임을 지더라구요....?
OnboardingCompleteInfo는 순수 도메인으로 유지하고, 전송은OnboardingCompleteRequestDTO에서 하는 게 맞는 것 같아욤
그럼 Encodable를 굳이 엔티티 단에서 안써도 댐

@dudwntjs dudwntjs requested a review from a team November 3, 2025 17:30
Copy link
Copy Markdown
Collaborator

@SeungWon1125 SeungWon1125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿입니다ㅏ

@dudwntjs dudwntjs merged commit 1ea6e76 into develop Nov 4, 2025
@dudwntjs dudwntjs deleted the feat/#320-onboarding-agreement-view branch November 4, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ feat 새로운 기능 구현 시 사용 ☀️ youngju 영주가함!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 온보딩 서비스 약관 정보 추가

2 participants