package com.ssm.manage.response;

import com.alibaba.excel.annotation.ExcelProperty;
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;

@Setter
@Getter
@ToString
public class MemberInitResponse {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 初始化单据号
     */
    @Column(name = "init_num")
    private String initNum;

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

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

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

    /**
     * 会员编码
     */
    @Column(name = "member_num")
    @ExcelProperty("会员编码")
    private String memberNum;

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

    /**
     * 性别：1：男；0：女
     */
    @ExcelProperty("性别")
    private Integer sex;

    /**
     * 状态 1:启用/0:停用2/启用中
     */
    @Column(name = "member_state")
    private Integer memberState;

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

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

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

    /**
     * 标准金额
     */
    @Column(name = "standard_money")
    @ExcelProperty("标准金额")
    private BigDecimal standardMoney;

    /**
     * 标准次数
     */
    @Column(name = "standard_count")
    @ExcelProperty("标准次数")
    private Integer standardCount;

    /**
     * 最近消费日期
     */
    @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 = "doc_num")
    @ExcelProperty("单据号")
    private String docNum;

    /**
     * 单据交易时间
     */
    @Column(name = "doc_date")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty("单据交易时间")
    private Date docDate;

    /**
     * 类别 0:充值1:疗程
     */
    @Column(name = "card_type")
    @ExcelProperty("账户类别")
    private Integer cardType;

    /**
     * 0:锁定/1:正常
     */
    @Column(name = "card_state")
    @ExcelProperty("账户状态")
    private Integer cardState;

    /**
     * 账户剩余金额
     */
    @Column(name = "rest_money")
    @ExcelProperty("账户剩余金额")
    private BigDecimal restMoney;

    /**
     * 开卡剩余次数
     */
    @Column(name = "rest_count")
    @ExcelProperty("账户剩余次数")
    private Integer restCount;

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

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

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

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

    /**
     * 开卡可用次数
     */
    @Column(name = "course_consume_count")
    @ExcelProperty("账户可用次数")
    private Integer courseConsumeCount;

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

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

    /**
     * 账户到期时间
     */
    @Column(name = "end_time")
    @ExcelProperty("账户到期时间")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

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

    /**
     * 初始化记录状态0:封存删除1:插入2:异常3:正常4:已初始化
     */
    @Column(name = "init_state")
    private Integer initState;

    /**
     * 最后修改人ID
     */
    @Column(name = "modify_id")
    private Long modifyId;

    /**
     * 最后修改人名称
     */
    @Column(name = "modify_by")
    private String modifyBy;

    /**
     * 最后修改时间
     */
    @Column(name = "modify_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifyDate;


    /**
     * 原项目充值类别编码
     */
    @Column(name = "old_project_num")
    private String oldProjectNum;

    /**
     * 原项目充值类别名称
     */
    @Column(name = "old_project_name")
    private String oldProjectName;
    /**
     * 原项目充值类别名称
     */
    @Column(name = "remark")
    private String remark;


    //异常单原因
    private String unusualReason;

    private static final long serialVersionUID = 1L;

}