games-development-ai/contracts/ad-slot.schema.json
zizi 9e95a66ea6 refactor: 技术命名空间 huijing→wanxiang 全栈落地(代码+契约,原「只改文档」决策反转)
- Java 包 cn.huijing.game→cn.wanxiang.game:126 .java + 15 目录 git mv(保留历史)+ Application scanBasePackages/@MapperScan + yaml type-aliases
- SDK HuijingGameSDK→WanxiangGameSDK + postMessage channel huijing-game-sdk→wanxiang-game-sdk(契约 + 前端 host/sdk/inject/bridge)
- 契约 contracts/ 同步(sdk-interface.d.ts / runtime.yaml / game-package.schema / $id URL / V3 SQL 注释)
- 主 agent 独立验证全绿:后端集成编译+55 单测(cn.wanxiang)、前端 build+/browse 冒烟(WanxiangGameSDK+demo 911 像素+遥测 200)、残留 huijing=0、Flyway 5 迁移 diff-identical、yudao cn.iocoder.yudao 2167 文件未误伤
- 保留 yudao 框架 cn.iocoder.yudao + Maven groupId cn.iocoder.cloud

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:16:52 +00:00

54 lines
2.0 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://wanxiang.ai/contracts/ad-slot.schema.json",
"title": "AdSlotConfig",
"description": "契约 #7 广告位配置(owner=WS5)。ad 模块 CRUD + SDK Plugin.Ad 据此拉取广告。provider=mock 时走桩,真实联盟审核通过后注入真实 appId/广告位 id(MVP 默认 mock,见执行 spec 风险#6)。",
"type": "object",
"required": ["slotId", "type", "provider", "enabled"],
"additionalProperties": false,
"properties": {
"slotId": {
"description": "广告位逻辑 ID(平台内唯一,埋点 ad_impression.slot_id 引用)",
"type": "string",
"minLength": 1
},
"type": {
"description": "广告形式",
"type": "string",
"enum": ["rewarded", "interstitial", "banner"]
},
"provider": {
"description": "广告联盟:csj=穿山甲 / gdt=优量汇 / mock=桩(MVP 默认)",
"type": "string",
"enum": ["csj", "gdt", "mock"]
},
"placement": {
"description": "触发场景:game_end=本局结束 / pause=暂停 / feed=游戏流间隙",
"type": "string",
"enum": ["game_end", "pause", "feed"]
},
"providerSlotId": {
"description": "联盟侧真实广告位 ID(provider!=mock 时必填,由人提供 — 审核闸门后注入)",
"type": "string"
},
"ecpmFloor": {
"description": "eCPM 底价(分),低于此不展示",
"type": "number",
"minimum": 0
},
"enabled": {
"description": "是否启用",
"type": "boolean"
},
"compliance": {
"description": "合规植入规则(未成年人禁广告等,见 security-and-reliability 未成年人保护)",
"type": "object",
"additionalProperties": false,
"properties": {
"blockMinor": { "description": "识别为未成年则不展示", "type": "boolean", "default": true },
"maxPerSession": { "description": "单会话最大展示次数", "type": "integer", "minimum": 0 }
}
}
}
}