package com.ssm.manage.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ssm.manage.entity.BaseProject;
import com.ssm.manage.entity.PayList;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class AbnormalBill {

//    @Getter
//    @Setter
//    private List<PayList> payLists;
    //id
@Transient
@Getter
@Setter
private String errorMessage;
    private Long id;
    @Getter
    @Setter
    private  BaseProject project;


    @Getter
    @Setter
    private List<PayList> payList;

    //状态
    private Integer statu;

    //类型,0=充值，1=疗程开卡，2=收银，3=还款，4=促销,5=加价转疗程
    private Integer type;

    //单据号
    private String docNum;

    //日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date date;

    //是否会员 0=是。1=否
    private Integer ifMember;

    //会员名称
    private String MemberName;

    //会员手机号
    private String mobilePhone;

    //交易的金额
    private BigDecimal money;

    //现付金额
    private BigDecimal cashMoney;

    //欠款
    private BigDecimal debtMoney;

    //门店名称
    private String storeName;

    public Long getId() {
        return id;
    }

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

    public Integer getStatu() {
        return statu;
    }

    public void setStatu(Integer statu) {
        this.statu = statu;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDocNum() {
        return docNum;
    }

    public void setDocNum(String docNum) {
        this.docNum = docNum;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getIfMember() {
        return ifMember;
    }

    public void setIfMember(Integer ifMember) {
        this.ifMember = ifMember;
    }

    public String getMemberName() {
        return MemberName;
    }

    public void setMemberName(String memberName) {
        MemberName = memberName;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public BigDecimal getCashMoney() {
        return cashMoney;
    }

    public void setCashMoney(BigDecimal cashMoney) {
        this.cashMoney = cashMoney;
    }

    public BigDecimal getDebtMoney() {
        return debtMoney;
    }

    public void setDebtMoney(BigDecimal debtMoney) {
        this.debtMoney = debtMoney;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public AbnormalBill(Long id, Integer statu, Integer type, String docNum, Date date, Integer ifMember, String memberName, String mobilePhone, BigDecimal money, BigDecimal cashMoney, BigDecimal debtMoney, String storeName) {
        this.id = id;
        this.statu = statu;
        this.type = type;
        this.docNum = docNum;
        this.date = date;
        this.ifMember = ifMember;
        MemberName = memberName;
        this.mobilePhone = mobilePhone;
        this.money = money;
        this.cashMoney = cashMoney;
        this.debtMoney = debtMoney;
        this.storeName = storeName;
    }

    public AbnormalBill() {
    }
}
