package org.xmx0632.deliciousfruit.entity;
import java.math.BigDecimal;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* OrderPayByCashCoupon.
*/
@Entity
@Table(name = "tbl_order_pay_by_cash_coupon")
public class OrderPayByCashCoupon extends IdEntity {
private Order order;
private String cashCouponId;
private BigDecimal deductionAmount;
private Integer payLeftTimes;
public OrderPayByCashCoupon() {
}
public OrderPayByCashCoupon(Order order, String cashCouponId) {
this.order = order;
this.cashCouponId = cashCouponId;
}
@ManyToOne
@JoinColumn(name = "order_id")
public Order getOrder() {
return order;
}
public void setOrder(Order order) {
this.order = order;
}
@NotNull
public String getCashCouponId() {
return this.cashCouponId;
}
public void setCashCouponId(String cashCouponId) {
this.cashCouponId = cashCouponId;
}
public BigDecimal getDeductionAmount() {
return this.deductionAmount;
}
public void setDeductionAmount(BigDecimal deductionAmount) {
this.deductionAmount = deductionAmount;
}
public Integer getPayLeftTimes() {
return this.payLeftTimes;
}
public void setPayLeftTimes(Integer payLeftTimes) {
this.payLeftTimes = payLeftTimes;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}