package thyyxxk.webserver.entity.zhuyuanyisheng.emr;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "emr_folder")
public class EmrFolder implements Serializable {

    private static final long serialVersionUID = 6280341928420491484L;

    /**
     * id
     */
    @TableId
    private String id;

    /**
     * 文件夹名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 父级id
     */
    @TableField(value = "parent")
    private String parent;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 这个文件夹是住院还是门诊还是其他系统使用
     */
    @TableField(value = "folder_name")
    private String folderName;

    /**
     * delFlag
     */
    @TableLogic
    private Boolean delFlag;

    /**
     * createTime
     */
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private Date createTime;

    /**
     * createCode
     */
    @TableField(fill = FieldFill.INSERT, value = "create_code")
    private String createCode;

    /**
     * updateTime
     */
    @TableField(fill = FieldFill.UPDATE, value = "update_time")
    private Date updateTime;

    /**
     * updateCode
     */
    @TableField(fill = FieldFill.UPDATE, value = "update_code")
    private String updateCode;

    @TableField(exist = false)
    private List<Object> children;

    public String get_id() {
        return id;
    }

    public String getType() {
        return "group-category";
    }

    public static LambdaQueryWrapper<EmrFolder> lambdaQueryWrapper() {
        return new LambdaQueryWrapper<>();
    }

    public static QueryWrapper<EmrFolder> queryWrapper() {
        return new QueryWrapper<>();
    }

}
