package com.xinelu.manage.domain.hospitalinfo;

import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.common.custominterface.Insert;
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 org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 健康咨询-医院信息对象 hospital_info
 *
 * @author xinyilu
 * @date 2023-02-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "健康咨询-医院信息对象", description = "hospital_info")
public class HospitalInfo extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -8171198728231183571L;

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

    /**
     * 医院名称
     */
    @ApiModelProperty(value = "医院名称")
    @Excel(name = "医院名称")
    @NotBlank(message = "医院名称不能为空", groups = {Insert.class, Update.class})
    @Length(max = 50, message = "医院名称不能超过50位", groups = {Insert.class, Update.class})
    private String hospitalName;

    /**
     * 医院编码
     */
    @ApiModelProperty(value = "医院编码")
    @Excel(name = "医院编码")
    private String hospitalCode;

    /**
     * 医院地址
     */
    @ApiModelProperty(value = "医院地址")
    @Excel(name = "医院地址")
    @Length(max = 300, message = "医院地址不能超过300位", groups = {Insert.class, Update.class})
    private String hospitalAddress;

    /**
     * 联系电话，手机号或者座机
     */
    @ApiModelProperty(value = "联系电话，手机号或者座机")
    @Excel(name = "联系电话，手机号或者座机")
    private String phone;

    /**
     * 医院简介，包含基本信息和医院图片富文本
     */
    @ApiModelProperty(value = "医院简介，包含基本信息和医院图片富文本")
    @Excel(name = "医院简介，包含基本信息和医院图片富文本")
    private String hospitalIntroduce;

    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    @Excel(name = "显示顺序")
    private Integer hospitalSort;

    /**
     * 家医机构编号
     */
    @ApiModelProperty(value = "家医机构编号")
    private String orgCode;

    @ApiModelProperty(value = "医院类型,1:家医机构，2：齐鲁名医机构，3：专病机构")
    private String category;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("hospitalName", getHospitalName())
                .append("hospitalCode", getHospitalCode())
                .append("hospitalAddress", getHospitalAddress())
                .append("phone", getPhone())
                .append("hospitalIntroduce", getHospitalIntroduce())
                .append("hospitalSort", getHospitalSort())
                .append("orgCode", getOrgCode())
                .append("category", getCategory())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
