
package com.tmerclub.cloud.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户表DTO
 *
 * @author YXF
 * @date 2020-12-08 11:18:04
 */
@Data
@ToString
public class UserDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "ID")
    private Long userId;

    @Schema(description = "用户昵称")
    @Length(min = 2, max = 12)
    private String nickName;

    @Schema(description = "M(男) or F(女)")
    @Max(value = 1, message = "性别只能为男，女")
    @Max(value = 0, message = "性别只能为男，女")
    private String sex;

    @Schema(description = "例如：2009-11-27")
    private String birthDate;

    @Schema(description = "头像图片路径")
    private String pic;

    @Schema(description = "状态 1:正常 0:禁用 -1:已注销")
    private Integer status;

    @Schema(description = "会员等级（冗余字段）")
    private Long level;

    @Schema(description = "vip结束时间")
    private Date vipEndTime;

    @Schema(description = "等级条件 0 普通会员 1 付费会员")
    private Integer levelType;

    @Schema(description = "用户付费会员等级 商品个性化推荐 1:开启 0:关闭")
    private Integer prodRecommendation;

}
