package com.xinelu.manage.domain.nursestation;


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 javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalTime;


/**
 * 护理站信息对象 nurse_station
 *
 * @author ljh
 * @date 2022-09-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "护理站信息对象", description = "nurse_station")
public class NurseStation extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -6786694820814666195L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 所属区域编码
     */
    @ApiModelProperty(value = "所属区域编码")
    @Excel(name = "所属区域编码")
    @NotBlank(message = "所属区域编码不能为空", groups = {Insert.class, Update.class})
    private String areaCode;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @Excel(name = "创建人id")
    private Long userId;

    /**
     * 护理站编号
     */
    @ApiModelProperty(value = "护理站编号")
    @Excel(name = "护理站编号")
    private String nurseStationCode;

    /**
     * 护理站名称
     */
    @ApiModelProperty(value = "护理站名称")
    @Excel(name = "护理站名称")
    @Length(max = 100, message = "护理站名称不能超过100个字符", groups = {Insert.class, Update.class})
    @NotBlank(message = "护理站名称不能为空", groups = {Insert.class, Update.class})
    private String nurseStationName;

    /**
     * 护理类型，多个用逗号隔开
     */
    @ApiModelProperty(value = "护理类型，多个用逗号隔开")
    @Excel(name = "护理类型，多个用逗号隔开")
    @Length(max = 200, message = "护理类型不能超过200个字符", groups = {Insert.class, Update.class})
    private String nurseStationType;

    /**
     * 护理站简介
     */
    @ApiModelProperty(value = "护理站简介")
    @Excel(name = "护理站简介")
    @NotBlank(message = "护理站简介不能为空", groups = {Insert.class, Update.class})
    private String agencyIntroduce;

    /**
     * 护理站信息总概述
     */
    @ApiModelProperty(value = "护理站信息总概述")
    @Excel(name = "护理站信息总概述")
    @Length(max = 200, message = "护理站信息总概述不能超过200个字符", groups = {Insert.class, Update.class})
    @NotBlank(message = "护理站信息总概述不能为空", groups = {Insert.class, Update.class})
    private String nurseStationDescription;

    /**
     * 护理站经纬（横坐标）
     */
    @ApiModelProperty(value = "护理站经纬")
    @Excel(name = "护理站经纬", readConverterExp = "横=坐标")
    @NotBlank(message = "护理站经度不能为空", groups = {Insert.class, Update.class})
    private String longitude;

    /**
     * 护理站纬度（纵坐标）
     */
    @ApiModelProperty(value = "护理站纬度")
    @Excel(name = "护理站纬度", readConverterExp = "纵=坐标")
    @NotBlank(message = "护理站纬度不能为空", groups = {Insert.class, Update.class})
    private String latitude;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @Excel(name = "联系电话")
    @Length(max = 11, message = "联系电话不能超过11个字符", groups = {Insert.class, Update.class})
    @NotBlank(message = "联系电话不能为空", groups = {Insert.class, Update.class})
    private String phone;

    /**
     * 护理站地址
     */
    @ApiModelProperty(value = "护理站地址")
    @Excel(name = "护理站地址")
    @Length(max = 100, message = "护理站地址不能超过100个字符", groups = {Insert.class, Update.class})
    @NotBlank(message = "护理站地址不能为空", groups = {Insert.class, Update.class})
    private String address;

    /**
     * 负责人
     */
    @ApiModelProperty(value = "负责人")
    @Excel(name = "负责人")
    @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Insert.class, Update.class})
    private String dutyPerson;

    /**
     * 负责人联系电话
     */
    @ApiModelProperty(value = "负责人联系电话")
    @Excel(name = "负责人联系电话")
    @Length(max = 11, message = "负责人联系电话不能超过11个字符", groups = {Insert.class, Update.class})
    private String dutyPhone;

    /**
     * 护理站图片路径
     */
    @ApiModelProperty(value = "护理站图片路径")
    @Excel(name = "护理站图片路径")
    private String stationPictureUrl;

    /**
     * 护理站简介图片路径
     */
    @ApiModelProperty(value = "护理站简介图片路径")
    @Excel(name = "护理站简介图片路径")
    private String stationIntroducePictureUrl;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Excel(name = "排序")
    @NotNull(message = "排序不能为空", groups = {Insert.class, Update.class})
    @Size(min = 0, max = 5, message = "排序不能超过5个字符")
    private Integer sort;

    /**
     * 护理站等级，数字代表几个星
     */
    @ApiModelProperty(value = "护理站等级，数字代表几个星")
    @Excel(name = "护理站等级，数字代表几个星")
    private Integer nurseGrade;

    /**
     * 营业概述
     */
    @ApiModelProperty(value = "营业概述")
    @Excel(name = "营业概述")
    private String openingHoursDescribe;

    /**
     * 上午营业开始时间，格式：HH:mm:ss
     */
    private LocalTime morningOpenStartTime;

    /**
     * 上午营业结束时间，格式：HH:mm:ss
     */
    private LocalTime morningOpenEndTime;

    /**
     * 下午营业开始时间，格式：MM:dd
     */
    private LocalTime afternoonOpenStartTime;

    /**
     * 下午营业结束时间，格式：MM:dd
     */
    private LocalTime afternoonOpenEndTime;

    /**
     * 护理机构微信二维码图片存放地址
     */
    private String stationWechatCodeUrl;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("areaCode", getAreaCode())
                .append("userId", getUserId())
                .append("nurseStationCode", getNurseStationCode())
                .append("nurseStationName", getNurseStationName())
                .append("nurseStationType", getNurseStationType())
                .append("agencyIntroduce", getAgencyIntroduce())
                .append("nurseStationDescription", getNurseStationDescription())
                .append("longitude", getLongitude())
                .append("latitude", getLatitude())
                .append("phone", getPhone())
                .append("address", getAddress())
                .append("dutyPerson", getDutyPerson())
                .append("dutyPhone", getDutyPhone())
                .append("stationPictureUrl", getStationPictureUrl())
                .append("stationIntroducePictureUrl", getStationIntroducePictureUrl())
                .append("sort", getSort())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
