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
+2 -2
View File
@@ -100,7 +100,7 @@ export function searchCatalog(
__index: nextIndex++,
type: "shop",
shop,
rating: shop.rating,
rating: Number(shop.rating),
orders: shop.totalOrders,
minPrice: derived.minPrice,
unit: derived.unit,
@@ -148,7 +148,7 @@ export function searchCatalog(
if (item.type === "player") {
if (item.player.rating < minRating) return false
} else {
if (item.shop.rating < minRating) return false
if (Number(item.shop.rating) < minRating) return false
}
return true