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

Refactor/pk entity #130

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: properties mapping
  • Loading branch information
leekyukin committed Jan 16, 2023
commit d0c78e1b82b484e6d7cf1b3e8ec8a7fef8fc16c9
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ class AdInfo {
val id: String,
val companyName: String,
val views: Int,
val clicks: Int,
val image: String,
val link: String,
val expirationDate: LocalDate,
Original file line number Diff line number Diff line change
@@ -16,11 +16,12 @@ interface AdMapper {

@Mappings(
value = [
Mapping(source = "costInfo.views", target = "views"),
Mapping(source = "company.companyName", target = "companyName"),
Mapping(source = "link.value", target = "link"),
Mapping(source = "image.value", target = "image"),
Mapping(source = "expirationDate.value", target = "expirationDate"),
Mapping(source = "costInfo.views.value", target = "views"),
Mapping(source = "costInfo.clicks.value", target = "clicks"),
Mapping(source = "company.companyName.value", target = "companyName"),
]
)
fun of(ad: Ad): AdInfo.Main
Original file line number Diff line number Diff line change
@@ -17,8 +17,10 @@ class Ad(
@Embedded
val link: Link,

// @author Lee Kyu-jin
// TODO :: λž˜ν•‘ νƒ€μž…κ³Ό 일반 μž„λ² λ””λ“œ νƒ€μž…μ˜ 차이λ₯Ό 두기 μœ„ν•΄μ„œ λž˜ν•‘ νƒ€μž…μ„ μœ„ν•œ μ–΄λ…Έν…Œμ΄μ…˜μ„ λ§Œλ“€ ν•„μš”κ°€ μžˆμ–΄ λ³΄μž„
/*
@author Lee Kyu-jin
TODO :: λž˜ν•‘ νƒ€μž…κ³Ό 일반 μž„λ² λ””λ“œ νƒ€μž…μ˜ 차이λ₯Ό 두기 μœ„ν•΄μ„œ λž˜ν•‘ νƒ€μž…μ„ μœ„ν•œ μ–΄λ…Έν…Œμ΄μ…˜μ„ λ§Œλ“€ ν•„μš”κ°€ μžˆμ–΄ λ³΄μž„
*/
@Embedded
val expirationDate: ExpirationDate,