package com.yida.data.common.core.entity.atlas;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 图集访问记录表
 *
 * @author ZYJ
 * @date 2021/9/1
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("core_atlas_access_records")
public class CoreAtlasAccessRecords implements Serializable {

    private static final long serialVersionUID = 2820031240944928294L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 访问时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 删除标记：0正常，1删除
     */
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 对应的图集id
     */
    private Long coreAtlasManagementId;

    /**
     * 访问的用户id
     */
    private Long userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 用户昵称
     */
    private String nickName;
}