1
This commit is contained in:
@@ -2436,6 +2436,8 @@ pub(crate) fn map_puzzle_work_profile(
|
||||
remix_count: snapshot.remix_count,
|
||||
like_count: snapshot.like_count,
|
||||
recent_play_count_7d: snapshot.recent_play_count_7d,
|
||||
point_incentive_total_half_points: snapshot.point_incentive_total_half_points,
|
||||
point_incentive_claimed_points: snapshot.point_incentive_claimed_points,
|
||||
publish_ready: snapshot.publish_ready,
|
||||
anchor_pack: map_puzzle_anchor_pack(snapshot.anchor_pack),
|
||||
levels: snapshot
|
||||
@@ -2491,6 +2493,13 @@ fn map_puzzle_recommended_next_work(
|
||||
pub(crate) fn map_puzzle_runtime_level_snapshot(
|
||||
snapshot: DomainPuzzleRuntimeLevelSnapshot,
|
||||
) -> PuzzleRuntimeLevelRecord {
|
||||
// 中文注释:历史 run_json 可能缺 started_at_ms,领域 serde 会回填为 0;API 层继续补成 1,避免前端计时器拿到无效开局时间。
|
||||
let started_at_ms = if snapshot.started_at_ms == 0 {
|
||||
1
|
||||
} else {
|
||||
snapshot.started_at_ms
|
||||
};
|
||||
|
||||
PuzzleRuntimeLevelRecord {
|
||||
run_id: snapshot.run_id,
|
||||
level_index: snapshot.level_index,
|
||||
@@ -2503,7 +2512,7 @@ pub(crate) fn map_puzzle_runtime_level_snapshot(
|
||||
cover_image_src: snapshot.cover_image_src,
|
||||
board: map_puzzle_board_snapshot(snapshot.board),
|
||||
status: snapshot.status.as_str().to_string(),
|
||||
started_at_ms: snapshot.started_at_ms,
|
||||
started_at_ms,
|
||||
cleared_at_ms: snapshot.cleared_at_ms,
|
||||
elapsed_ms: snapshot.elapsed_ms,
|
||||
time_limit_ms: snapshot.time_limit_ms,
|
||||
@@ -3485,6 +3494,9 @@ pub(crate) fn map_runtime_profile_wallet_ledger_source_type_back(
|
||||
crate::module_bindings::RuntimeProfileWalletLedgerSourceType::RedeemCodeReward => {
|
||||
module_runtime::RuntimeProfileWalletLedgerSourceType::RedeemCodeReward
|
||||
}
|
||||
crate::module_bindings::RuntimeProfileWalletLedgerSourceType::PuzzleAuthorIncentiveClaim => {
|
||||
module_runtime::RuntimeProfileWalletLedgerSourceType::PuzzleAuthorIncentiveClaim
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4535,6 +4547,7 @@ pub struct PuzzleRunPropRecordInput {
|
||||
pub owner_user_id: String,
|
||||
pub prop_kind: String,
|
||||
pub used_at_micros: i64,
|
||||
pub spent_points: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
@@ -4716,11 +4729,20 @@ pub struct PuzzleWorkProfileRecord {
|
||||
pub remix_count: u32,
|
||||
pub like_count: u32,
|
||||
pub recent_play_count_7d: u32,
|
||||
pub point_incentive_total_half_points: u64,
|
||||
pub point_incentive_claimed_points: u64,
|
||||
pub publish_ready: bool,
|
||||
pub anchor_pack: PuzzleAnchorPackRecord,
|
||||
pub levels: Vec<PuzzleDraftLevelRecord>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PuzzleWorkPointIncentiveClaimRecordInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub claimed_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PuzzleCellPositionRecord {
|
||||
pub row: u32,
|
||||
|
||||
Reference in New Issue
Block a user