package com.uas.finance.model;

import javax.persistence.*;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 买方用户额度表
 * created by shicr on 2018/1/16
 **/
@Entity
@Table(name = "sellerquota")
public class SellerQuota implements Serializable {

    private static final long serialVersionUID = 1L;

    private static  final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "cq_id")
    private Long id;

    /**
     * 买方客户名称
     */
    @Column(name = "cq_custname")
    private String cq_custname;

    /**
     * 买方客户额度
     */
    @Column(name = "cq_quota")
    private Double cq_quota;

    /**
     * 买方客户已用额度
     */
    @Column(name = "cq_dueamount")
    private Double cq_dueamount;

    /**
     * 买方客户可用额度
     */
    @Column(name = "cq_spamount")
    private Double cq_spamount;

    /**
     * 额度生效日
     */
    @Column(name = "cq_startdate")
    private Date cq_startdate;

    /**
     * 客户UU
     */
    @Column(name = "cq_uu")
    private Long cq_uu;

    /**
     * 买方客户额度状态
     */
    @Column(name = "cq_status")
    private String cq_status;


    /**
     * 买方额度批复对应的申请单id
     */
    @Column(name = "faid")
    private Long faid;


    /**
     * 保理uu
     */
    @Column(name = "faenuu")
    private Long faenuu;

    public Long getFaenuu() {
        return faenuu;
    }

    public void setFaenuu(Long faenuu) {
        this.faenuu = faenuu;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCq_custname() {
        return cq_custname;
    }

    public void setCq_custname(String cq_custname) {
        this.cq_custname = cq_custname;
    }

    public Double getCq_quota() {
        return cq_quota;
    }

    public void setCq_quota(Double cq_quota) {
        this.cq_quota = cq_quota;
    }

    public Double getCq_dueamount() {
        return cq_dueamount;
    }

    public void setCq_dueamount(Double cq_dueamount) {
        this.cq_dueamount = cq_dueamount;
    }

    public Double getCq_spamount() {
        return cq_spamount;
    }

    public void setCq_spamount(Double cq_spamount) {
        this.cq_spamount = cq_spamount;
    }

    public String getCq_startdate() {
        Date date = this.cq_startdate;
        return date != null ? sdf.format(date) : null;
    }

    public void setCq_startdate(Date cq_startdate) {
        this.cq_startdate = cq_startdate;
    }

    public Long getCq_uu() {
        return cq_uu;
    }

    public void setCq_uu(Long cq_uu) {
        this.cq_uu = cq_uu;
    }

    public String getCq_status() {

        return cq_status;
    }

    public void setCq_status(String cq_status) {
        this.cq_status = cq_status;
    }

    public Long getFaid() {
        return faid;
    }

    public void setFaid(Long faid) {
        this.faid = faid;
    }
}
