package com.dcs.hnyz.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.dcs.common.annotation.Excel;
import com.dcs.common.core.domain.BaseEntity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;

/**
 * 动作配置管理对象 action_config
 *
 * @author hmy
 * @date 2025-04-28
 */

@Data
@TableName("action_config")
@ApiModel(value = "动作配置管理对象")
public class ActionConfig extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 动作id
     */
    @TableId(value = "action_id", type = IdType.AUTO)
    @ApiModelProperty(value = "动作id")
    private Long actionId;

    /**
     * 设备id（关联设备表）
     */
    @Excel(name = "设备id")
    @TableField(value = "equipment_id")
    @ApiModelProperty(value = "设备id")
    private Long equipmentId;

    /**
     * 动作类型
     */
    @Excel(name = "动作类型")
    @TableField(value = "action_type")
    @ApiModelProperty(value = "动作类型")
    private String actionType;

    /**
     * 动作值
     */
    @Excel(name = "动作值")
    @ApiModelProperty(value = "动作值")
    private String value;

    /**
     * 单位
     */
    @Excel(name = "单位")
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 触发类型（1定时触发 2条件触发 3事件触发）
     */
    @Excel(name = "触发类型", readConverterExp = "1=定时触发,2=条件触发,3=同步触发")
    @TableField(value = "trigger_type")
    @ApiModelProperty(value = "触发类型,1=定时触发,2=条件触发,3=同步触发")
    private String triggerType;

    /**
     * 触发条件
     */
    @Excel(name = "触发条件")
    @TableField(value = "trigger_condition")
    private String triggerCondition;

    /**
     * 触发延迟（秒）
     */
    @Excel(name = "触发延迟(s)")
    @TableField(value = "trigger_delay")
    private Long triggerDelay;

    /**
     * 启用状态（0-启用,1-禁用）
     */
    @Excel(name = "启用状态", readConverterExp = "0=启用,1=禁用")
    private String status;


}
