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_action")
@EnableEntityEvent
public class OperatinActionEntity 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("模式id")
    @Column(name = "operation_mode_id")
    private Long operationModeId;

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

    @Comment("条件id")
    @Column(name = "operation_condition_id")
    private Long operationConditionId;

    @Comment("动作类型：0：文本播放 1音频播放 2 U3D动作 3物联网设备动作")
    @Column(name = "type", nullable = false)
    private Integer type;

    @Comment("动作内容")
    @Column(name = "action", length = 255)
    private String action;

    @Comment("当type=2时u3d_action中的id，当type=3时为device_info中的id")
    @Column(name = "connect_id")
    private Long connectId;

    @Comment("触发事件时间偏移量，单位秒：负数标识提前，整数标识往后。当条件为时间、节日时有效")
    @Column(name = "action_times", nullable = false)
    private Integer actionTimes;

}