package com.yongqi.xinrenli.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 微信用户业务对象 db_wx_user
 *
 * @author zyf
 * @date 2023-03-09
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class DbWxUserBo extends BaseEntity {

    /**
     * 主键标识
     */
    @NotNull(message = "主键标识不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 微信用户的唯一标识
     */
    @NotBlank(message = "微信用户的唯一标识不能为空", groups = {AddGroup.class, EditGroup.class})
    private String openId;

    /**
     * 是否是团长：1：是，2：否
     */
    @NotNull(message = "是否是团长：1：是，2：否不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer headOrNot;

    /**
     * 用户昵称
     */
    @NotBlank(message = "用户昵称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String nickname;

    /**
     * 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知
     */
    @NotNull(message = "用户的性别，值为1时是男性，值为2时是女性，值为0时是未知不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer sex;

    /**
     * 用户个人资料填写的省份
     */
    @NotBlank(message = "用户个人资料填写的省份不能为空", groups = {AddGroup.class, EditGroup.class})
    private String province;

    /**
     * 普通用户个人资料填写的城市
     */
    @NotBlank(message = "普通用户个人资料填写的城市不能为空", groups = {AddGroup.class, EditGroup.class})
    private String city;

    /**
     * 国家，如中国为CN
     */
    @NotBlank(message = "国家，如中国为CN不能为空", groups = {AddGroup.class, EditGroup.class})
    private String country;

    /**
     * 用户头像
     */
    @NotBlank(message = "用户头像不能为空", groups = {AddGroup.class, EditGroup.class})
    private String headImgUrl;

    /**
     * 只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段。
     */
    @NotBlank(message = "只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段。不能为空", groups = {AddGroup.class, EditGroup.class})
    private String unionId;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String mobile;

    /**
     * 授权手机号
     */
    @NotBlank(message = "授权手机号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String authMobile;

    /**
     * 商场编码
     */
    @NotBlank(message = "商场编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String mallCode;

    /**
     * 会员卡号
     */
    @NotBlank(message = "会员卡号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String userCode;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sessionKey;

    /**
     * 是否关注微信(1:关注，0：取消关注)
     */
    @NotNull(message = "是否关注微信(1:关注，0：取消关注)不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer wechatSubscribe;

    /**
     * 是否取消关注(关注后又取消，和oauth取得的会员区别)(1:取消，0：未取消)
     */
    @NotNull(message = "是否取消关注(关注后又取消，和oauth取得的会员区别)(1:取消，0：未取消)不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer cancelSubscribe;

    /**
     * 微信原始ID
     */
    @NotBlank(message = "微信原始ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String wechatOriginalId;

    /**
     * 下单次数
     */
    @NotNull(message = "下单次数不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long orderNum;

    /**
     * 累计消费
     */
    @NotNull(message = "累计消费不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal cumulativeConsumption;

    /**
     * 最近消费时间
     */
    @NotNull(message = "最近消费时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date lastConsumptionTime;

    /**
     * 创建人Code
     */
    @NotBlank(message = "创建人Code不能为空", groups = {AddGroup.class, EditGroup.class})
    private String createCode;

    /**
     * 更新时间
     */
    @NotNull(message = "更新时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date modifyTime;

    /**
     * 更新者
     */
    @NotBlank(message = "更新者不能为空", groups = {AddGroup.class, EditGroup.class})
    private String modifyBy;

    /**
     * 更新者code
     */
    @NotBlank(message = "更新者code不能为空", groups = {AddGroup.class, EditGroup.class})
    private String modifyCode;

    /**
     * 删除状态  0：未删除 1：删除
     */
    @NotNull(message = "删除状态  0：未删除 1：删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer deleteFlag;


}
