package com.wdkl.ncs.android.middleware.model.dos;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.wdkl.ncs.android.middleware.model.annotation.Column;
import com.wdkl.ncs.android.middleware.model.annotation.Id;
import com.wdkl.ncs.android.middleware.model.annotation.PrimaryKeyField;
import com.wdkl.ncs.android.middleware.model.annotation.Table;

import java.io.Serializable;
import java.util.ArrayList;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@Table(name = "ncs_interaction")
@ApiModel
@JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
public class InteractionDO implements Serializable {

    /**
     * id
     */
    @Column(name = "id")
    @ApiModelProperty(value = "id", required = false)
    @Id(name = "id")
    private Integer id;
    /**
     * union_id,线下线上同步ID
     */
    @Column(name = "union_id")
    @ApiModelProperty(value = "union_id,线下线上同步ID", required = false)
    private String unionId;
    /**
     * 创建时间
     */
    @Column(name = "create_date")
    @ApiModelProperty(value = "创建时间", required = false)
    private Long createDate;
    /**
     * 科室Id
     */
    @Column(name = "part_id")
    @ApiModelProperty(value = "科室Id", required = false)
    private Integer partId;
    /**
     * 科室名称
     */
    @Column(name = "part_name")
    @ApiModelProperty(value = "科室名称", required = false)
    private String partName;
    /**
     * 交互类型(1:语音通话,2:视频通话,3:卫生间紧急呼叫,4:语音留言,5:文本消息,6:按键事件)
     */
    @Column(name = "action_type")
    @ApiModelProperty(value = "交互类型(1:语音通话,2:视频通话,3:卫生间紧急呼叫,4:语音留言,5:文本消息,6:按键事件)", required = false)
    private String actionType;
    /**
     * SUCCESS、FAILED
     */
    @Column(name = "action_result")
    @ApiModelProperty(value = "0失败，1成功", required = false)
    private Integer actionResult;


    /**
     * 交互发起设备Id
     */
    @Column(name = "from_device_id")
    @ApiModelProperty(value = "交互发起设备Id", required = false)
    private Integer fromDeviceId;
    /**
     * null
     */
    @Column(name = "from_eth_mac")
    @ApiModelProperty(value = "发起端设备的有线以太网卡MAC地址", required = false)
    private String fromEthMac;

    @Column(name = "from_eth_ip")
    @ApiModelProperty(value = "发起端设备的有线以太网卡分配的IP地址", required = false)
    private String fromEthIp;
    /**
     * null
     */
    @Column(name = "from_sip_id")
    @ApiModelProperty(value = "发起端设备的SIP账号", required = false)
    private String fromSipId;
    /**
     * null
     */
    @Column(name = "from_device_type")
    @ApiModelProperty(value = "发起端设备的设备类型", required = false)
    private Integer fromDeviceType;

    @Column(name = "from_device_name")
    @ApiModelProperty(value = "发起端设备的名称", required = false)
    private String fromDeviceName;
    /**
     * null
     */
    @Column(name = "from_device_phone_number")
    @ApiModelProperty(value = "发起端设备号码", required = false)
    private String fromDevicePhoneNumber;
    /**
     * 发起设备所在空间结构
     */
    @Column(name = "from_device_frame_id")
    @ApiModelProperty(value = "发起设备所在空间结构", required = false)
    private Integer fromDeviceFrameId;

    @Column(name = "from_frame_type")
    @ApiModelProperty(value = "发起端空间结构类型：0楼、1病房、2床位", required = false)
    private Integer fromFrameType;
    /**
     * null
     */
    @Column(name = "from_frame_name")
    @ApiModelProperty(value = "发起端空间结构名称", required = false)
    private String fromFrameName;
    /**
     * null
     */
    @Column(name = "from_frame_full_name")
    @ApiModelProperty(value = "发起端空间结构全名", required = false)
    private String fromFrameFullName;

