package com.xinelu.manage.domain.nursestationItemconsumable;


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.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 护理站护理项目耗材关系对象 nurse_station_item_consumable
 *
 * @author 纪寒
 * @date 2022-09-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "护理站护理项目耗材关系对象", description = "nurse_station_item_consumable")
public class NurseStationItemConsumable extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -8964840167749631395L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 护理站护理项目表id
     */
    @ApiModelProperty(value = "护理站护理项目表id")
    @Excel(name = "护理站护理项目表id")
    @NotNull(message = "护理站护理项目表id不能为空", groups = {Update.class})
    private Long nurseStationItemId;

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

    /**
     * 耗材包详情
     */
    @ApiModelProperty(value = "耗材包详情")
    @Excel(name = "耗材包详情")
    @NotNull(message = "耗材包详情不能为空", groups = {Insert.class, Update.class})
    @Length(max = 100, message = "耗材包详情名称不能超过100位", groups = {Insert.class, Update.class})
    private String consumableDetail;


    /**
     * 耗材单位
     */
    @ApiModelProperty(value = "耗材单位")
    @Excel(name = "耗材单位")
    @NotNull(message = "耗材单位不能为空", groups = {Insert.class, Update.class})
    @Length(max = 10, message = "耗材单位名称不能超过10位", groups = {Insert.class, Update.class})
    private String consumableUnit;

    /**
     * 耗材数量
     */
    @ApiModelProperty(value = "耗材数量")
    @Excel(name = "耗材数量")
    @NotNull(message = "耗材数量不能为空", groups = {Insert.class, Update.class})
    private Integer consumableCount;

    /**
     * 耗材价格
     */
    @ApiModelProperty(value = "耗材价格")
    @Excel(name = "耗材价格")
    @NotNull(message = "耗材价格不能为空", groups = {Insert.class, Update.class})
    private BigDecimal consumablePrice;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nurseStationItemId", getNurseStationItemId())
                .append("nurseStationConsumableId", getNurseStationConsumableId())
                .append("consumableCount", getConsumableCount())
                .append("consumablePrice", getConsumablePrice())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}