-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b4fd78
commit 2eceab4
Showing
4 changed files
with
70 additions
and
0 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
37 changes: 37 additions & 0 deletions
37
src/main/java/guru/springframework/msscbeerservice/web/model/BeerDto.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,37 @@ | ||
package guru.springframework.msscbeerservice.web.model; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.OffsetDateTime; | ||
import java.util.UUID; | ||
|
||
/** | ||
* Created by jt on 2019-05-12. | ||
*/ | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class BeerDto { | ||
private UUID id; | ||
private Integer version; | ||
|
||
private OffsetDateTime createdDate; | ||
private OffsetDateTime lastModifiedDate; | ||
|
||
private String beerName; | ||
|
||
private BeerStyleEnum beerStyle; | ||
|
||
private Long upc; | ||
|
||
private BigDecimal price; | ||
|
||
private Integer quantityOnHand; | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/guru/springframework/msscbeerservice/web/model/BeerPagedList.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,21 @@ | ||
package guru.springframework.msscbeerservice.web.model; | ||
|
||
|
||
import org.springframework.data.domain.PageImpl; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by jt on 2019-05-12. | ||
*/ | ||
public class BeerPagedList extends PageImpl<BeerDto> { | ||
|
||
public BeerPagedList(List<BeerDto> content, Pageable pageable, long total) { | ||
super(content, pageable, total); | ||
} | ||
|
||
public BeerPagedList(List<BeerDto> content) { | ||
super(content); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/guru/springframework/msscbeerservice/web/model/BeerStyleEnum.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,8 @@ | ||
package guru.springframework.msscbeerservice.web.model; | ||
|
||
/** | ||
* Created by jt on 2019-05-12. | ||
*/ | ||
public enum BeerStyleEnum { | ||
LAGER, PILSNER, STOUT, GOSE, PORTER, ALE, WHEAT, IPA, PALE_ALE, SAISON | ||
} |