    @Column(name = "from_frame_parent_id")
    @ApiModelProperty(value = "发起端空间父级id", required = false)
    private Integer fromFrameParentId;
    /**
     * 交互发起设备使用者member_id
     */
    @Column(name = "from_device_member_id")
    @ApiModelProperty(value = "交互发起设备使用者member_id", required = false)
    private Integer fromDeviceMemberId;
    /**
     * 用户
     **/
    @Column(name = "from_customer_id")
    @ApiModelProperty(value = "发起端用户CustomId", required = false)
    private Integer fromCustomerId;
    /**
     * null
     */
    @Column(name = "from_member_name")
    @ApiModelProperty(value = "发起端用户姓名", required = false)
    private String fromMemberName;
    /**
     * null
     */
    @Column(name = "from_member_face")
    @ApiModelProperty(value = "发起端用户头像", required = false)
    private String fromMemberFace;

    @Column(name = "from_clerk_id")
    @ApiModelProperty(value = "发起端用户成员Id，发起端为护士主机，腕表，医生机时才有", required = false)
    private Integer fromClerkId;
    /**
     * null
     */
    @Column(name = "from_role_name")
    @ApiModelProperty(value = "发起端用户角色名（医生、护士、护工）", required = false)
    private String fromRoleName;


    /**
     * 交互对象设备Id
     */
    @Column(name = "to_device_id")
    @ApiModelProperty(value = "交互对象设备Id", required = false)
    private Integer toDeviceId;
    /**
     * null
     */
    @Column(name = "to_eth_mac")
    @ApiModelProperty(value = "目的端设备的有线以太网卡MAC地址", required = false)
    private String toEthMac;

    @Column(name = "to_eth_ip")
    @ApiModelProperty(value = "目的端设备的有线以太网卡分配的IP地址", required = false)
    private String toEthIp;
    /**
     * null
     */
    @Column(name = "to_sip_id")
    @ApiModelProperty(value = "目的端设备的SIP账号", required = false)
    private String toSipId;
    /**
     * null
     */
    @Column(name = "to_device_type")
    @ApiModelProperty(value = "目的端设备的设备类型", required = false)
    private Integer toDeviceType;

    @Column(name = "to_device_name")
    @ApiModelProperty(value = "目的端设备的名称", required = false)
    private String toDeviceName;
    /**
     * null
     */
    @Column(name = "to_device_phone_number")
    @ApiModelProperty(value = "目的端设备号码", required = false)
    private String toDevicePhoneNumber;
    /**
     * 交互对象所在空间结果
     */
    @Column(name = "to_device_frame_id")
    @ApiModelProperty(value = "交互对象所在空间结果", required = false)
    private Integer toDeviceFrameId;

    @Column(name = "to_frame_type")
    @ApiModelProperty(value = "目的端空间结构类型：0楼、1病房、2床位", required = false)
    private Integer toFrameType;
    /**
     * null
     */
    @Column(name = "to_frame_name")
    @ApiModelProperty(value = "目的端空间结构名称", required = false)
    private String toFrameName;
    /**
     * null
     */
    @Column(name = "to_frame_full_name")
    @ApiModelProperty(value = "目的端空间结构全名", required = false)
    private String toFrameFullName;

    @Column(name = "to_frame_parent_id")
    @ApiModelProperty(value = "目的端空间父级id", required = false)
    private Integer toFrameParentId;
    /**
     * 交互对象设备使用者member_id
     */
    @Column(name = "to_device_member_id")
    @ApiModelProperty(value = "交互对象设备使用者member_id", required = false)
    private Integer toDeviceMemberId;

    @Column(name = "to_customer_id")
    @ApiModelProperty(value = "目的端用户CustomId", required = false)
    private Integer toCustomerId;

    /**
     * null
     */
    @Column(name = "to_member_name")
    @ApiModelProperty(value = "目的端用户姓名", required = false)
    private String toMemberName;
    /**
     * null
     */
    @Column(name = "to_member_face")
    @ApiModelProperty(value = "目的端用户头像", required = false)
    private String toMemberFace;

