敏捷工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
842 B

2 years ago
  1. package com.whn.hellospring.model;
  2. import lombok.*;
  3. import org.hibernate.annotations.Type;
  4. import org.joda.money.Money;
  5. import javax.persistence.Column;
  6. import javax.persistence.Entity;
  7. import javax.persistence.Table;
  8. import java.io.Serializable;
  9. import java.util.Date;
  10. @Builder
  11. @Data
  12. @NoArgsConstructor
  13. @AllArgsConstructor
  14. public class CoffeeDTO implements Serializable {
  15. private Long order_id_fk;
  16. private String name;
  17. private Date createTime;
  18. private Date updateTime;
  19. private Double price;
  20. public CoffeeDTO(CoffeeDO coffeeDO){
  21. this.createTime = coffeeDO.getCreateTime();
  22. this.updateTime = coffeeDO.getUpdateTime();
  23. this.name = coffeeDO.getName();
  24. this.order_id_fk = coffeeDO.getOrder_id_fk();
  25. this.price = new Double(coffeeDO.getPrice().getAmount().toString());
  26. }
  27. }