package com.yuchen.saas.integration.feign.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.thinkunion.park.service.common.entity.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author songshaoting
 * @date 2022/11/2
 */
@Data
@TableName("sync_device_people_log")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "设备人员数据同步日志", description = "设备人员数据同步日志")
public class SyncDevicePeopleLog extends BasicEntity {

    @ApiModelProperty(value = "设备产品")
    private String productKey;

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "记录类型1：新增/修改，2：删除")
    private Integer type;

    @ApiModelProperty(value = "人员id")
    private Long peopleId;

    @ApiModelProperty(value = "身份证信息")
    private String peopleCardId;

    @ApiModelProperty(value = "第三方设备返回的人员id")
    private String personId;

    @ApiModelProperty(value = "失败信息")
    private String errorLog;

    @ApiModelProperty(value = "mqtt消息id")
    private String mqttMessageId;

    @ApiModelProperty(value = "mqtt记录id")
    private String mqttRecordId;

    public enum StatusEnum{
        SYNCING(0,"同步中"),
        SUCCESS(1,"同步成功"),
        FAIL(2,"同步失败")
        ;

        public Integer value;
        public String name;

        StatusEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }
    }

    public enum TypeEnum{
        EDIT(1,"新增/修改"),
        DEL(2,"删除")
        ;

        public Integer value;
        public String name;

        TypeEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }
    }

}
