package com.keyware.shandan.bianmu.entity;

import com.baomidou.mybatisplus.annotation.OrderBy;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.keyware.shandan.bianmu.enums.ReviewStatus;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@TableName("V_DIRECTORY_RESOURCE")
public class DirectoryResource implements Serializable {
    /**
     * 主键
     */
    @TableField("ID")
    private String id;
    /**
     * 目录ID
     */
    @TableField("DIRECTORY_ID")
    private String directoryId;
    /**
     * 父级目录ID
     */
    @TableField("PARENT_ID")
    private String parentId;
    /**
     * 目录路径
     */
    @TableField(value = "DIRECTORY_PATH", condition = SqlCondition.LIKE_RIGHT)
    @OrderBy(isDesc = false, sort = 1)
    private String directoryPath;
    /**
     * 资源名称
     */
    @TableField(value = "RESOURCE_NAME", condition = SqlCondition.LIKE)
    @OrderBy(isDesc = false, sort = 2)
    private String resourceName;
    /**
     * 资源注释
     */
    @TableField(value = "RESOURCE_COMMENT", condition = SqlCondition.LIKE)
    private String resourceComment;
    /**
     * 资源类型
     */
    @TableField("RESOURCE_TYPE")
    private String resourceType;
    /**
     * 主题任务
     */
    @TableField("THEME_TASK")
    private String themeTask;
    /**
     * 数据来源
     */
    @TableField("DATA_SOURCE")
    private String dataSource;
    /**
     * 任务时间
     */
    @TableField("TASK_TIME")
    private Date taskTime;
    /**
     * 数据类型
     */
    @TableField("DATA_TYPE")
    private String dataType;
    /**
     * 数据密级
     */
    @TableField("SECRET_LEVEL")
    private String secretLevel;
    /**
     * 审核状态
     */
    @TableField("REVIEW_STATUS")
    private ReviewStatus reviewStatus;

    @TableField("MODIFY_TIME")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    @TableField("MODIFY_USER")
    private String modifyUser;

    @TableField(exist = false)
    private boolean hasMark;

    @TableField(exist = false)
    private boolean read;

    @TableField(exist = false)
    private boolean write;
}
