refactor(types): align entity types with backend API responses

Adjust all entity types to match actual backend response shapes.
String-typed numeric fields (Shop.rating, Shop.commissionValue,
WalletTransaction.amount) now correctly typed as strings.
Post.linkedOrderId changed from SnowflakeId to number (backend int64).
Removed fields absent from backend: Order consumer/player/shopName,
Review fromUserAvatar/toUserId, Dispute initiatorId/initiatorName,
Post authorRole/quotedPostId, Comment postId, ChatSession
readonly/lastMessageAt, ChatMessage senderName/senderAvatar.
Added Player.gender field.
This commit is contained in:
zetaloop
2026-04-23 21:14:46 +08:00
parent d0985a91b8
commit ca4bef959f
5 changed files with 38 additions and 40 deletions
+13 -9
View File
@@ -34,6 +34,7 @@ const players: SearchCatalogData["players"] = [
},
],
shopId: "3002",
gender: true,
tags: ["moba"],
},
{
@@ -65,6 +66,7 @@ const players: SearchCatalogData["players"] = [
},
],
shopId: "3003",
gender: true,
tags: [],
},
{
@@ -96,6 +98,7 @@ const players: SearchCatalogData["players"] = [
},
],
shopId: "3001",
gender: false,
tags: ["fps"],
},
{
@@ -127,6 +130,7 @@ const players: SearchCatalogData["players"] = [
},
],
shopId: "3003",
gender: true,
tags: [],
},
]
@@ -144,13 +148,13 @@ const shops: SearchCatalogData["shops"] = [
},
name: "CS2 Hub",
description: "",
rating: 4.6,
rating: "4.6",
totalOrders: 300,
playerCount: 1,
commissionType: "fixed",
commissionValue: 0,
commissionValue: "0",
allowMultiShop: false,
allowIndependentOrders: true,
allowIndependentOrders: false,
dispatchMode: "manual",
announcements: [],
templateConfig: { sections: [] },
@@ -167,13 +171,13 @@ const shops: SearchCatalogData["shops"] = [
},
name: "Yuki Studio",
description: "",
rating: 4.2,
rating: "4.2",
totalOrders: 50,
playerCount: 1,
commissionType: "fixed",
commissionValue: 0,
commissionValue: "0",
allowMultiShop: false,
allowIndependentOrders: true,
allowIndependentOrders: false,
dispatchMode: "manual",
announcements: [],
templateConfig: { sections: [] },
@@ -190,13 +194,13 @@ const shops: SearchCatalogData["shops"] = [
},
name: "Quiet Shop",
description: "",
rating: 3.8,
rating: "3.8",
totalOrders: 10,
playerCount: 2,
commissionType: "fixed",
commissionValue: 0,
commissionValue: "0",
allowMultiShop: false,
allowIndependentOrders: true,
allowIndependentOrders: false,
dispatchMode: "manual",
announcements: [],
templateConfig: { sections: [] },