Files
Cloud-Tour-to-Libo/qa/graph-creation-fixtures/libo_complex_schema.v1.json
T

513 lines
11 KiB
JSON

{
"namespace": "libo_complex_manual_test_20260805_01",
"version": "1.0.0",
"display_name": "荔波旅游复杂测试模型",
"description": "用于手工验证图谱创建、Schema 校验、节点导入、复杂关系、图谱浏览和安全删除的综合测试模型。",
"enums": {
"Season": [
"spring",
"summer",
"autumn",
"winter",
"all_year"
],
"TipSeverity": [
"info",
"warning",
"critical"
],
"MealType": [
"breakfast",
"lunch",
"dinner"
]
},
"design_principles": [
"TourRoute 通过 RouteDay 表达有序的多日行程。",
"RouteDay 分别关联游览点、酒店、餐厅和交通枢纽。",
"ScenicArea 与 ScenicSpot 分层表达景区和景点。",
"票务政策和旅行提示作为独立实体,便于复用和版本管理。"
],
"entity_types": {
"ScenicArea": {
"label": "景区",
"description": "可包含多个具体景点的景区级实体。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true,
"description": "景区名称"
},
"level": {
"type": "string",
"description": "景区等级"
},
"rating": {
"type": "number",
"description": "综合评分"
},
"open": {
"type": "boolean",
"description": "是否开放"
},
"tags": {
"type": "array",
"description": "景区标签"
},
"geo": {
"type": "object",
"description": "经纬度对象"
},
"description": {
"type": "string"
}
}
},
"ScenicSpot": {
"label": "景点",
"description": "景区内可独立游览的景点。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"spot_type": {
"type": "string",
"required": true
},
"visit_minutes": {
"type": "integer"
},
"indoor": {
"type": "boolean"
},
"best_seasons": {
"type": "array"
},
"description": {
"type": "string"
}
}
},
"Hotel": {
"label": "酒店",
"description": "行程住宿资源。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"stars": {
"type": "integer",
"required": true
},
"price_from": {
"type": "number"
},
"family_friendly": {
"type": "boolean"
},
"amenities": {
"type": "array"
},
"address": {
"type": "string"
},
"contact": {
"type": "object"
}
}
},
"Restaurant": {
"label": "餐厅",
"description": "行程餐饮资源。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"cuisine": {
"type": "string",
"required": true
},
"avg_price": {
"type": "number"
},
"specialties": {
"type": "array"
},
"vegetarian_options": {
"type": "boolean"
},
"opening_hours": {
"type": "string"
}
}
},
"TransportHub": {
"label": "交通枢纽",
"description": "高铁站、汽车站或游客中心等交通节点。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"hub_type": {
"type": "string",
"required": true
},
"service_hours": {
"type": "string"
},
"accessible": {
"type": "boolean"
},
"facilities": {
"type": "array"
},
"geo": {
"type": "object"
}
}
},
"TourRoute": {
"label": "旅游线路",
"description": "由多个有序行程日组成的旅游产品线路。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"days": {
"type": "integer",
"required": true
},
"theme": {
"type": "string"
},
"suitable_for": {
"type": "array"
},
"base_price": {
"type": "number"
},
"active": {
"type": "boolean"
},
"extra_metadata": {
"type": "any",
"description": "用于验证 any 类型的扩展信息"
}
}
},
"RouteDay": {
"label": "行程日",
"description": "线路中的某一天。",
"fields": {
"title": {
"type": "string",
"required": true
},
"day_no": {
"type": "integer",
"required": true
},
"summary": {
"type": "string"
},
"estimated_cost": {
"type": "number"
}
}
},
"Activity": {
"label": "体验活动",
"description": "景点可提供的附加体验活动。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"activity_type": {
"type": "string",
"required": true
},
"duration_minutes": {
"type": "integer"
},
"min_age": {
"type": "integer"
},
"booking_required": {
"type": "boolean"
},
"equipment": {
"type": "array"
}
}
},
"TicketPolicy": {
"label": "票务政策",
"description": "景区或景点的票价和退改政策。",
"primary_key": "name",
"fields": {
"name": {
"type": "string",
"required": true
},
"adult_price": {
"type": "number",
"required": true
},
"child_price": {
"type": "number"
},
"free_policy": {
"type": "string"
},
"valid_from": {
"type": "date"
},
"refundable": {
"type": "boolean"
}
}
},
"TravelTip": {
"label": "旅行提示",
"description": "可应用到景区、资源或线路的提醒。",
"primary_key": "title",
"fields": {
"title": {
"type": "string",
"required": true
},
"content": {
"type": "string",
"required": true
},
"severity": {
"type": "string",
"required": true
},
"audiences": {
"type": "array"
},
"updated_at": {
"type": "datetime"
}
}
}
},
"relation_types": {
"CONTAINS": {
"label": "包含景点",
"from": "ScenicArea",
"to": "ScenicSpot",
"properties": {
"recommended_order": {
"type": "integer"
}
}
},
"NEARBY": {
"label": "附近资源",
"from": "ScenicSpot",
"to": "Hotel|Restaurant|TransportHub",
"properties": {
"distance_km": {
"type": "number",
"required": true
},
"drive_minutes": {
"type": "integer"
},
"walkable": {
"type": "boolean"
}
}
},
"ROUTE_HAS_DAY": {
"label": "线路包含行程日",
"from": "TourRoute",
"to": "RouteDay",
"properties": {
"order": {
"type": "integer",
"required": true
}
}
},
"DAY_VISITS": {
"label": "当日游览",
"from": "RouteDay",
"to": "ScenicSpot",
"properties": {
"order": {
"type": "integer",
"required": true
},
"stay_minutes": {
"type": "integer"
},
"must_visit": {
"type": "boolean"
}
}
},
"DAY_STAYS_AT": {
"label": "当日住宿",
"from": "RouteDay",
"to": "Hotel",
"properties": {
"check_in": {
"type": "string",
"required": true
},
"nights": {
"type": "integer"
}
}
},
"DAY_DINES_AT": {
"label": "当日用餐",
"from": "RouteDay",
"to": "Restaurant",
"properties": {
"meal": {
"type": "string",
"required": true
},
"reservation_required": {
"type": "boolean"
}
}
},
"DAY_USES_HUB": {
"label": "当日使用交通枢纽",
"from": "RouteDay",
"to": "TransportHub",
"properties": {
"mode": {
"type": "string",
"required": true
},
"departure_time": {
"type": "string"
}
}
},
"OFFERS_ACTIVITY": {
"label": "提供活动",
"from": "ScenicSpot",
"to": "Activity",
"properties": {
"season": {
"type": "string"
},
"extra_fee": {
"type": "number"
}
}
},
"HAS_TICKET_POLICY": {
"label": "采用票务政策",
"from": "ScenicArea|ScenicSpot",
"to": "TicketPolicy",
"properties": {
"channel": {
"type": "string"
}
}
},
"APPLIES_TIP": {
"label": "提示适用于",
"from": "TravelTip",
"to": "ScenicArea|ScenicSpot|Hotel|Restaurant|TransportHub|TourRoute",
"properties": {
"context": {
"type": "string"
},
"priority": {
"type": "integer"
}
}
},
"ROUTE_STARTS_AT": {
"label": "线路起点",
"from": "TourRoute",
"to": "TransportHub",
"properties": {
"departure_time": {
"type": "string",
"required": true
}
}
},
"ROUTE_ENDS_AT": {
"label": "线路终点",
"from": "TourRoute",
"to": "TransportHub",
"properties": {
"arrival_time": {
"type": "string",
"required": true
}
}
},
"ALTERNATIVE_TO": {
"label": "可替代资源",
"from": "Hotel|Restaurant",
"to": "Hotel|Restaurant",
"properties": {
"reason": {
"type": "string",
"required": true
},
"score": {
"type": "number"
}
}
},
"CONNECTS": {
"label": "交通连接",
"from": "TransportHub",
"to": "TransportHub",
"properties": {
"mode": {
"type": "string",
"required": true
},
"duration_minutes": {
"type": "integer",
"required": true
},
"distance_km": {
"type": "number"
}
}
},
"RECOMMENDS": {
"label": "线路推荐活动",
"from": "TourRoute",
"to": "Activity",
"properties": {
"priority": {
"type": "integer",
"required": true
},
"reason": {
"type": "string"
}
}
}
}
}