fix: polish bark battle creation flow
This commit is contained in:
@@ -24,11 +24,10 @@ pub struct BarkBattleDraftCreateInput {
|
||||
pub work_id: String,
|
||||
pub title: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub theme_preset: String,
|
||||
pub player_dog_skin_preset: String,
|
||||
pub opponent_dog_skin_preset: String,
|
||||
pub theme_description: String,
|
||||
pub player_image_description: String,
|
||||
pub opponent_image_description: String,
|
||||
pub difficulty_preset: Option<String>,
|
||||
pub leaderboard_enabled: Option<bool>,
|
||||
pub editor_state_json: Option<String>,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
@@ -41,7 +40,6 @@ pub struct BarkBattleDraftConfigUpsertInput {
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub config_json: String,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
@@ -116,19 +114,18 @@ pub struct BarkBattleProcedureResult {
|
||||
pub struct BarkBattleEditorConfigSnapshot {
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub theme_preset: String,
|
||||
pub player_dog_skin_preset: String,
|
||||
pub opponent_dog_skin_preset: String,
|
||||
pub theme_description: String,
|
||||
pub player_image_description: String,
|
||||
pub opponent_image_description: String,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub onomatopoeia: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub player_character_image_src: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub opponent_character_image_src: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub ui_background_image_src: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub bark_sound_src: Option<String>,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, SpacetimeType)]
|
||||
@@ -140,7 +137,6 @@ pub struct BarkBattleDraftConfigSnapshot {
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub config_json: String,
|
||||
pub editor_state_json: String,
|
||||
pub created_at_micros: i64,
|
||||
@@ -156,7 +152,6 @@ pub struct BarkBattleRuntimeConfigSnapshot {
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub config_json: String,
|
||||
pub published_snapshot_json: String,
|
||||
pub published_at_micros: i64,
|
||||
@@ -172,7 +167,6 @@ pub struct BarkBattleRunSnapshot {
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub status: String,
|
||||
pub client_started_at_micros: i64,
|
||||
pub server_started_at_micros: i64,
|
||||
@@ -185,3 +179,31 @@ pub struct BarkBattleRunSnapshot {
|
||||
pub leaderboard_score: Option<u64>,
|
||||
pub score_id: Option<String>,
|
||||
}
|
||||
|
||||
/// Bark Battle 公开广场只读投影行。
|
||||
///
|
||||
/// 该结构只暴露 v1 公共卡片需要的配置和基础统计,不把内部排行榜开关或旧皮肤 /
|
||||
/// 音效预设重新带回公开语义。
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SpacetimeType)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct BarkBattleGalleryViewRow {
|
||||
pub work_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_draft_id: Option<String>,
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub theme_description: String,
|
||||
pub player_image_description: String,
|
||||
pub opponent_image_description: String,
|
||||
pub onomatopoeia: Vec<String>,
|
||||
pub player_character_image_src: Option<String>,
|
||||
pub opponent_character_image_src: Option<String>,
|
||||
pub ui_background_image_src: Option<String>,
|
||||
pub play_count: u64,
|
||||
pub finish_count: u64,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: i64,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user