package com.ruoyi.app.domain;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 吊钩注册对象 HookRegister
 *
 * @author coede
 * @date 2025-04-18
 */
public class HookRegister extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 吊钩编号 */
    @Excel(name = "吊钩编号")
    private String hookNo;

    /** 吊钩编号 */
    @Excel(name = "芯片编号")
    private String epcNo;

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

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

    public Long getId()
    {
        return id;
    }

    public void setHookNo(String hookNo)
    {
        this.hookNo = hookNo;
    }

    @NotBlank(message = "吊钩编号不能为空")
    @Pattern(regexp = "^\\d{1,4}$", message = "吊钩编号超出最大长度限制（4位数字）")
    public String getHookNo()
    {
        return hookNo;
    }

    public void setEpcNo(String epcNo)
    {
        this.epcNo = epcNo;
    }

    @NotBlank(message = "芯片编号不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{24}$", message = "芯片编号输入限制24位数字或字母")
    public String getEpcNo()
    {
        return epcNo;
    }

    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("hookNo", getHookNo())
                .append("epcNo", getEpcNo())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
