package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.StoreMemberFile;
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 java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class MemberRequest extends BasePage {
    private String base64;
    private Integer isSignature;
    private Long agreementId;
    private String oldToken;
    private String oldMobilePhone;

    private int memberNumber;
    private Long id;

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

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

    /**
     * 性别：1：男；0：女
     */
    private Integer sex;

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

    /**
     * 入会日期
     */
    @Column(name = "opening_date")
    private Date openingDate;

    /**
     * 缴费年限
     */
    @Column(name = "opening_year")
    private Integer openingYear;

    /**
     * 会员资格结束日期
     */
    @Column(name = "end_date")
    private Date endDate;

    /**
     * 年费
     */
    @Column(name = "annual_fee")
    private BigDecimal annualFee;

    /**
     * 会员标签
     */
    private String label;

    /**
     * 等级
     */
    private String grade;

    /**
     * 1:长/2：适中/3:短
     */
    @Column(name = "hair_long")
    private Integer hairLong;

    /**
     * 1:油性/2：中性/3：干性
     */
    @Column(name = "skin_type")
    private Integer skinType;

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

    /**
     * 状态修改人
     */
    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;

    /**
     * 会员登录密码
     */
    private String password;

    /**
     * 会员消费修改密码1
     */
    @Column(name = "cash_password")
    private String cashPassword;

    /**
     * 会员消费新密码1
     */
    @Column(name = "cash_password")
    private String cashPasswordnew1;
    /**
     * 会员消费新密码2
     */
    @Column(name = "cash_password")
    private String cashPasswordnew2;

    /**
     * 状态 1:启用/0:停用2/启用中
     */
    private Integer state;

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

    /**
     * 总店ID
     */
    private Long storeIdl;

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

    /**
     * 服务人编码（来源于员工档案）
     */
    @Column(name = "staff_id")
    private Long staffId;

    /**
     * 服务人名称（来源于员工档案）
     */
    @Column(name = "staff_name")
    private String staffName;

    /**
     * 分派状态 1:已分派/0:未分派
     */
    @Column(name = "assign_state")
    private Integer assignState;

    private String passCode;
    private String newPassword;
    private String newCashPassword;

    private List<StoreMemberFile> uploadFiles;
    private String oldPhone;
    //时间模糊查询
    private String dateStr;

    private String staffPhone;
    //多门店使用
    private Long[] storeIds;
    private List<Long> storesId;
    /**
     * 关联门店ID
     */
    @Column(name = "conn_store_id")
    private Long connStoreId;

    /**
     * 关联门店名称
     */
    @Column(name = "conn_store_name")
    private String connStoreName;

    /**
     * 注册会员的门店ID
     */
    @Column(name = "member_store_id")
    private Long memberStoreId;


    /**
     * 注册会员的门店编码
     */
    @Column(name = "member_store_num")
    private String memberStoreNum;

    /**
     * 注册会员的门店名称
     */
    @Column(name = "member_store_name")
    private String memberStoreName;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 是否导出会员手机号码和密码信息，0=是，1=否
     */
    private Integer isMessage;
    /***
     * 会员私密信息导出总店验证码
     */
    private String code;

    /**
     * 存在代表团购新增会员
     */
    private String grouptype;

    /**
     * 0=月度，1=半年度，2=一年度
     */
    @Column(name = "statistics_quarter")
    private Integer statisticsQuarter;

    /***
     * 会员修改支付密码验证码
     */
    private String codeMsg;

    /***
     * 会员名称和手机号码查询
     */
    private String slectPhoneName;


    private Integer type;

    /***
     * 1为指定会员，排除赠卡的
     */
    private Integer isDesignatedMember;
}
