package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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 DebtListRequest extends BasePage {
    /**
     * 主键ID
     */
    @Id
    private Long id;

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

    private Long stId;
    /**
     * 门店名称
     */
    @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;

    /**
     * 欠款单录入时间
     */
    @Column(name = "doc_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date docDate;


    /**
     * 欠款单交易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 = "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;

    /**
     * 0:未还款/1:已还款
     */
    private Integer state;

    /**
     * 还款剩余次数添加
     */
    @Column(name = "repay_count")
    private Integer repayCount;

    /**
     * 还款剩余可用次数添加
     */
    @Column(name = "repay_consume_count")
    private Integer repayConsumeCount;


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

    /**
     * 还款剩余可用金额添加
     */
    @Column(name = "repay_consume_money")
    private BigDecimal repayConsumeMoney;

    //业务员列表
    private List<StaffRequest> staffLists;
    private List<Long> ids;

    private List<Long> storeList;


    /**
     * 查询方式，0=指定查询，1=自动查询
     */
    private Integer selectType;
}
