package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.RechargeAccountGive;
import com.ssm.manage.entity.RefundRecharge;
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 RefundRechargeRequest extends BasePage {
    /**
     * 主键ID
     */
    @Id
    private Long id;
    private String strDate;
    private List<Long> storeIds;

    /**
     * 退款单据号
     */
    @Column(name = "refund_num")
    private String refundNum;

    /**
     * 退款单据时间
     */
    @Column(name = "refund_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundDate;

    /**
     * 门店编码
     */
    @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;

    /**
     * 会员卡
     */
    private String card;

    /**
     * 卡充值单据号
     */
    @Column(name = "recharge_num")
    private String rechargeNum;

    /**
     * 充值赠送退款金额
     */
    @Column(name = "refund_gift_money")
    private BigDecimal refundGiftMoney;

    /**
     * 充值类别ID
     */
    @Column(name = "recharge_type_id")
    private Long rechargeTypeId;

    /**
     * 充值类别名称
     */
    @Column(name = "recharge_type_name")
    private String rechargeTypeName;

    /**
     * 标准充值金额
     */
    @Column(name = "card_recharge_money")
    private BigDecimal cardRechargeMoney;

    /**
     * 账户剩余金额
     */
    @Column(name = "card_rest_money")
    private BigDecimal cardRestMoney;

    /**
     * 赠送卡赠送金额
     */
    @Column(name = "card_gift_money")
    private BigDecimal cardGiftMoney;

    /**
     * 类别 1:折扣卡类型/0:赠送卡类型
     */
    private Integer type;

    /**
     * 享受优惠
     */
    private BigDecimal discount;

    /**
     * 最近消费时间
     */
    @Column(name = "last_consume_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastConsumeTime;

    /**
     * 账户可用金额
     */
    @Column(name = "card_consume_money")
    private BigDecimal cardConsumeMoney;

    /**
     * 赠送卡可用金额
     */
    @Column(name = "gift_consume_money")
    private BigDecimal giftConsumeMoney;

    /**
     * 充值退款金额
     */
    @Column(name = "rec_refund_money")
    private BigDecimal recRefundMoney;

    /**
     * 充值赔偿金额
     */
    @Column(name = "rec_compensation")
    private BigDecimal recCompensation;

    /**
     * 充值账户ID
     */
    @Column(name = "rec_account_id")
    private Long recAccountId;

    /**
     * 门店高管编码
     */
    @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;


    /**
     * 申请退款金额
     */
    @Column(name = "refund_amount")
    private BigDecimal refundAmount;


    /**
     * 赠送申请退款金额
     */
    @Column(name = "refund_gift_amount")
    private BigDecimal refundGiftAmount;

    private List<StaffRequest> staffLists;

    private List<Salesman> salesmens;

    private Long refundOrderId;

    private List<String> docTypes;
    private List<RechargeAccountGive> rechargeAccountGiveList;
    private List<RefundRecharge> refundRechargeList;
}