    @Column(name = "to_clerk_id")
    @ApiModelProperty(value = "目的端用户成员Id，目的端为护士主机，腕表，医生机时才有", required = false)
    private Integer toClerkId;
    /**
     * null
     */
    @Column(name = "to_role_name")
    @ApiModelProperty(value = "目的端用户角色名（医生、护士、护工）", required = false)
    private String toRoleName;
    /**
     * 是否为呼叫系统内部交互(如果是外部电话呼叫为true,否则为false)
     */
    @Column(name = "outerior_action")
    @ApiModelProperty(value = "是否为呼叫系统内部交互(如果是外部电话呼叫为true,否则为false)", required = false)
    private Boolean outeriorAction;
    /**
     * 外部呼叫时的来电号码(根据此号码查询member,并设置from_device信息)
     */
    @Column(name = "outerior_action_number")
    @ApiModelProperty(value = "外部呼叫时的来电号码(根据此号码查询member,并设置from_device信息)", required = false)
    private String outeriorActionNumber;
    /**
     * 外部交互者的用户id
     */
    @Column(name = "outerior_action_member_id")
    @ApiModelProperty(value = "外部交互者的用户id", required = false)
    private Long outeriorActionMemberId;
    /**
     * 备注Id
     */
    @Column(name = "remark_id")
    @ApiModelProperty(value = "备注Id", required = false)
    private Integer remarkId;
    /**
     * 交互开始时间(通话时指通话接通时间,与create_time相同)
     */
    @Column(name = "action_start")
    @ApiModelProperty(value = "交互开始时间(通话时指通话接通时间,与create_time相同)", required = false)
    private Long actionStart;
    /**
     * 应答时间
     */
    @Column(name = "action_accept")
    @ApiModelProperty(value = "应答时间", required = false)
    private Long actionAccept;
    /**
     * 交互结束时间(通话时指通话挂断时间,通话挂断后要更新此字段)。事件响应时间、语音已读时间
     */
    @Column(name = "action_end")
    @ApiModelProperty(value = "交互结束时间(通话时指通话挂断时间,通话挂断后要更新此字段)。事件响应时间、语音已读时间", required = false)
    private Long actionEnd;
    /**
     * 交互处理者的member_id
     */
    @Column(name = "action_end_member_id")
    @ApiModelProperty(value = "交互处理者的member_id", required = false)
    private Integer actionEndMemberId;
    /**
     * null
     */
    @Column(name = "action_end_member_name")
    @ApiModelProperty(value = "交互处理者的用户姓名", required = false)
    private String actionEndMemberName;
    /**
     * 交互完成时间
     */
    @Column(name = "action_completed")
    @ApiModelProperty(value = "交互完成时间", required = false)
    private Long actionCompleted;
    /**
     * 交互数据(类型1,2,3为空)(类型4为音频文件地址)(5为文本内容)(类型6为具体按键类型)
     */
    @Column(name = "data")
    @ApiModelProperty(value = "交互数据(类型1,2,3为空)(类型4为音频文件地址)(5为文本内容)(类型6为具体按键类型)", required = false)
    private String data;
    /**
     * 交互错误代码
     */
    @Column(name = "error_code")
    @ApiModelProperty(value = "交互错误代码", required = false)
    private String errorCode;
    /**
     * 交互错误描述
     */
    @Column(name = "error_message")
    @ApiModelProperty(value = "交互错误描述", required = false)
    private String errorMessage;

    @Column(name = "action_direction_type")
    @ApiModelProperty(value = "交互方向类型(1:分机到主机、腕表、医生机,2:主机、腕表、医生机到分机,3主机、腕表、医生机之间互通,4:分机到分机)", required = false)
    private Integer actionDirectionType;

