package com.ruoyi.app.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.*;

/**
 * 待宰圈对象 pigpen
 * 
 * @author coede
 * @date 2025-03-19
 */
public class Pigpen extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 
待宰圈号 */
    @Excel(name = " 待宰圈号")
    private String pigpenName;

    /** 最大容量 */
    @Excel(name = "最大容量")
    private Integer maxCapacity;

    /** 删除标志 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setPigpenName(String pigpenName) 
    {
        this.pigpenName = pigpenName;
    }

    @NotBlank(message = "待宰圈号不能为空")
    @Size(min = 1, max = 3, message = "待宰圈号输入超出最大长度限制（3位）")
    @Pattern(regexp = "^\\d+$", message = "待宰圈号必须全部是数字")
    public String getPigpenName() 
    {
        return pigpenName;
    }

    public void setMaxCapacity(Integer maxCapacity) 
    {
        this.maxCapacity = maxCapacity;
    }

    @Min(value = 1, message = "最大容量输入超出设定范围限制（1～999）")
    @Max(value = 999, message = "最大容量输入超出设定范围限制（1～999）")
    public Integer getMaxCapacity() 
    {
        return maxCapacity;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pigpenName", getPigpenName())
            .append("maxCapacity", getMaxCapacity())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
