package com.xinelu.manage.domain.specialdiseaseroute;

import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Query;
import com.xinelu.common.custominterface.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 专病路径信息对象 special_disease_route
 *
 * @author xinelu
 * @date 2024-03-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "专病路径信息对象", description = "special_disease_route")
public class SpecialDiseaseRoute extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

	/**
	 * 主路径默认为0，子路径存储其对应主路径ID
	 */
	@ApiModelProperty(value = "主路径默认为0，子路径存储其对应主路径ID")
	private Long parentRouteId;

    /**
     * 所属科室id
     */
    @ApiModelProperty(value = "所属科室id")
    @Excel(name = "所属科室id")
    @NotNull(message = "所属科室不能为空", groups = {Insert.class})
    private Long departmentId;

    /**
     * 所属科室名称
     */
    @ApiModelProperty(value = "所属科室名称")
    @Excel(name = "所属科室名称")
    @NotBlank(message = "所属科室不能为空", groups = {Insert.class})
    private String departmentName;

    /**
     * 病种id
     */
    @ApiModelProperty(value = "病种id")
    @Excel(name = "病种id")
    @NotNull(message = "所属病种不能为空", groups = {Insert.class})
    private Long diseaseTypeId;

    /**
     * 病种名称
     */
    @ApiModelProperty(value = "病种名称")
    @Excel(name = "病种名称")
    @NotBlank(message = "所属病种不能为空", groups = {Insert.class})
    private String diseaseTypeName;

    /**
     * 路径名称
     */
    @ApiModelProperty(value = "路径名称")
    @Excel(name = "路径名称")
    @NotBlank(message = "路径名称不能为空", groups = {Insert.class, Update.class})
    private String routeName;

    /**
     * 路径编码
     */
    @ApiModelProperty(value = "路径编码")
    @Excel(name = "路径编码")
    private String routeCode;

    /**
     * 版本号
     */
    @ApiModelProperty(value = "版本号")
    @Excel(name = "版本号")
    @NotBlank(message = "版本号不能为空", groups = {Insert.class, Update.class})
    private String version;

    /**
     * 路径分类，全部：ALL，科室管理路径：DEPARTMENT_MANAGE_PATH，专病管理路径：SPECIAL_DIEASE_MANAGE_PATH
     */
    @ApiModelProperty(value = "路径分类，全部：ALL，科室管理路径：DEPARTMENT_MANAGE_PATH，专病管理路径：SPECIAL_DIEASE_MANAGE_PATH")
    @Excel(name = "路径分类，全部：ALL，科室管理路径：DEPARTMENT_MANAGE_PATH，专病管理路径：SPECIAL_DIEASE_MANAGE_PATH")
    private String routeClassify;

    /**
     * 发布状态，全部：ALL，已发布：PUBLISHED，未发布：UNPUBLISHED
     */
    @ApiModelProperty(value = "发布状态，全部：ALL，已发布：PUBLISHED，未发布：UNPUBLISHED")
    @Excel(name = "发布状态，全部：ALL，已发布：PUBLISHED，未发布：UNPUBLISHED")
    private String releaseStatus;

    /**
     * 适用范围，在院：IN_THE_HOSPITAL，出院：DISCHARGE，门诊：OUTPATIENT_SERVICE，门诊+出院：OUTPATIENT_SERVICE_DISCHARGE
     */
    @ApiModelProperty(value = "适用范围，在院：IN_THE_HOSPITAL，出院：DISCHARGE，门诊：OUTPATIENT_SERVICE，门诊+出院：OUTPATIENT_SERVICE_DISCHARGE")
    @Excel(name = "适用范围，在院：IN_THE_HOSPITAL，出院：DISCHARGE，门诊：OUTPATIENT_SERVICE，门诊+出院：OUTPATIENT_SERVICE_DISCHARGE")
    @NotBlank(message = "适用范围不能为空", groups = {Insert.class, Query.class})
    private String suitRange;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Excel(name = "排序")
    private Integer routeSort;

    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    @Excel(name = "备注信息")
    private String routeRemark;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("departmentId", getDepartmentId())
                .append("departmentName", getDepartmentName())
                .append("diseaseTypeId", getDiseaseTypeId())
                .append("diseaseTypeName", getDiseaseTypeName())
                .append("routeName", getRouteName())
                .append("routeCode", getRouteCode())
                .append("version", getVersion())
                .append("routeClassify", getRouteClassify())
                .append("releaseStatus", getReleaseStatus())
                .append("suitRange", getSuitRange())
                .append("routeSort", getRouteSort())
                .append("routeRemark", getRouteRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
