package cn.estsh.i3plus.pojo.lac.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.enumutil.LacEnumUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description :
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-11-19 16:14
 * @Modify:
 **/
@Data
@ApiModel("指令操作")
public class LacCommandOperate implements Serializable {

    private static final long serialVersionUID = 2877359322522442241L;
    @ApiParam(value = "指令集记录id", example = "-1")
    private Long operateObjId;

    @ApiParam(value = "操作对象类型", example = "-1")
    @AnnoOutputColumn(refClass = LacEnumUtil.OPERATE_OBJ_TYPE.class)
    private Integer operateObjType;

    @ApiParam(value = "操作", example = "-1")
    @AnnoOutputColumn(refClass = LacEnumUtil.OPERATE_COMMAND.class)
    private Integer operateCommand;

    public LacCommandOperate() {
    }

    public LacCommandOperate(Long operateObjId, Integer operate) {
        this.operateObjId = operateObjId;
        LacEnumUtil.OPERATE_COMMAND operate_command = LacEnumUtil.OPERATE_COMMAND.valueOf(operate);
        if (operate_command != null) {
            this.operateCommand = operate_command.getValue();
            this.operateObjType = operate_command.getOperateObjType().getValue();
        }
    }

}
