package com.qiuguo.iot.data.entity.operation;
import org.hswebframework.ezorm.rdb.mapping.annotation.Comment;
import org.hswebframework.web.crud.annotation.EnableEntityEvent;
import org.hswebframework.web.api.crud.entity.GenericEntity;
import javax.persistence.Column;
import javax.persistence.Table;import lombok.Data;
import java.util.Date;
/**
* <p>
* </p>*场景下的条件配置
* @author wulin
* @since 2023-09-05
*/

@Data
@Comment("场景下的条件配置")
@Table(name = "operatin_condition")
@EnableEntityEvent
public class OperatinConditionEntity extends GenericEntity<Long> {
    @Comment("id")
    @Column(name = "id", length = 11, nullable = false, unique = true)
    private Long id;

    @Comment("是否删除：0 否 1 删除")
    @Column(name = "is_delete", nullable = false)
    private Integer isDelete;

    @Comment("创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @Comment("修改时间")
    @Column(name = "modify_time")
    private Date modifyTime;

    @Comment("条件类型：0：时间，1：节日 2：天气（晴天、阴天、下雨、下雪、冰雹、高温、泥石流、地震） 3：人体靠近感应 4：人体离开感应 5：声音感应 6：光照变亮感应 7：光照变暗感应 8：温度升高感应 9：温度降低感应 10：雨量感应 11：湿度变大感应 12：湿度变小感应 13：空气质量变差感应 14：空气质量变好感应 15：新闻事件")
    @Column(name = "type", nullable = false)
    private Integer type;

    @Comment("模式id")
    @Column(name = "operation_mode_id")
    private Long operationModeId;

    @Comment("场景ID")
    @Column(name = "operation_scene_id")
    private Long operationSceneId;

    @Comment("触发条件，根据type的值来确定具体的值的属性")
    @Column(name = "condition", length = 100)
    private String condition;

}