package thyyxxk.webserver.entity.zhuyuanyisheng.patientClinicalPathway.dto;

import java.io.Serializable;

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

import java.util.Date;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.format.annotation.DateTimeFormat;

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

    private static final long serialVersionUID = 5489734736227715885L;

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

    /**
     * 天数id
     */
    @TableField(value = "day_id")
    private String dayId;

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

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

    /**
     * 住院号
     */
    @TableField(value = "pat_no")
    private String patNo;

    /**
     * 住院次数
     */
    @TableField(value = "times")
    private Integer times;

    /**
     * 0-入径 1-出径 2-变异 3-完成
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 描述
     */
    @TableField(value = "describe")
    private String describe;

    /**
     * 模板id
     */
    @TableField(value = "template_id")
    private String templateId;

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

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

    /**
     * 执行时间  yyyy-MM-dd
     */
    @TableField(value = "exec_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date execDate;

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

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


}
