package com.ssm.manage.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ssm.manage.entity.BaseProject;
import com.ssm.manage.entity.RepayAccountList;
import com.ssm.manage.extendEntity.AchiCommEntity;
import com.ssm.manage.page.BasePage;
import com.ssm.manage.query.StaffRequest;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

@Setter
@Getter
@ToString
public class RepayTradeResponse {
    @Transient
    private String errorMessage;
    @Column(name = "before_gift_rest_money")
    private BigDecimal beforeGiftRestMoney;
    @Column(name = "back_gift_rest_money")
    private BigDecimal backGiftRestMoney;
    /**
     * 主键ID
     */
    @Id
    private Long id;
    private BaseProject project;

    /**
     * 还款单据号
     */
    @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 = "achievement_amount")
    private BigDecimal achievementAmount;

    /**
     * 现付销售提成
     */
    @Column(name = "commission_amount")
    private BigDecimal commissionAmount;

    /**
     * 卡付销售业绩
     */
    @Column(name = "card_achievement_amount")
    private BigDecimal cardAchievementAmount;

    /**
     * 卡付销售提成
     */
    @Column(name = "card_commission_amount")
    private BigDecimal cardCommissionAmount;

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

    /**
     * 欠款单主键ID
     */
    @Column(name = "debt_id")
    private Long debtId;


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


    private List<AchiCommEntity> entities;
    private List<RepayAccountList> repayAccountListRequests;
}
