使用實體類的時候給預設值
阿新 • • 發佈:2019-01-22
@Entity @Table(name="destockings") @Data public class Destocking extends AbstractAuditing { @Id private String id; @NotNull private String client; @NotNull private String country; private String boardSize; private String boardHeight; private Integer boardQuantity; private Date expectedArrivalDate; private Integer packageQuantity; private Integer parcelQuantity; private Double weight; private Date stockOutAt; @Enumerated(EnumType.STRING) private Status status = Status.STOCK_IN; private String comment; @ApiModelProperty(value = "幹線費用", readOnly = true) private Double deliveryFee = 0d; }