Merge remote-tracking branch 'origin/master' into feat/recommend-runtime-guest
# Conflicts: # docs/【玩法创作】平台入口与玩法链路-2026-05-15.md
This commit is contained in:
@@ -30,6 +30,9 @@ pub struct AdminCreationEntryTypeConfigPayload {
|
||||
pub visible: bool,
|
||||
pub open: bool,
|
||||
pub sort_order: i32,
|
||||
pub category_id: String,
|
||||
pub category_label: String,
|
||||
pub category_sort_order: i32,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
@@ -45,6 +48,9 @@ pub struct AdminUpsertCreationEntryTypeConfigRequest {
|
||||
pub visible: bool,
|
||||
pub open: bool,
|
||||
pub sort_order: i32,
|
||||
pub category_id: String,
|
||||
pub category_label: String,
|
||||
pub category_sort_order: i32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
|
||||
@@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct CreationEntryConfigResponse {
|
||||
pub start_card: CreationEntryStartCardResponse,
|
||||
pub type_modal: CreationEntryTypeModalResponse,
|
||||
pub event_banner: CreationEntryEventBannerResponse,
|
||||
pub creation_types: Vec<CreationEntryTypeResponse>,
|
||||
}
|
||||
|
||||
@@ -24,6 +25,17 @@ pub struct CreationEntryTypeModalResponse {
|
||||
pub description: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CreationEntryEventBannerResponse {
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub cover_image_src: String,
|
||||
pub prize_pool_mud_points: u64,
|
||||
pub starts_at_text: String,
|
||||
pub ends_at_text: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CreationEntryTypeResponse {
|
||||
@@ -35,5 +47,8 @@ pub struct CreationEntryTypeResponse {
|
||||
pub visible: bool,
|
||||
pub open: bool,
|
||||
pub sort_order: i32,
|
||||
pub category_id: String,
|
||||
pub category_label: String,
|
||||
pub category_sort_order: i32,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
@@ -93,6 +93,9 @@ pub struct WoodenFishActionRequest {
|
||||
#[serde(skip_deserializing)]
|
||||
pub background_asset: Option<WoodenFishImageAsset>,
|
||||
#[serde(default)]
|
||||
#[serde(skip_deserializing)]
|
||||
pub back_button_asset: Option<WoodenFishImageAsset>,
|
||||
#[serde(default)]
|
||||
pub hit_sound_prompt: Option<String>,
|
||||
#[serde(default)]
|
||||
pub hit_sound_asset: Option<WoodenFishAudioAsset>,
|
||||
@@ -128,6 +131,8 @@ pub struct WoodenFishDraftResponse {
|
||||
#[serde(default)]
|
||||
pub background_asset: Option<WoodenFishImageAsset>,
|
||||
#[serde(default)]
|
||||
pub back_button_asset: Option<WoodenFishImageAsset>,
|
||||
#[serde(default)]
|
||||
pub hit_sound_asset: Option<WoodenFishAudioAsset>,
|
||||
#[serde(default)]
|
||||
pub cover_image_src: Option<String>,
|
||||
@@ -192,6 +197,8 @@ pub struct WoodenFishWorkProfileResponse {
|
||||
pub hit_object_asset: WoodenFishImageAsset,
|
||||
#[serde(default)]
|
||||
pub background_asset: Option<WoodenFishImageAsset>,
|
||||
#[serde(default)]
|
||||
pub back_button_asset: Option<WoodenFishImageAsset>,
|
||||
pub hit_sound_asset: WoodenFishAudioAsset,
|
||||
pub floating_words: Vec<String>,
|
||||
}
|
||||
@@ -384,6 +391,18 @@ mod tests {
|
||||
width: 1024,
|
||||
height: 1536,
|
||||
}),
|
||||
back_button_asset: Some(WoodenFishImageAsset {
|
||||
asset_id: "back-button-1".to_string(),
|
||||
image_src: "/generated-wooden-fish-assets/profile/back-button/image.png"
|
||||
.to_string(),
|
||||
image_object_key: "generated-wooden-fish-assets/profile/back-button/image.png"
|
||||
.to_string(),
|
||||
asset_object_id: "back-button-object-1".to_string(),
|
||||
generation_provider: "image2".to_string(),
|
||||
prompt: "赛博莲花返回按钮".to_string(),
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
}),
|
||||
hit_sound_prompt: Some("短促木鱼声".to_string()),
|
||||
hit_sound_asset: Some(WoodenFishAudioAsset {
|
||||
asset_id: "sound-1".to_string(),
|
||||
@@ -406,6 +425,7 @@ mod tests {
|
||||
json!("generated-wooden-fish-assets/profile/hit-object/image.png")
|
||||
);
|
||||
assert_eq!(payload["backgroundAsset"]["height"], json!(1536));
|
||||
assert_eq!(payload["backButtonAsset"]["width"], json!(1024));
|
||||
assert_eq!(payload["hitSoundAsset"]["source"], json!("upload"));
|
||||
assert_eq!(payload["hitSoundAsset"]["durationMs"], json!(800));
|
||||
}
|
||||
@@ -454,6 +474,16 @@ mod tests {
|
||||
prompt: Some("清脆木鱼".to_string()),
|
||||
duration_ms: Some(600),
|
||||
};
|
||||
let back_button = WoodenFishImageAsset {
|
||||
asset_id: "back-button-1".to_string(),
|
||||
image_src: "/generated/wooden-fish-back-button.png".to_string(),
|
||||
image_object_key: "generated/wooden-fish-back-button.png".to_string(),
|
||||
asset_object_id: "back-button-object-1".to_string(),
|
||||
generation_provider: "image2".to_string(),
|
||||
prompt: "主题返回按钮".to_string(),
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
};
|
||||
let profile = WoodenFishWorkProfileResponse {
|
||||
summary: WoodenFishWorkSummaryResponse {
|
||||
runtime_kind: "wooden-fish".to_string(),
|
||||
@@ -485,12 +515,14 @@ mod tests {
|
||||
floating_words: vec!["功德".to_string()],
|
||||
hit_object_asset: Some(image.clone()),
|
||||
background_asset: None,
|
||||
back_button_asset: Some(back_button.clone()),
|
||||
hit_sound_asset: Some(audio.clone()),
|
||||
cover_image_src: Some(image.image_src.clone()),
|
||||
generation_status: WoodenFishGenerationStatus::Ready,
|
||||
},
|
||||
hit_object_asset: image,
|
||||
background_asset: None,
|
||||
back_button_asset: Some(back_button),
|
||||
hit_sound_asset: audio,
|
||||
floating_words: vec!["功德".to_string()],
|
||||
};
|
||||
@@ -503,5 +535,9 @@ mod tests {
|
||||
json!("image2")
|
||||
);
|
||||
assert_eq!(payload["hitSoundAsset"]["source"], json!("generated"));
|
||||
assert_eq!(
|
||||
payload["backButtonAsset"]["imageSrc"],
|
||||
json!("/generated/wooden-fish-back-button.png")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user