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_management_details_like")
public class CoreAtlasManagementDetailsLike implements Serializable {

    private static final long serialVersionUID = -1299929244164708913L;

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

    /**
     * 对应的图集中图片或视频id
     */
    private Long coreAtlasManagementDetailsId;

    /**
     * 唯一标识：用于取消点赞操作
     */
    private String mark;

    /**
     * 创建时间
     */
    @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;

    /**
     * 最后修改时间
     */
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 删除标识. 0: 未删除, 1: 已删除
     */
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

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

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

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