package com.agri.system.domain;

import com.agri.common.annotation.Excel;
import com.agri.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 告警方式设置对象 sys_agri_alarm_relation
 * 
 * @author agri
 * @date 2026-01-08
 */
@TableName("sys_agri_alarm_relation")
public class SysAgriAlarmRelation extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @JsonSerialize(using = ToStringSerializer.class) // 一键转字符串
    private Long id;

    /** 关联大棚设备表ID（sys_agri_info.id） */
    @Excel(name = "关联大棚设备表ID", readConverterExp = "s=ys_agri_info.id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long agriId;

    /** imei */
    @Excel(name = "imei")
    private String imei;

    /** 告警方式编码（关联sys_alarm_type_dict.type_code） */
    @Excel(name = "告警方式编码", readConverterExp = "关=联sys_alarm_type_dict.type_code")
    private String typeCode;

    /** 逻辑删除(0-未删，1-已删) */
    @Excel(name = "逻辑删除(0-未删，1-已删)")
    private Integer isDeleted;

    /** 大棚名称 */
    @Excel(name = "大棚名称")
    private String agriName;

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

    public Long getId() 
    {
        return id;
    }

    public void setAgriId(Long agriId) 
    {
        this.agriId = agriId;
    }

    public Long getAgriId() 
    {
        return agriId;
    }

    public void setImei(String imei) 
    {
        this.imei = imei;
    }

    public String getImei() 
    {
        return imei;
    }

    public void setTypeCode(String typeCode) 
    {
        this.typeCode = typeCode;
    }

    public String getTypeCode() 
    {
        return typeCode;
    }

    public void setIsDeleted(Integer isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() 
    {
        return isDeleted;
    }

    public void setAgriName(String agriName) 
    {
        this.agriName = agriName;
    }

    public String getAgriName() 
    {
        return agriName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("agriId", getAgriId())
            .append("imei", getImei())
            .append("typeCode", getTypeCode())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("isDeleted", getIsDeleted())
            .append("agriName", getAgriName())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