    @Column(name = "action_status")
    @ApiModelProperty(value = "事件类型的交互状态(包括:发出,响应,取消,完成)", required = false)
    private String actionStatus;
    /**
     * null
     */
    @Column(name = "relative_id")
    @ApiModelProperty(value = "亲属id,外部来电时，from_member亲属的memberId", required = false)
    private Integer relativeId;
    /**
     * null
     */
    @Column(name = "relative_name")
    @ApiModelProperty(value = "外部来电时，from_member亲属关系", required = false)
    private String relativeName;


    /**
     *交互接收者的顺序,一个JS数组,一个交互可能同时给同一角色的多个用户,用JS数组可以个分多个层级
     */
    @Column(name = "spread_member_path")
    @ApiModelProperty(value = "交互接收者的顺序", required = false)
    private String spreadMemberPath;


    /**
     *交互接收的memberId,用逗号隔开,可以不考虑顺序,方便查询用户交互记录,把spread_member_path字段打散后用逗号连接
     */
    @Column(name = "spread_member_ids")
    @ApiModelProperty(value = "交互接收的memberId,", required = false)
    private String spreadMemberIds;


    /**
     *交互已触达的memberIds,交互被多人接收后,有任意一人处理,需要通知其他已触达的用户取消处理
     */
    @Column(name = "reached_member_ids")
    @ApiModelProperty(value = "交互已触达的memberIds", required = false)
    private String reachedMemberIds;

    private ArrayList<Integer[]> spreadMemberPathArray;


