package me.qwq.doghouse.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import me.qwq.doghouse.enums.LinkTypeEnum;

/**
 * 友链
 * @author Doghole
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Link implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 友链表主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 友链类别
     */
    @TableField
    private LinkTypeEnum type;

    /**
     * 网站名称
     */
    @TableField
    private String name;

    /**
     * 网站链接
     */
    @TableField
    private String url;

    /**
     * 网站描述
     */
    @TableField
    private String description;
    
    /**
     * 用于列表排序
     */
    @TableField
    private Integer health;

    /**
     * 是否删除 0-未删除 1-已删除
     */
    @TableField
    private Boolean isDeleted;
    
    /**
     * 有效性检测
     */
    @TableField
    private Boolean detect;

    /**
     * 添加时间
     */
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 
    private LocalDateTime createTime;
    
    /**
     * 检测时间
     */
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 
    private LocalDateTime detectiveTime;


}
