Files
Genarrative/server-rs/crates/spacetime-module/src/jump_hop/tables.rs
高物 3931442249 Enforce Genarrative play-type SOP and update docs
Rewrite Genarrative play-type integration guidance across .codex and .hermes to define a platform-level SOP: default to form/image workbench, unify single-image asset slots (CreativeImageInputPanel), standardize series-material sheet->cut->transparent->OSS pipeline, and forbid copying legacy chat/agent workflows as the default. Add decision-log entry freezing the SOP and a pitfalls note warning against direct reuse of old play tools. Update CONTEXT.md and docs/README.md, add a new PRD file, and apply related small server-side changes (module-auth, spacetime-client mappers and runtime) to align back-end code with the new contracts and flows.
2026-05-20 12:12:00 +08:00

92 lines
3.1 KiB
Rust

use crate::*;
#[spacetimedb::table(
accessor = jump_hop_agent_session,
index(accessor = by_jump_hop_agent_session_owner_user_id, btree(columns = [owner_user_id]))
)]
pub struct JumpHopAgentSessionRow {
#[primary_key]
pub(crate) session_id: String,
pub(crate) owner_user_id: String,
pub(crate) seed_text: String,
pub(crate) current_turn: u32,
pub(crate) progress_percent: u32,
pub(crate) stage: String,
pub(crate) config_json: String,
pub(crate) draft_json: String,
pub(crate) last_assistant_reply: String,
pub(crate) published_profile_id: String,
pub(crate) created_at: Timestamp,
pub(crate) updated_at: Timestamp,
}
#[spacetimedb::table(
accessor = jump_hop_work_profile,
index(accessor = by_jump_hop_work_owner_user_id, btree(columns = [owner_user_id])),
index(accessor = by_jump_hop_work_publication_status, btree(columns = [publication_status]))
)]
pub struct JumpHopWorkProfileRow {
#[primary_key]
pub(crate) profile_id: String,
pub(crate) work_id: String,
pub(crate) owner_user_id: String,
pub(crate) source_session_id: String,
pub(crate) author_display_name: String,
pub(crate) work_title: String,
pub(crate) work_description: String,
pub(crate) theme_tags_json: String,
pub(crate) difficulty: String,
pub(crate) style_preset: String,
pub(crate) character_prompt: String,
pub(crate) tile_prompt: String,
pub(crate) end_mood_prompt: String,
pub(crate) character_asset_json: String,
pub(crate) tile_atlas_asset_json: String,
pub(crate) tile_assets_json: String,
pub(crate) path_json: String,
pub(crate) cover_image_src: String,
pub(crate) cover_composite: String,
pub(crate) generation_status: String,
pub(crate) publication_status: String,
pub(crate) play_count: u32,
pub(crate) updated_at: Timestamp,
pub(crate) published_at: Option<Timestamp>,
}
#[spacetimedb::table(
accessor = jump_hop_runtime_run,
index(accessor = by_jump_hop_run_owner_user_id, btree(columns = [owner_user_id])),
index(accessor = by_jump_hop_run_profile_id, btree(columns = [profile_id]))
)]
pub struct JumpHopRuntimeRunRow {
#[primary_key]
pub(crate) run_id: String,
pub(crate) owner_user_id: String,
pub(crate) profile_id: String,
pub(crate) status: String,
pub(crate) started_at_ms: i64,
pub(crate) finished_at_ms: i64,
pub(crate) current_platform_index: u32,
pub(crate) score: u32,
pub(crate) combo: u32,
pub(crate) snapshot_json: String,
pub(crate) created_at: Timestamp,
pub(crate) updated_at: Timestamp,
}
#[spacetimedb::table(
accessor = jump_hop_event,
index(accessor = by_jump_hop_event_profile_id, btree(columns = [profile_id])),
index(accessor = by_jump_hop_event_run_id, btree(columns = [run_id]))
)]
pub struct JumpHopEventRow {
#[primary_key]
pub(crate) event_id: String,
pub(crate) owner_user_id: String,
pub(crate) profile_id: String,
pub(crate) run_id: String,
pub(crate) event_type: String,
pub(crate) result: String,
pub(crate) occurred_at: Timestamp,
}