package com.xinelu.manage.domain.nursestationlabel;

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

/**
 * 护理站标签信息对象 nurse_station_label
 *
 * @author 纪寒
 * @date 2022-09-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "护理站标签信息对象", description = "nurse_station_label")
public class NurseStationLabel extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 385185619581249467L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 护理站主表id
     */
    @ApiModelProperty(value = "护理站主表id")
    @Excel(name = "护理站主表id")
    private Long nurseStationId;

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

    /**
     * 标签编码
     */
    @ApiModelProperty(value = "标签编码")
    @Excel(name = "标签编码")
    private String labelCode;

    /**
     * 护理站标签描述
     */
    @ApiModelProperty(value = "护理站标签描述")
    @Excel(name = "护理站标签描述")
    @NotBlank(message = "护理站标签描述不能为空", groups = {Insert.class, Update.class})
    private String labelDescription;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Excel(name = "排序")
    @NotNull(message = "护理站标签排序不能为空", groups = {Insert.class, Update.class})
    private Integer sort;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nurseStationId", getNurseStationId())
                .append("userId", getUserId())
                .append("labelCode", getLabelCode())
                .append("labelDescription", getLabelDescription())
                .append("sort", getSort())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
