package com.test.bijihoudaun.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(name = "用户实体")
@TableName("user")
public class User {
    @Schema(description = "用户id",implementation = Long.class)
    @TableId(type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 仅作用于此字段
    private Long id;
    @Schema(description = "用户名",implementation = String.class)
    private String username;
    @Schema(description = "密码",implementation = String.class)
    private String password;
    @Schema(description = "邮箱",implementation = String.class)
    private String email;
    @Schema(description = "用户创建时间",implementation = Date.class)
    private Date createdAt;
    @Schema(description = "用户更新时间",implementation = Date.class)
    private Date updatedAt;
    @Schema(description = "用户token",implementation = String.class)
    private String token;
    @Schema(description = "用户token过期时间",implementation = Date.class)
    private Date tokenEnddata;
}
