package com.usky.cdi.service.vo.info;

import com.usky.cdi.service.vo.base.BaseEnvMonitorPushVO;
import lombok.Data;

/**
 * 倾斜数据推送VO
 * @author fyc
 * @email yuchuan.fu@chinausky.com
 * @date 2025/12/18
 */
@Data
public class TiltVO extends BaseEnvMonitorPushVO {

    private static final long serialVersionUID = 1L;

    /**
     * 倾斜角度值
     * 类型：int 0、1 有、无
     */
    private Integer sensorValue;

    @Override
    public Number getSensorValue() {
        return sensorValue;
    }

    @Override
    protected void validateSensorValue() {
        // 倾斜角度值校验规则，根据实际业务需求调整
        if (sensorValue == null) {
            throw new IllegalArgumentException("倾斜角度值（sensorValue）为必填项");
        }
    }
}