-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement voucher-update-response-dto (#176)
- Loading branch information
Showing
4 changed files
with
62 additions
and
6 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
43 changes: 43 additions & 0 deletions
43
src/main/java/org/swmaestro/repl/gifthub/vouchers/dto/VoucherUpdateResponseDto.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,43 @@ | ||
package org.swmaestro.repl.gifthub.vouchers.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.PropertyNamingStrategy; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) | ||
public class VoucherUpdateResponseDto { | ||
private Long id; | ||
private Long productId; | ||
private String barcode; | ||
private String expiresAt; | ||
private Integer price; | ||
private Integer balance; | ||
private String imageUrl; | ||
@JsonProperty("is_accessible") | ||
private boolean accessible; | ||
@JsonProperty("is_shared") | ||
private boolean shared; | ||
|
||
@Builder | ||
public VoucherUpdateResponseDto(Long id, Long productId, String barcode, String expiresAt, Integer price, | ||
Integer balance, String imageUrl, boolean accessible, boolean shared) { | ||
this.id = id; | ||
this.productId = productId; | ||
this.barcode = barcode; | ||
this.expiresAt = expiresAt; | ||
this.price = price; | ||
this.balance = balance; | ||
this.imageUrl = imageUrl; | ||
this.accessible = accessible; | ||
this.shared = shared; | ||
} | ||
} |
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