package com.jeeplus.finance.invoice.domain.OMS;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

public class OMSAccessTokenInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @JSONField(name = "appId")
    private String appId;

    @JSONField(name = "appKey")
    private String appKey;

    @JSONField(name = "exchangeId")
    private String exchangeId;

    @JSONField(name = "accessToken")
    private String accessToken;

    @JSONField(name = "result")
    private Result result;

    @JSONField(name = "data")
    private Object data;

    // 无参构造方法 (JSON反序列化必须有)
    public OMSAccessTokenInfo() {
    }

    // ==================== 所有字段的getter & setter ====================
    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getExchangeId() {
        return exchangeId;
    }

    public void setExchangeId(String exchangeId) {
        this.exchangeId = exchangeId;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public Object getData() {
        return data;
    }

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

    // toString 方便日志打印和调试
    @Override
    public String toString() {
        return "OMSAccessTokenInfo{" +
                "appId='" + appId + '\'' +
                ", appKey='" + appKey + '\'' +
                ", exchangeId='" + exchangeId + '\'' +
                ", accessToken='" + accessToken + '\'' +
                ", result=" + result +
                ", data=" + data +
                '}';
    }

    // ==================== 嵌套的Result子实体类 ====================
    public static class Result implements Serializable {
        private static final long serialVersionUID = 1L;

        @JSONField(name = "code")
        private String code;

        @JSONField(name = "message")
        private String message;

        public Result() {
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        @Override
        public String toString() {
            return "Result{" +
                    "code='" + code + '\'' +
                    ", message='" + message + '\'' +
                    '}';
        }
    }
}
