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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user