package com.huatek.busi.ws.protocol;

import java.time.LocalDateTime;
import java.util.List;

import com.huatek.busi.ws.util.XStreamYMDDateConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamConverter;

import lombok.Data;

@Data
@XStreamAlias("datanode")
public class CacDataNode {

    @XStreamAsAttribute
    @XStreamAlias("sensorid")
    private String sensorId;

    private String type;

    @XStreamAlias("equipmentid")
    private String equipmentId;

    @XStreamAlias("timestamp")
    @XStreamConverter(value = XStreamYMDDateConverter.class)
    private LocalDateTime timeStamp;

    private List<CacAttr> attrs;
}
