package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.PayList;
import com.ssm.manage.entity.Salesman;
import com.ssm.manage.page.BasePage;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class RepayTradeRequest extends BasePage {
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    private List<PayList>  payLists;

    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 还款单据号
     */
    @Column(name = "repay_num")
    private String repayNum;

    /**
     * 门店编码
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 会员编码
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity_card")
    private String memberIdentityCard;

    /**
     * 手机
     */
    @Column(name = "mobile_phone")
    private String mobilePhone;

    /**
     * 欠款单ID
     */
    @Column(name = "doc_id")
    private Long docId;

    /**
     * 欠款单据号
     */
    @Column(name = "doc_num")
    private String docNum;

    /**
     * 欠款单类别
     */
    @Column(name = "doc_type")
    private String docType;

    /**
     * 欠款单交易ID
     */
    @Column(name = "trade_id")
    private Long tradeId;

    /**
     * 欠款单交易名称
     */
    @Column(name = "trade_name")
    private String tradeName;

    /**
     * 欠款单交易单价
     */
    @Column(name = "trade_money")
    private BigDecimal tradeMoney;

    /**
     * 欠款单交易欠款金额
     */
    @Column(name = "debt_money")
    private BigDecimal debtMoney;

    /**
     * 还款日期
     */
    @Column(name = "repay_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date repayDate;

    /**
     * 还款金额
     */
    @Column(name = "repay_money")
    private BigDecimal repayMoney;

    /**
     * 支付金额
     */
    @Column(name = "pay_money")
    private BigDecimal payMoney;

    /**
     * 疗程现付销售业绩标准
     */
    @Column(name = "sales_achievement")
    private BigDecimal salesAchievement;

    /**
     * 疗程现付销售提成标准
     */
    @Column(name = "sales_commission")
    private BigDecimal salesCommission;

    /**
     * 疗程卡付销售业绩标准
     */
    @Column(name = "card_sales_achievement")
    private BigDecimal cardSalesAchievement;

    /**
     * 疗程卡付销售提成标准
     */
    @Column(name = "card_sales_commission")
    private BigDecimal cardSalesCommission;

    /**
     * 充值提成比率
     */
    @Column(name = "type_ratio")
    private BigDecimal typeRatio;


    /**
     * 门店高管编码
     */
    @Column(name = "manage_staff_id")
    private Long manageStaffId;

    /**
     * 门店高管名称
     */
    @Column(name = "manage_staff_name")
    private String manageStaffName;

    /**
     * 门店高管身份证号
     */
    @Column(name = "manage_identity")
    private String manageIdentity;

    /**
     * 门店高管水牌号
     */
    @Column(name = "manage_number")
    private String manageNumber;

    /**
     * 账户ID
     */
    @Column(name = "account_id")
    private Long accountId;

    /**
     * 支付金额
     */
    @Column(name = "pay_recharge_money")
    private BigDecimal payRechargeMoney;

    /*
    * 欠款单据表主键ID
    * */
    private Long debtId;

    private List<StaffRequest> staffRequests;
    private List<RepayAccountListRequest> repayAccountListRequests;
    private List<Salesman> salesmens;
    /**
     * 取消前单价
     */
    @Column(name = "before_price")
    private BigDecimal beforePrice;
    /**
     * 取消前剩余金额
     */
    @Column(name = "before_rest_money")
    private BigDecimal beforeRestMoney;
    /**
     * 取消前可用金额
     */
    @Column(name = "before_consume_money")
    private BigDecimal beforeConsumeMoney;

    /**
     * 取消前剩余赠送金额
     */
    @Column(name = "before_gift_consume_money")
    private BigDecimal beforeGiftConsumeMoney;

    /**
     * 取消前可用赠送金额
     */
    @Column(name = "before_gift_rest_money")
    private BigDecimal beforeGiftRestMoney;

    /**
     * 取消前剩余次数
     */
    @Column(name = "before_rest_count")
    private Integer  beforeRestCount;
    /**
     * 取消前可用次数
     */
    @Column(name = "before_consume_count")
    private Integer beforeConsumeCount;


    /**
     * 取消后单价
     */
    @Column(name = "back_price")
    private BigDecimal backPrice;
    /**
     * 取消后剩余金额
     */
    @Column(name = "back_rest_money")
    private BigDecimal backRestMoney;
    /**
     * 取消后可用金额
     */
    @Column(name = "back_consume_money")
    private BigDecimal backConsumeMoney;


    /**
     * 取消前剩余赠送金额
     */
    @Column(name = "back_gift_consume_money")
    private BigDecimal backGiftConsumeMoney;

    /**
     * 取消前可用赠送金额
     */
    @Column(name = "back_gift_rest_money")
    private BigDecimal backGiftRestMoney;

    /**
     * 取消后剩余次数
     */
    @Column(name = "back_rest_count")
    private Integer  backRestCount;
    /**
     * 取消后可用次数
     */
    @Column(name = "back_consume_count")
    private Integer backConsumeCount;

    private BigDecimal courseMoney;

}
