点赞和改造开关加入后台配置
This commit is contained in:
@@ -65,6 +65,8 @@ pub const DEFAULT_CREATION_ENTRY_EVENT_ENDS_AT_TEXT: &str = "2024.11.20 23:59";
|
||||
pub const CREATION_ENTRY_EVENT_BANNERS_MAX_COUNT: usize = 8;
|
||||
/// 单条 HTML 公告的代码大小上限,避免后台误贴超大片段拖慢入口页。
|
||||
pub const CREATION_ENTRY_EVENT_BANNER_HTML_CODE_MAX_BYTES: usize = 12_000;
|
||||
/// 公开作品互动配置最多允许覆盖的 sourceType 数量。
|
||||
pub const PUBLIC_WORK_INTERACTION_CONFIG_MAX_COUNT: usize = 32;
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
@@ -96,6 +98,17 @@ pub struct CreationEntryEventBannerSnapshot {
|
||||
pub html_code: Option<String>,
|
||||
}
|
||||
|
||||
/// 单类公开作品互动配置,控制作品详情页点赞 / 改造入口与后端动作熔断。
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PublicWorkInteractionConfigSnapshot {
|
||||
pub source_type: String,
|
||||
pub like_enabled: bool,
|
||||
pub remix_enabled: bool,
|
||||
pub like_disabled_message: String,
|
||||
pub remix_disabled_message: String,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct CreationEntryTypeSnapshot {
|
||||
@@ -126,6 +139,8 @@ pub struct CreationEntryConfigSnapshot {
|
||||
pub event_banners_json: Option<String>,
|
||||
pub creation_types: Vec<CreationEntryTypeSnapshot>,
|
||||
pub updated_at_micros: i64,
|
||||
/// 公开作品点赞 / 改造能力 JSON 配置;旧库为空时由应用层兜底。
|
||||
pub public_work_interactions_json: Option<String>,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
@@ -153,6 +168,14 @@ pub struct CreationEntryEventBannersAdminUpsertInput {
|
||||
pub event_banners_json: String,
|
||||
}
|
||||
|
||||
/// 后台保存公开作品互动能力表单序列化结果的领域输入。
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PublicWorkInteractionConfigAdminUpsertInput {
|
||||
/// 持久化字段沿用 JSON 字符串,内容由后台表单生成。
|
||||
pub public_work_interactions_json: String,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct CreationEntryConfigProcedureResult {
|
||||
|
||||
Reference in New Issue
Block a user