package com.xinelu.manage.domain.nursestationitem;

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;

/**
 * 护理站护理项目对象 nurse_station_item
 *
 * @author ljh
 * @date 2022-09-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "护理站护理项目对象", description = "nurse_station_item")
public class NurseStationItem extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -50387461159185746L;
    /**
     * 主键id
     */
    @NotNull(message = "请选择护理站护理项目对象", groups = {Update.class})
    private Long id;

    /**
     * 护理站信息表id
     */
    @ApiModelProperty(value = "护理站信息表id")
    @Excel(name = "护理站信息表id")
    @NotNull(message = "所属护理站不能为空", groups = {Insert.class, Update.class})
    private Long nurseStationId;

    /**
     * 护理类型表id
     */
    @ApiModelProperty(value = "护理类型表id")
    @Excel(name = "护理类型表id")
    private Long nurseTypeId;

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

    /**
     * 护理项目编号
     */
    @ApiModelProperty(value = "护理项目编号")
    @Excel(name = "护理项目编号")
    private String nurseItemCode;

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

    /**
     * 护理项目内容简介
     */
    @ApiModelProperty(value = "护理项目内容简介")
    @Excel(name = "护理项目内容简介")
    @NotNull(message = "护理项目内容简介不能为空", groups = {Insert.class, Update.class})
    private String nurseItemContent;

    /**
     * 提前预约时长，单位小时
     */
    @ApiModelProperty(value = "提前预约时长，单位小时")
    @Excel(name = "提前预约时长，单位小时")
    private String advanceAppointDuration;

    /**
     * 护理项目图片地址
     */
    @ApiModelProperty(value = "护理项目图片地址")
    @Excel(name = "护理项目图片地址")
    @NotNull(message = "护理项目图片地址不能为空", groups = {Insert.class, Update.class})
    @Length(max = 300, message = "护理项目图片地址不能超过300个字符", groups = {Insert.class, Update.class})
    private String itemPictureUrl;

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

    /**
     * 护理项目所属分类id`
     */
    @ApiModelProperty(value = "护理项目所属分类id")
    @Excel(name = "护理项目所属分类id")
    private Long nurseClassifyId;

    /**
     * 护理项目每个时间点的预约人数上限
     */
    @ApiModelProperty(value = "护理项目每个时间点的预约人数上限")
    @Excel(name = "护理项目每个时间点的预约人数上限")
    @Size(min = 0, max = 8, message = "护理项目每个时间点的预约人数上限长度不能超过8个字符")
    private Integer appointmentLimitCount;

    /**
     * 护理项目预约时间点间隔 半小时：HALF_HOUR，一小时：ONE_HOUR，九十分钟：NINETY_MINUTES，两小时：TWO_HOUR
     */
    @ApiModelProperty(value = "护理项目预约时间点间隔")
    @Excel(name = "护理项目预约时间点间隔")
    @NotBlank(message = "护理项目预约时间点间隔不能为空", groups = {Insert.class, Update.class})
    private String appointmentTimeInterval;

    /**
     * 护理项目所属分类名称
     */
    @ApiModelProperty(value = "护理项目所属分类名称")
    @Excel(name = "护理项目所属分类名称")
    private String nurseClassifyName;

    /**
     * 上架状态，NOT_SHELF：未上架，SHELF：已上架
     */
    private String shelfStatus;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nurseStationId", getNurseStationId())
                .append("nurseTypeId", getNurseTypeId())
                .append("userId", getUserId())
                .append("nurseItemCode", getNurseItemCode())
                .append("nurseItemName", getNurseItemName())
                .append("nurseItemContent", getNurseItemContent())
                .append("advanceAppointDuration", getAdvanceAppointDuration())
                .append("itemPictureUrl", getItemPictureUrl())
                .append("sort", getSort())
                .append("nurseClassifyId", getNurseClassifyId())
                .append("appointmentLimitCount", getAppointmentLimitCount())
                .append("appointmentTimeInterval", getAppointmentTimeInterval())
                .append("nurseClassifyName", getNurseClassifyName())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
