package com.yuchen.saas.device.api.entity.scene;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nest.springwrap.core.mp.base.BaseEntity;

@Data
@ApiModel(value = "场景联动规则 数据表", description = "场景联动规则数据表")
@TableName("device_scene_linkage_rule")
public class DeviceSceneLinkageRule extends BaseEntity {

    /**
     * 所属客户
     */
    private Long customerId;

    /**
     * 所属项目id
     */
    private Long projectId;

    /**
     * 业务服务id
     */
    @ApiModelProperty(name = "businessId", value = "业务服务id")
    private Long businessId;

    /**
     * 场景名称
     */
    private String sceneName;


    /**
     * 触发方式，1-设备触发，2-定时触发，3-手动触发
     */
    private Integer triggerMode;

    /**
     * xxl定时任务cron表达式（定时触发有值）
     */
    private String cron;

    /**
     * xxl任务id
     */
    private Integer jobId;

    /**
     * 规则描述
     */
    @ApiModelProperty(name = "description", value = "规则描述")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String description;

    /**
     * 执行规则
     */
    @ApiModelProperty(name = "childList", value = "执行规则")
    private String childList;

    /**
     * 规则详情
     */
    @ApiModelProperty(name = "ruleContent", value = "规则详情json字符串")
    private String ruleContent;

    /**
     * 规则输出告警（0：否，1：是）
     */
    @ApiModelProperty(name = "ruleAlarm", value = "规则输出告警")
    private String ruleOutAlarm;

    /**
     * 创建组织用户id
     */
    @ApiModelProperty(name = "createOrgUser", value = "创建组织用户id")
    private Long createOrgUser;
    /**
     * 修改组织用户id
     */
    @ApiModelProperty(name = "updateOrgUser", value = "修改组织用户id")
    private Long updateOrgUser;

    /**
     * 更新人用户名称
     */
    @TableField(exist = false)
    @ApiModelProperty(name = "updateOrgUserName", value = "更新人用户名称")
    private String updateOrgUserName;

}