UIGF-org.github.io icon indicating copy to clipboard operation
UIGF-org.github.io copied to clipboard

UIGFv4.2

Open BTMuli opened this issue 2 months ago • 6 comments

@UIGF-org/uigf-constitutors

原始数据

来自 Discussion

{
    "id": "1761114000000054207",
    "region": "os_asia",
    "uid": "8xxxxxxxx",
    "schedule_id": "18",
    "item_type": "Cosmetic Catalog",
    "item_id": "270075",
    "item_name": "Component Catalog - \"Dignified Formal Shirt: Ash White\"",
    "rank_type": "2",
    "is_up": "0",
    "time": "2025-10-22 14:20:52",
    "op_gacha_type": "1000"
}

来自个人数据:

{
  "id": "1761196200000004865",
  "region": "cn_qd01",
  "uid": "5xxxxxxxx",
  "schedule_id": "18",
  "item_type": "装扮形录",
  "item_id": "270046",
  "item_name": "部件形录·「泡泡袖衬衫·茜红」",
  "rank_type": "2",
  "is_up": "0",
  "time": "2025-10-23 13:25:24",
  "op_gacha_type": "1000"
}

来自群友数据:

{
  "id": "1761239400000093692",
  "region": "cn_gf01",
  "uid": "1xxxxxxxx",
  "schedule_id": "20",
  "item_type": "装扮部件",
  "item_id": "261642",
  "item_name": "男性装扮·「皎星短靴」",
  "rank_type": "3",
  "is_up": "0",
  "time": "2025-10-24 01:51:36",
  "op_gacha_type": "20021"
}

来自 官方JSON:

Image

参照现有标准:

  1. 建议在 root 新增字段 表示,建议命名为 hk4e_ugc
  2. 大部分数据保留原字段命名
  3. 一级字段参照hk4e处理,list数据剔除 regionitem_nameitem_type 可选
  4. 由于timezone既可以由region推导又可以由uid推导,故region字段进行了剔除 参考类型:
type Hk4eUGC = {
  uid: string|number;
  timezone: number;
  lang?: string;
  list: BeyondItem[];
}

type BeyondItem = {
  id: string;
  schedule_id: string;
  item_type?: string;
  item_id: string;
  item_name?: string;
  rank_type: string;
  is_up: string;
  time: string;
  op_gacha_type: string;
}

BTMuli avatar Oct 25 '25 09:10 BTMuli

考虑到数据丢失问题,regionis_up数据不进行剔除,修改如下:

type Hk4eBeyond = {
  uid: string;
  region: string; // region 位于上层
  timezone: string;
  lang?: string;
  list: BeyondItem[];
}

type BeyondItem = {
  id: string;
  schedule_id: string;
  item_type: string;
  item_id: string;
  item_name: string;
  rank_type: string;
  is_up: string; // 保留 is_up 字段
  time: string;
  gacha_type: string;
  op_gacha_type: string;
}

BTMuli avatar Oct 25 '25 10:10 BTMuli

  1. 新字段建议命名 hk4eb/hk4ebyd/hk4eugc

hk4e_beyond or hk4e_ugc

3. 由于timezone既可以由region推导又可以由uid推导,故region字段进行了剔除

Optional? item.region > parent.region > infer timezone也和其他游戏一样允许任意时区吧

item_type: string; item_id: string; item_name: string; rank_type: string;

item_type, item_name, rank_type: optional?

Lightczx avatar Oct 26 '25 02:10 Lightczx

hk4e_beyond or hk4e_ugc

我觉得更短的那个更好一些

Optional? item.region > parent.region > infer

对相同uid列表而言,region也是相同的,放在与uid同级位置,目前也能够通过uid推导,我倒觉得可以剔除

item_type, item_name, rank_type: optional?

fine

BTMuli avatar Oct 26 '25 06:10 BTMuli

我倒觉得可以剔除

参考其他有region的游戏处理吧

Lightczx avatar Oct 27 '25 02:10 Lightczx

// 与 hk4e 字段信息类型对齐,调整 uid 跟 timezone 的类型
type Hk4eUGC = {
  uid: string|number;
  timezone: number;
  lang?: string;
  list: BeyondItem[];
}

// item_name,item_type 可选,rank_type 保留
type BeyondItem = {
  id: string;
  schedule_id: string;
  item_type?: string;
  item_id: string;
  item_name?: string;
  rank_type: string;
  is_up: string;
  time: string;
  gacha_type: string;
  op_gacha_type: string;
}

BTMuli avatar Oct 27 '25 04:10 BTMuli

来自两个不同账号的 奇偶·女性装扮活动颂愿 的数据: 传说(5星)装扮 女性装扮·「烛影狂欢夜」 的字段 is_up 均为 0

API 请求时间:2025/10/25 14:01

{
  "retcode": 0,
  "message": "OK",
  "data": {
    "total": "0",
    "list": [
      {
        "id": "1761217800000176385",
        "region": "cn_gf01",
        "uid": "",
        "schedule_id": "20",
        "item_type": "装扮套装",
        "item_id": "265044",
        "item_name": "女性装扮·「烛影狂欢夜」",
        "rank_type": "5",
        "is_up": "0",
        "time": "2025-10-23 19:52:08",
        "op_gacha_type": "20021"
      },
      {
        "id": "1761217800000176285",
        "region": "cn_gf01",
        "uid": "",
        "schedule_id": "20",
        "item_type": "装扮部件",
        "item_id": "260109",
        "item_name": "女性装扮·「炽烈长袖衫」",
        "rank_type": "3",
        "is_up": "0",
        "time": "2025-10-23 19:52:08",
        "op_gacha_type": "20021"
      }
    ]
  }
}

API 请求时间:2025/10/27 16:21

{
  "retcode": 0,
  "message": "OK",
  "data": {
    "total": "0",
    "list": [
      {
        "id": "1761142200000295962",
        "region": "cn_gf01",
        "uid": "",
        "schedule_id": "20",
        "item_type": "装扮套装",
        "item_id": "265044",
        "item_name": "女性装扮·「烛影狂欢夜」",
        "rank_type": "5",
        "is_up": "0",
        "time": "2025-10-22 22:38:11",
        "op_gacha_type": "20021"
      },
      {
        "id": "1761142200000290962",
        "region": "cn_gf01",
        "uid": "",
        "schedule_id": "20",
        "item_type": "装扮部件",
        "item_id": "260870",
        "item_name": "男性装扮·「初露束脚裤」",
        "rank_type": "3",
        "is_up": "0",
        "time": "2025-10-22 22:37:43",
        "op_gacha_type": "20021"
      }
    ]
  }
}

lgou2w avatar Oct 27 '25 08:10 lgou2w