Skip to content
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

refactoring model system #275

Merged
merged 6 commits into from
Mar 13, 2024
Merged

refactoring model system #275

merged 6 commits into from
Mar 13, 2024

Conversation

ktkfree
Copy link
Contributor

@ktkfree ktkfree commented Mar 13, 2024

tks-api 의 DAO, DTO system 을 다음의 룰로 refactoring 합니다.

아래의 layer 간 통신은 internal/model 에 정의한 하나의 DTO 를 사용합니다.
과정에서 DB scheme 이 필요가 없는 필드에 대해서는 "gorm:"-:all" tag 를 명시하여 불필요한 db scheme 생성을 방지합니다.

  • delivery
  • usecase
  • repository

외부 client( tks-console, tks-client 등 ) 와의 interface 는 아래의 rule 을 사용하여 pkg/domain 에 명시합니다.
상기 layer 로 전달하기 위해서는 반드시 serialize 를 해야 합니다.

  • input : {Resource} + Request
  • output : {Resource} + Response

@ktkfree
Copy link
Contributor Author

ktkfree commented Mar 13, 2024

대량의 구조적인 변경이므로, 모든 부분에 대한 테스트가 필요한 상황입니다. 잘 되던 API 가 잘 안된다거나 특정 field 가 누락된다던가 하는 부분은 계속 찾아서 잡도록 하겠습니다.

@cho4036 cho4036 merged commit 92dc48e into develop Mar 13, 2024
6 checks passed
seungkyua added a commit to seungkyua/oid-tks-api that referenced this pull request Mar 14, 2024
…pkg"

This reverts commit 92dc48e, reversing
changes made to 65c56af.
cho4036 added a commit that referenced this pull request Mar 14, 2024
Revert "Merge pull request #275 from openinfradev/refact_pkg"
@ktkfree ktkfree deleted the refact_pkg branch March 20, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants