package cn.com.countrygarden.bi.main.model.resident;

import cn.com.countrygarden.bi.main.util.DateDeserializer;
import cn.com.countrygarden.bi.main.util.DateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

@Table(name = "resident_payment")
public class Payment {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "contract_id")
    private Integer contractId;

    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @Column(name = "start_date")
    private Date startDate;

    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @Column(name = "end_date")
    private Date endDate;

    @Column(name = "fix_amount")
    private BigDecimal fixAmount;

    @Column(name = "float_amount")
    private BigDecimal floatAmount;

    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @Column(name = "received_time")
    private Date receivedTime;

    private String receipt;

    private String status;

    private BigDecimal amount;

    @Column(name = "amount_without_tax")
    private BigDecimal amountWithoutTax;

    @Column(name = "value_added_tax")
    private BigDecimal valueAddedTax;

    @Column(name = "invoice_number")
    private String invoiceNumber;

    @Column(name = "invoice_img")
    private String invoiceImg;

    private String remark;

    @Column(name = "gmt_create")
    private Date gmtCreate;

    @Column(name = "created_by")
    private String createdBy;

    @Column(name = "gmt_modified")
    private Date gmtModified;

    @Column(name = "modified_by")
    private String modifiedBy;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return contract_id
     */
    public Integer getContractId() {
        return contractId;
    }

    /**
     * @param contractId
     */
    public void setContractId(Integer contractId) {
        this.contractId = contractId;
    }

    /**
     * @return start_date
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * @param startDate
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * @return end_date
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * @param endDate
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * @return fix_amount
     */
    public BigDecimal getFixAmount() {
        return fixAmount;
    }

    /**
     * @param fixAmount
     */
    public void setFixAmount(BigDecimal fixAmount) {
        this.fixAmount = fixAmount;
    }

    /**
     * @return float_amount
     */
    public BigDecimal getFloatAmount() {
        return floatAmount;
    }

    /**
     * @param floatAmount
     */
    public void setFloatAmount(BigDecimal floatAmount) {
        this.floatAmount = floatAmount;
    }

    /**
     * @return received_time
     */
    public Date getReceivedTime() {
        return receivedTime;
    }

    /**
     * @param receivedTime
     */
    public void setReceivedTime(Date receivedTime) {
        this.receivedTime = receivedTime;
    }

    /**
     * @return receipt
     */
    public String getReceipt() {
        return receipt;
    }

    /**
     * @param receipt
     */
    public void setReceipt(String receipt) {
        this.receipt = receipt == null ? null : receipt.trim();
    }

    /**
     * @return status
     */
    public String getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    /**
     * @return amount
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * @param amount
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * @return amount_without_tax
     */
    public BigDecimal getAmountWithoutTax() {
        return amountWithoutTax;
    }

    /**
     * @param amountWithoutTax
     */
    public void setAmountWithoutTax(BigDecimal amountWithoutTax) {
        this.amountWithoutTax = amountWithoutTax;
    }

    /**
     * @return value_added_tax
     */
    public BigDecimal getValueAddedTax() {
        return valueAddedTax;
    }

    /**
     * @param valueAddedTax
     */
    public void setValueAddedTax(BigDecimal valueAddedTax) {
        this.valueAddedTax = valueAddedTax;
    }

    /**
     * @return invoice_number
     */
    public String getInvoiceNumber() {
        return invoiceNumber;
    }

    /**
     * @param invoiceNumber
     */
    public void setInvoiceNumber(String invoiceNumber) {
        this.invoiceNumber = invoiceNumber == null ? null : invoiceNumber.trim();
    }

    /**
     * @return invoice_img
     */
    public String getInvoiceImg() {
        return invoiceImg;
    }

    /**
     * @param invoiceImg
     */
    public void setInvoiceImg(String invoiceImg) {
        this.invoiceImg = invoiceImg == null ? null : invoiceImg.trim();
    }

    /**
     * @return remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    /**
     * @return gmt_create
     */
    public Date getGmtCreate() {
        return gmtCreate;
    }

    /**
     * @param gmtCreate
     */
    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    /**
     * @return created_by
     */
    public String getCreatedBy() {
        return createdBy;
    }

    /**
     * @param createdBy
     */
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy == null ? null : createdBy.trim();
    }

    /**
     * @return gmt_modified
     */
    public Date getGmtModified() {
        return gmtModified;
    }

    /**
     * @param gmtModified
     */
    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    /**
     * @return modified_by
     */
    public String getModifiedBy() {
        return modifiedBy;
    }

    /**
     * @param modifiedBy
     */
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy == null ? null : modifiedBy.trim();
    }
}