ToMes.java 1.81 KB
package com.huaheng.api.general.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @author yiwenpeng
 * @date 2022/9/1 10:10
 */
@NoArgsConstructor
@Data
public class ToMes {

    @JsonProperty("header")
    private HeaderDTO header;
    @JsonProperty("content")
    private ContentDTO content;

    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class HeaderDTO {
        @JsonProperty("method")
        private String method;
        @JsonProperty("account")
        private String account;
        @JsonProperty("password")
        private String password;
        @JsonProperty("version")
        private String version;
        @JsonProperty("modules")
        private String[] modules;
        @JsonProperty("mac")
        private String mac;
        @JsonProperty("lang")
        private String lang;
        @JsonProperty("is_debug")
        private Boolean is_debug;
        @JsonProperty("platform")
        private String platform;
        @JsonProperty("session")
        private String session;
    }

    @NoArgsConstructor
    @Data
    public static class ContentDTO {

        @JsonProperty("Createdate")
        private String createdate;
        @JsonProperty("Batterynumber")
        private Integer batterynumber;
        @JsonProperty("Barcodedata")
        private List<BarcodedataDTO> barcodedata;

        @NoArgsConstructor
        @Data
        public static class BarcodedataDTO {
            @JsonProperty("Batterybarcode")
            private String batterybarcode;
            @JsonProperty("Batterysource")
            private String batterysource;
            @JsonProperty("Batterytype")
            private String batterytype;
        }
    }
}