package com.yutou.napcat.model;

import com.alibaba.fastjson2.annotation.JSONField;
import com.yutou.okhttp.BaseBean;
import lombok.Data;

import java.util.Map;

@Data

public class AppShareBean extends BaseBean {

    @JSONField(name = "ver")
    private String version;

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

    @JSONField(name = "config")
    private Config config;

    @JSONField(name = "needShareCallBack")
    private boolean needShareCallBack;

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

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

    @JSONField(name = "meta")
    private Meta meta;

    // getters and setters...

    // Inner classes

    @Data
    public static class Config {
        @JSONField(name = "type")
        private String type;

        @JSONField(name = "width")
        private int width;

        @JSONField(name = "height")
        private int height;

        @JSONField(name = "forward")
        private int forward;

        @JSONField(name = "autoSize")
        private int autoSize;

        @JSONField(name = "ctime")
        private long ctime;

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

        // getters and setters...
    }

    @Data
    public static class Meta {
        @JSONField(name = "detail_1")
        private Detail detail1;

        // If there can be multiple "detail_X" entries, you might need a Map
        // @JSONField(name = "detail_X")
        // private Map<String, Detail> details;

        // getters and setters...
    }

    @Data
    public static class Detail {
        @JSONField(name = "appid")
        private String appid;

        @JSONField(name = "appType")
        private int appType;

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

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

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

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

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

        @JSONField(name = "scene")
        private int scene;

        @JSONField(name = "host")
        private Host host;

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

        // Since "shareTemplateData" is an empty object, it can be left as a Map or a specific class
        // if you know the structure of the data that might be there
        @JSONField(name = "shareTemplateData")
        private Map<String, Object> shareTemplateData;

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

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

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

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

        // getters and setters...
    }

    @Data
    public static class Host {
        @JSONField(name = "uin")
        private long uin;

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

        // getters and setters...
    }

}
