feat: 支持创作入口公告配置

This commit is contained in:
2026-06-03 03:31:45 +08:00
parent 1cb11bc1dd
commit 70ff18ad90
52 changed files with 3045 additions and 504 deletions

View File

@@ -16,6 +16,7 @@ pub struct CreationEntryConfigSnapshot {
pub start_card: CreationEntryStartCardSnapshot,
pub type_modal: CreationEntryTypeModalSnapshot,
pub event_banner: CreationEntryEventBannerSnapshot,
pub event_banners_json: Option<String>,
pub creation_types: Vec<CreationEntryTypeSnapshot>,
pub updated_at_micros: i64,
}

View File

@@ -21,6 +21,7 @@ pub struct CreationEntryConfig {
pub event_prize_pool_mud_points: u64,
pub event_starts_at_text: Option<String>,
pub event_ends_at_text: Option<String>,
pub event_banners_json: Option<String>,
}
impl __sdk::InModule for CreationEntryConfig {
@@ -45,6 +46,7 @@ pub struct CreationEntryConfigCols {
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>>,
pub event_banners_json: __sdk::__query_builder::Col<CreationEntryConfig, Option<String>>,
}
impl __sdk::__query_builder::HasCols for CreationEntryConfig {
@@ -74,6 +76,7 @@ impl __sdk::__query_builder::HasCols for CreationEntryConfig {
"event_starts_at_text",
),
event_ends_at_text: __sdk::__query_builder::Col::new(table_name, "event_ends_at_text"),
event_banners_json: __sdk::__query_builder::Col::new(table_name, "event_banners_json"),
}
}
}

View File

@@ -13,6 +13,8 @@ pub struct CreationEntryEventBannerSnapshot {
pub prize_pool_mud_points: u64,
pub starts_at_text: String,
pub ends_at_text: String,
pub render_mode: String,
pub html_code: Option<String>,
}
impl __sdk::InModule for CreationEntryEventBannerSnapshot {

View File

@@ -0,0 +1,15 @@
// 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 CreationEntryEventBannersAdminUpsertInput {
pub event_banners_json: String,
}
impl __sdk::InModule for CreationEntryEventBannersAdminUpsertInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,62 @@
// 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};
use super::creation_entry_config_procedure_result_type::CreationEntryConfigProcedureResult;
use super::creation_entry_event_banners_admin_upsert_input_type::CreationEntryEventBannersAdminUpsertInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct UpsertCreationEntryEventBannersConfigArgs {
pub input: CreationEntryEventBannersAdminUpsertInput,
}
impl __sdk::InModule for UpsertCreationEntryEventBannersConfigArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `upsert_creation_entry_event_banners_config`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait upsert_creation_entry_event_banners_config {
fn upsert_creation_entry_event_banners_config(
&self,
input: CreationEntryEventBannersAdminUpsertInput,
) {
self.upsert_creation_entry_event_banners_config_then(input, |_, _| {});
}
fn upsert_creation_entry_event_banners_config_then(
&self,
input: CreationEntryEventBannersAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CreationEntryConfigProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl upsert_creation_entry_event_banners_config for super::RemoteProcedures {
fn upsert_creation_entry_event_banners_config_then(
&self,
input: CreationEntryEventBannersAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CreationEntryConfigProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CreationEntryConfigProcedureResult>(
"upsert_creation_entry_event_banners_config",
UpsertCreationEntryEventBannersConfigArgs { input },
__callback,
);
}
}