Merge branch 'codex/profile-mobile-ui-reference'
This commit is contained in:
@@ -11,6 +11,9 @@ impl From<module_runtime::CreationEntryTypeAdminUpsertInput> for CreationEntryTy
|
||||
visible: input.visible,
|
||||
open: input.open,
|
||||
sort_order: input.sort_order,
|
||||
category_id: input.category_id,
|
||||
category_label: input.category_label,
|
||||
category_sort_order: input.category_sort_order,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,6 +154,29 @@ pub(crate) fn build_creation_entry_config_record_from_rows(
|
||||
title: header.modal_title,
|
||||
description: header.modal_description,
|
||||
},
|
||||
event_banner: module_runtime::CreationEntryEventBannerSnapshot {
|
||||
title: creation_entry_text_or_default(
|
||||
header.event_title,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_EVENT_TITLE,
|
||||
),
|
||||
description: creation_entry_text_or_default(
|
||||
header.event_description,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_EVENT_DESCRIPTION,
|
||||
),
|
||||
cover_image_src: creation_entry_text_or_default(
|
||||
header.event_cover_image_src,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_EVENT_COVER_IMAGE_SRC,
|
||||
),
|
||||
prize_pool_mud_points: header.event_prize_pool_mud_points,
|
||||
starts_at_text: creation_entry_text_or_default(
|
||||
header.event_starts_at_text,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_EVENT_STARTS_AT_TEXT,
|
||||
),
|
||||
ends_at_text: creation_entry_text_or_default(
|
||||
header.event_ends_at_text,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_EVENT_ENDS_AT_TEXT,
|
||||
),
|
||||
},
|
||||
creation_types: creation_types
|
||||
.into_iter()
|
||||
.map(|item| module_runtime::CreationEntryTypeSnapshot {
|
||||
@@ -162,6 +188,15 @@ pub(crate) fn build_creation_entry_config_record_from_rows(
|
||||
visible: item.visible,
|
||||
open: item.open,
|
||||
sort_order: item.sort_order,
|
||||
category_id: creation_entry_text_or_default(
|
||||
item.category_id,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_ID,
|
||||
),
|
||||
category_label: creation_entry_text_or_default(
|
||||
item.category_label,
|
||||
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_LABEL,
|
||||
),
|
||||
category_sort_order: item.category_sort_order,
|
||||
updated_at_micros: item.updated_at.to_micros_since_unix_epoch(),
|
||||
})
|
||||
.collect(),
|
||||
@@ -185,6 +220,14 @@ fn map_creation_entry_config_snapshot(
|
||||
title: snapshot.type_modal.title,
|
||||
description: snapshot.type_modal.description,
|
||||
},
|
||||
event_banner: module_runtime::CreationEntryEventBannerSnapshot {
|
||||
title: snapshot.event_banner.title,
|
||||
description: snapshot.event_banner.description,
|
||||
cover_image_src: snapshot.event_banner.cover_image_src,
|
||||
prize_pool_mud_points: snapshot.event_banner.prize_pool_mud_points,
|
||||
starts_at_text: snapshot.event_banner.starts_at_text,
|
||||
ends_at_text: snapshot.event_banner.ends_at_text,
|
||||
},
|
||||
creation_types: snapshot
|
||||
.creation_types
|
||||
.into_iter()
|
||||
@@ -197,6 +240,9 @@ fn map_creation_entry_config_snapshot(
|
||||
visible: item.visible,
|
||||
open: item.open,
|
||||
sort_order: item.sort_order,
|
||||
category_id: item.category_id,
|
||||
category_label: item.category_label,
|
||||
category_sort_order: item.category_sort_order,
|
||||
updated_at_micros: item.updated_at_micros,
|
||||
})
|
||||
.collect(),
|
||||
@@ -204,6 +250,13 @@ fn map_creation_entry_config_snapshot(
|
||||
}
|
||||
}
|
||||
|
||||
fn creation_entry_text_or_default(value: Option<String>, default_value: &str) -> String {
|
||||
value
|
||||
.map(|value| value.trim().to_string())
|
||||
.filter(|value| !value.is_empty())
|
||||
.unwrap_or_else(|| default_value.to_string())
|
||||
}
|
||||
|
||||
pub(crate) fn map_runtime_setting_procedure_result(
|
||||
result: RuntimeSettingProcedureResult,
|
||||
) -> Result<RuntimeSettingsRecord, SpacetimeClientError> {
|
||||
|
||||
@@ -234,6 +234,7 @@ pub mod creation_entry_config_procedure_result_type;
|
||||
pub mod creation_entry_config_snapshot_type;
|
||||
pub mod creation_entry_config_table;
|
||||
pub mod creation_entry_config_type;
|
||||
pub mod creation_entry_event_banner_snapshot_type;
|
||||
pub mod creation_entry_start_card_snapshot_type;
|
||||
pub mod creation_entry_type_admin_upsert_input_type;
|
||||
pub mod creation_entry_type_config_table;
|
||||
@@ -1262,6 +1263,7 @@ pub use creation_entry_config_procedure_result_type::CreationEntryConfigProcedur
|
||||
pub use creation_entry_config_snapshot_type::CreationEntryConfigSnapshot;
|
||||
pub use creation_entry_config_table::*;
|
||||
pub use creation_entry_config_type::CreationEntryConfig;
|
||||
pub use creation_entry_event_banner_snapshot_type::CreationEntryEventBannerSnapshot;
|
||||
pub use creation_entry_start_card_snapshot_type::CreationEntryStartCardSnapshot;
|
||||
pub use creation_entry_type_admin_upsert_input_type::CreationEntryTypeAdminUpsertInput;
|
||||
pub use creation_entry_type_config_table::*;
|
||||
@@ -3285,10 +3287,6 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
&self.visual_novel_work_profile,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.profile_id);
|
||||
diff.bark_battle_gallery_view = cache.apply_diff_to_table::<BarkBattleGalleryViewRow>(
|
||||
"bark_battle_gallery_view",
|
||||
&self.bark_battle_gallery_view,
|
||||
);
|
||||
diff.wooden_fish_agent_session = cache
|
||||
.apply_diff_to_table::<WoodenFishAgentSessionRow>(
|
||||
"wooden_fish_agent_session",
|
||||
@@ -3310,6 +3308,10 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
&self.wooden_fish_work_profile,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.profile_id);
|
||||
diff.bark_battle_gallery_view = cache.apply_diff_to_table::<BarkBattleGalleryViewRow>(
|
||||
"bark_battle_gallery_view",
|
||||
&self.bark_battle_gallery_view,
|
||||
);
|
||||
diff.big_fish_gallery_view = cache.apply_diff_to_table::<BigFishWorkSummarySnapshot>(
|
||||
"big_fish_gallery_view",
|
||||
&self.big_fish_gallery_view,
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::creation_entry_event_banner_snapshot_type::CreationEntryEventBannerSnapshot;
|
||||
use super::creation_entry_start_card_snapshot_type::CreationEntryStartCardSnapshot;
|
||||
use super::creation_entry_type_modal_snapshot_type::CreationEntryTypeModalSnapshot;
|
||||
use super::creation_entry_type_snapshot_type::CreationEntryTypeSnapshot;
|
||||
@@ -14,6 +15,7 @@ pub struct CreationEntryConfigSnapshot {
|
||||
pub config_id: String,
|
||||
pub start_card: CreationEntryStartCardSnapshot,
|
||||
pub type_modal: CreationEntryTypeModalSnapshot,
|
||||
pub event_banner: CreationEntryEventBannerSnapshot,
|
||||
pub creation_types: Vec<CreationEntryTypeSnapshot>,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ pub struct CreationEntryConfig {
|
||||
pub modal_title: String,
|
||||
pub modal_description: String,
|
||||
pub updated_at: __sdk::Timestamp,
|
||||
pub event_title: Option<String>,
|
||||
pub event_description: Option<String>,
|
||||
pub event_cover_image_src: Option<String>,
|
||||
pub event_prize_pool_mud_points: u64,
|
||||
pub event_starts_at_text: Option<String>,
|
||||
pub event_ends_at_text: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CreationEntryConfig {
|
||||
@@ -33,6 +39,12 @@ pub struct CreationEntryConfigCols {
|
||||
pub modal_title: __sdk::__query_builder::Col<CreationEntryConfig, String>,
|
||||
pub modal_description: __sdk::__query_builder::Col<CreationEntryConfig, String>,
|
||||
pub updated_at: __sdk::__query_builder::Col<CreationEntryConfig, __sdk::Timestamp>,
|
||||
pub event_title: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
|
||||
pub event_description: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
|
||||
pub event_cover_image_src: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
|
||||
pub event_prize_pool_mud_points: __sdk::__query_builder::Col<CreationEntryConfig, u64>,
|
||||
pub event_starts_at_text: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
|
||||
pub event_ends_at_text: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for CreationEntryConfig {
|
||||
@@ -47,6 +59,21 @@ impl __sdk::__query_builder::HasCols for CreationEntryConfig {
|
||||
modal_title: __sdk::__query_builder::Col::new(table_name, "modal_title"),
|
||||
modal_description: __sdk::__query_builder::Col::new(table_name, "modal_description"),
|
||||
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
|
||||
event_title: __sdk::__query_builder::Col::new(table_name, "event_title"),
|
||||
event_description: __sdk::__query_builder::Col::new(table_name, "event_description"),
|
||||
event_cover_image_src: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"event_cover_image_src",
|
||||
),
|
||||
event_prize_pool_mud_points: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"event_prize_pool_mud_points",
|
||||
),
|
||||
event_starts_at_text: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"event_starts_at_text",
|
||||
),
|
||||
event_ends_at_text: __sdk::__query_builder::Col::new(table_name, "event_ends_at_text"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct CreationEntryEventBannerSnapshot {
|
||||
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,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CreationEntryEventBannerSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -15,6 +15,9 @@ pub struct CreationEntryTypeAdminUpsertInput {
|
||||
pub visible: bool,
|
||||
pub open: bool,
|
||||
pub sort_order: i32,
|
||||
pub category_id: String,
|
||||
pub category_label: String,
|
||||
pub category_sort_order: i32,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CreationEntryTypeAdminUpsertInput {
|
||||
|
||||
@@ -16,6 +16,9 @@ pub struct CreationEntryTypeConfig {
|
||||
pub open: bool,
|
||||
pub sort_order: i32,
|
||||
pub updated_at: __sdk::Timestamp,
|
||||
pub category_id: Option<String>,
|
||||
pub category_label: Option<String>,
|
||||
pub category_sort_order: i32,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CreationEntryTypeConfig {
|
||||
@@ -35,6 +38,9 @@ pub struct CreationEntryTypeConfigCols {
|
||||
pub open: __sdk::__query_builder::Col<CreationEntryTypeConfig, bool>,
|
||||
pub sort_order: __sdk::__query_builder::Col<CreationEntryTypeConfig, i32>,
|
||||
pub updated_at: __sdk::__query_builder::Col<CreationEntryTypeConfig, __sdk::Timestamp>,
|
||||
pub category_id: __sdk::__query_builder::Col<CreationEntryTypeConfig, Option<String>>,
|
||||
pub category_label: __sdk::__query_builder::Col<CreationEntryTypeConfig, Option<String>>,
|
||||
pub category_sort_order: __sdk::__query_builder::Col<CreationEntryTypeConfig, i32>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for CreationEntryTypeConfig {
|
||||
@@ -50,6 +56,12 @@ impl __sdk::__query_builder::HasCols for CreationEntryTypeConfig {
|
||||
open: __sdk::__query_builder::Col::new(table_name, "open"),
|
||||
sort_order: __sdk::__query_builder::Col::new(table_name, "sort_order"),
|
||||
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
|
||||
category_id: __sdk::__query_builder::Col::new(table_name, "category_id"),
|
||||
category_label: __sdk::__query_builder::Col::new(table_name, "category_label"),
|
||||
category_sort_order: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"category_sort_order",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ pub struct CreationEntryTypeSnapshot {
|
||||
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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user