package com.ruoyi.web.v1.model;

import java.math.BigDecimal;
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.*;

/**
 * 吊钩对象 hook
 * 
 * @author coede
 * @date 2025-03-19
 */
public class Hook extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 吊钩类型名称 */
    @Excel(name = "吊钩类型名称")
    private String hookName;

    /** 吊钩扣重 */
    @Excel(name = "吊钩扣重")
    private BigDecimal hookWeight;

    /** 默认标志 */
    @Excel(name = "默认标志")
    private Boolean defaultFlag;

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

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

    public Long getId() 
    {
        return id;
    }

    public void setHookName(String hookName) 
    {
        this.hookName = hookName;
    }

    @NotBlank(message = "吊钩类型不能为空")
    @Size(min = 1, max = 10, message = "吊钩类型输入超出最大长度限制（10位）")
    public String getHookName() 
    {
        return hookName;
    }

    public void setHookWeight(BigDecimal hookWeight) 
    {
        this.hookWeight = hookWeight;
    }

    @NotNull(message = "吊钩扣重不能为空")
    @DecimalMin(value = "0.01", inclusive = true, message = "吊钩扣重输入超出设定范围限制（0.01~50.00）")
    @DecimalMax(value = "50.00", inclusive = true, message = "吊钩扣重输入超出设定范围限制（0.01~50.00）")
    @Digits(integer = 2, fraction = 2, message = "吊钩扣重输入的整数部分不能超过2位，小数部分不能超过2位")
    public BigDecimal getHookWeight() 
    {
        return hookWeight;
    }

    public void setDefaultFlag(Boolean defaultFlag)
    {
        this.defaultFlag = defaultFlag;
    }

    public Boolean getDefaultFlag()
    {
        return defaultFlag;
    }

    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("hookName", getHookName())
            .append("hookWeight", getHookWeight())
            .append("defaultFlag", getDefaultFlag())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