    @PrimaryKeyField
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public Long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Long createDate) {
        this.createDate = createDate;
    }

    public Integer getPartId() {
        return partId;
    }

    public void setPartId(Integer partId) {
        this.partId = partId;
    }

    public String getPartName() {
        return partName;
    }

    public void setPartName(String partName) {
        this.partName = partName;
    }

    public String getActionType() {
        return actionType;
    }

    public void setActionType(String actionType) {
        this.actionType = actionType;
    }

    public Integer getActionResult() {
        return actionResult;
    }

    public void setActionResult(Integer actionResult) {
        this.actionResult = actionResult;
    }

    public Integer getFromDeviceId() {
        return fromDeviceId;
    }

    public void setFromDeviceId(Integer fromDeviceId) {
        this.fromDeviceId = fromDeviceId;
    }

    public String getFromEthMac() {
        return fromEthMac;
    }

    public void setFromEthMac(String fromEthMac) {
        this.fromEthMac = fromEthMac;
    }

    public String getFromEthIp() {
        return fromEthIp;
    }

    public void setFromEthIp(String fromEthIp) {
        this.fromEthIp = fromEthIp;
    }

    public String getFromSipId() {
        return fromSipId;
    }

    public void setFromSipId(String fromSipId) {
        this.fromSipId = fromSipId;
    }

    public Integer getFromDeviceType() {
        return fromDeviceType;
    }

    public void setFromDeviceType(Integer fromDeviceType) {
        this.fromDeviceType = fromDeviceType;
    }

    public String getFromDeviceName() {
        return fromDeviceName;
    }

    public void setFromDeviceName(String fromDeviceName) {
        this.fromDeviceName = fromDeviceName;
    }

    public String getFromDevicePhoneNumber() {
        return fromDevicePhoneNumber;
    }

    public void setFromDevicePhoneNumber(String fromDevicePhoneNumber) {
        this.fromDevicePhoneNumber = fromDevicePhoneNumber;
    }

    public Integer getFromDeviceFrameId() {
        return fromDeviceFrameId;
    }

    public void setFromDeviceFrameId(Integer fromDeviceFrameId) {
        this.fromDeviceFrameId = fromDeviceFrameId;
    }

    public Integer getFromFrameType() {
        return fromFrameType;
    }

    public void setFromFrameType(Integer fromFrameType) {
        this.fromFrameType = fromFrameType;
    }

    public String getFromFrameName() {
        return fromFrameName;
    }

    public void setFromFrameName(String fromFrameName) {
        this.fromFrameName = fromFrameName;
    }

    public String getFromFrameFullName() {
        return fromFrameFullName;
    }

    public void setFromFrameFullName(String fromFrameFullName) {
        this.fromFrameFullName = fromFrameFullName;
    }

    public Integer getFromFrameParentId() {
        return fromFrameParentId;
    }

    public void setFromFrameParentId(Integer fromFrameParentId) {
        this.fromFrameParentId = fromFrameParentId;
    }

    public Integer getFromDeviceMemberId() {
        return fromDeviceMemberId;
    }

    public void setFromDeviceMemberId(Integer fromDeviceMemberId) {
        this.fromDeviceMemberId = fromDeviceMemberId;
    }

    public Integer getFromCustomerId() {
        return fromCustomerId;
    }

    public void setFromCustomerId(Integer fromCustomerId) {
        this.fromCustomerId = fromCustomerId;
    }

    public String getFromMemberName() {
        return fromMemberName;
    }

    public void setFromMemberName(String fromMemberName) {
        this.fromMemberName = fromMemberName;
    }

    public String getFromMemberFace() {
        return fromMemberFace;
    }

    public void setFromMemberFace(String fromMemberFace) {
        this.fromMemberFace = fromMemberFace;
    }

    public Integer getFromClerkId() {
        return fromClerkId;
    }

    public void setFromClerkId(Integer fromClerkId) {
        this.fromClerkId = fromClerkId;
    }

    public String getFromRoleName() {
        return fromRoleName;
    }

    public void setFromRoleName(String fromRoleName) {
        this.fromRoleName = fromRoleName;
    }

    public Integer getToDeviceId() {
        return toDeviceId;
    }

    public void setToDeviceId(Integer toDeviceId) {
        this.toDeviceId = toDeviceId;
    }

    public String getToEthMac() {
        return toEthMac;
    }

    public void setToEthMac(String toEthMac) {
        this.toEthMac = toEthMac;
    }

    public String getToEthIp() {
        return toEthIp;
    }

    public void setToEthIp(String toEthIp) {
        this.toEthIp = toEthIp;
    }

    public String getToSipId() {
        return toSipId;
    }

    public void setToSipId(String toSipId) {
        this.toSipId = toSipId;
    }

    public Integer getToDeviceType() {
        return toDeviceType;
    }

    public void setToDeviceType(Integer toDeviceType) {
        this.toDeviceType = toDeviceType;
    }

    public String getToDeviceName() {
        return toDeviceName;
    }

    public void setToDeviceName(String toDeviceName) {
        this.toDeviceName = toDeviceName;
    }

    public String getToDevicePhoneNumber() {
        return toDevicePhoneNumber;
    }

    public void setToDevicePhoneNumber(String toDevicePhoneNumber) {
        this.toDevicePhoneNumber = toDevicePhoneNumber;
    }

    public Integer getToDeviceFrameId() {
        return toDeviceFrameId;
    }

    public void setToDeviceFrameId(Integer toDeviceFrameId) {
        this.toDeviceFrameId = toDeviceFrameId;
    }

    public Integer getToFrameType() {
        return toFrameType;
    }

    public void setToFrameType(Integer toFrameType) {
        this.toFrameType = toFrameType;
    }

    public String getToFrameName() {
        return toFrameName;
    }

    public void setToFrameName(String toFrameName) {
        this.toFrameName = toFrameName;
    }

    public String getToFrameFullName() {
        return toFrameFullName;
    }

    public void setToFrameFullName(String toFrameFullName) {
        this.toFrameFullName = toFrameFullName;
    }

    public Integer getToFrameParentId() {
        return toFrameParentId;
    }

    public void setToFrameParentId(Integer toFrameParentId) {
        this.toFrameParentId = toFrameParentId;
    }

    public Integer getToDeviceMemberId() {
        return toDeviceMemberId;
    }

    public void setToDeviceMemberId(Integer toDeviceMemberId) {
        this.toDeviceMemberId = toDeviceMemberId;
    }

    public Integer getToCustomerId() {
        return toCustomerId;
    }

    public void setToCustomerId(Integer toCustomerId) {
        this.toCustomerId = toCustomerId;
    }

    public String getToMemberName() {
        return toMemberName;
    }

    public void setToMemberName(String toMemberName) {
        this.toMemberName = toMemberName;
    }

    public String getToMemberFace() {
        return toMemberFace;
    }

    public void setToMemberFace(String toMemberFace) {
        this.toMemberFace = toMemberFace;
    }

    public Integer getToClerkId() {
        return toClerkId;
    }

    public void setToClerkId(Integer toClerkId) {
        this.toClerkId = toClerkId;
    }

    public String getToRoleName() {
        return toRoleName;
    }

    public void setToRoleName(String toRoleName) {
        this.toRoleName = toRoleName;
    }

    public Boolean getOuteriorAction() {
        return outeriorAction;
    }

    public void setOuteriorAction(Boolean outeriorAction) {
        this.outeriorAction = outeriorAction;
    }

    public String getOuteriorActionNumber() {
        return outeriorActionNumber;
    }

    public void setOuteriorActionNumber(String outeriorActionNumber) {
        this.outeriorActionNumber = outeriorActionNumber;
    }

    public Long getOuteriorActionMemberId() {
        return outeriorActionMemberId;
    }

    public void setOuteriorActionMemberId(Long outeriorActionMemberId) {
        this.outeriorActionMemberId = outeriorActionMemberId;
    }

    public Integer getRemarkId() {
        return remarkId;
    }

    public void setRemarkId(Integer remarkId) {
        this.remarkId = remarkId;
    }

    public Long getActionStart() {
        return actionStart;
    }

    public void setActionStart(Long actionStart) {
        this.actionStart = actionStart;
    }

    public Long getActionAccept() {
        return actionAccept;
    }

    public void setActionAccept(Long actionAccept) {
        this.actionAccept = actionAccept;
    }

    public Long getActionEnd() {
        return actionEnd;
    }

    public void setActionEnd(Long actionEnd) {
        this.actionEnd = actionEnd;
    }

    public Integer getActionEndMemberId() {
        return actionEndMemberId;
    }

    public void setActionEndMemberId(Integer actionEndMemberId) {
        this.actionEndMemberId = actionEndMemberId;
    }

    public String getActionEndMemberName() {
        return actionEndMemberName;
    }

    public void setActionEndMemberName(String actionEndMemberName) {
        this.actionEndMemberName = actionEndMemberName;
    }

    public Long getActionCompleted() {
        return actionCompleted;
    }

    public void setActionCompleted(Long actionCompleted) {
        this.actionCompleted = actionCompleted;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public Integer getActionDirectionType() {
        return actionDirectionType;
    }

    public void setActionDirectionType(Integer actionDirectionType) {
        this.actionDirectionType = actionDirectionType;
    }

    public String getActionStatus() {
        return actionStatus;
    }

    public void setActionStatus(String actionStatus) {
        this.actionStatus = actionStatus;
    }

    public Integer getRelativeId() {
        return relativeId;
    }

    public void setRelativeId(Integer relativeId) {
        this.relativeId = relativeId;
    }

    public String getRelativeName() {
        return relativeName;
    }

    public void setRelativeName(String relativeName) {
        this.relativeName = relativeName;
    }


    public String getSpreadMemberPath() {
        return spreadMemberPath;
    }

    public void setSpreadMemberPath(String spreadMemberPath) {
        this.spreadMemberPath = spreadMemberPath;
    }

    public String getSpreadMemberIds() {
        return spreadMemberIds;
    }

    public void setSpreadMemberIds(String spreadMemberIds) {
        this.spreadMemberIds = spreadMemberIds;
    }

    public String getReachedMemberIds() {
        return reachedMemberIds;
    }

    public void setReachedMemberIds(String reachedMemberIds) {
        this.reachedMemberIds = reachedMemberIds;
    }
}
