package com.ssm.manage.query;

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 lombok.experimental.FieldNameConstants;
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)
@FieldNameConstants
public class CourseAccountRequest extends BasePage {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    private Long ifstorid;

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

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

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

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

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

    /**
     * 开卡单号
     */
    @Column(name = "course_num")
    private String courseNum;

    /**
     * 开卡疗程ID
     */
    @Column(name = "course_project_id")
    private Long courseProjectId;

    /**
     * 开卡疗程名称
     */
    @Column(name = "course_project_name")
    private String courseProjectName;

    /**
     * 开卡疗程金额
     */
    @Column(name = "course_project_money")
    private BigDecimal courseProjectMoney;

    /**
     * 开卡疗程次数
     */
    @Column(name = "course_count")
    private Integer courseCount;


    /**
     * 开卡标准次数
     */
    @Column(name = "course_standard_count")
    private Integer courseStandardCount;

    /**
     * 开卡标准金额
     */
    @Column(name = "course_standard_money")
    private BigDecimal courseStandardMoney;

    /**
     * 最近消费时间
     */
    @Column(name = "last_consume_time")
    private Date lastConsumeTime;

    /**
     * 开卡剩余次数
     */
    @Column(name = "course_rest_count")
    private Integer courseRestCount;

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

    /**
     * 账户类型
     */
    @Column(name = "course_type")
    private String courseType;

    private List<String> courseTypes;

    private Integer state;

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


    /**
     * 修改时间
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 修改时间
     */
    @Column(name = "course_rest_price")
    private BigDecimal courseRestPrice;

    /**
     * 修改时间
     */
    @Column(name = "course_consume_price")
    private BigDecimal courseConsumePrice;

    private String staffPhone;

    private List<Long> storeIds;



    /**
     * 开卡疗程金额
     */
    @Column(name = "course_project_moneys")
    @ExcelProperty("开卡疗程金额*")
    private BigDecimal courseProjectMoneys;

    /**
     * 开卡疗程次数
     */
    @Column(name = "course_counts")
    @ExcelProperty("开卡疗程次数*")
    private Integer courseCounts;

    /**
     * 开卡疗程次数
     */
    @Column(name = "promotion_doc_id")
    private Long promotionDocId;
}
