package org.ta.pddserver.model.pddlg.request;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
public class PddLogisticsCoTrackSubRequest extends LGBaseModel {

    private DataObject dataObject;

    @Data
    public static class DataObject {
        /**
         * 快递公司运单号（必填）
         */
        String trackingNumber;
        /**
         * 物流序列号，每次订阅时生成的唯一ID（必填）
         */
        String trackingOrderNo;
    }

    @Override
    public void parseData() {
        try {
            this.dataObject = JSON.parseObject(this.getData(), DataObject.class);
        } catch (Exception e) {
            log.error("PddLogisticsCoTrackSubRequest parseData error");
            e.printStackTrace();
        }
    }
}
