Initial copy of business card prop with profile
This commit is contained in:
parent
4f0f88504a
commit
9541fb1927
16 changed files with 1193 additions and 71 deletions
|
|
@ -219,6 +219,15 @@ CREATE TABLE scene.loose_props (
|
|||
-- Auto-decay
|
||||
expires_at TIMESTAMPTZ, -- NULL = permanent
|
||||
|
||||
-- Moderator lock (prevents non-moderators from interacting)
|
||||
is_locked BOOLEAN NOT NULL DEFAULT false,
|
||||
locked_by UUID REFERENCES auth.users(id) ON DELETE SET NULL,
|
||||
|
||||
-- Public state columns (loose props only have public state)
|
||||
server_state JSONB NOT NULL DEFAULT '{}',
|
||||
realm_state JSONB NOT NULL DEFAULT '{}',
|
||||
user_state JSONB NOT NULL DEFAULT '{}',
|
||||
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
|
||||
-- Must reference exactly one source
|
||||
|
|
@ -231,6 +240,11 @@ CREATE TABLE scene.loose_props (
|
|||
COMMENT ON TABLE scene.loose_props IS 'Props dropped in instances that can be picked up';
|
||||
COMMENT ON COLUMN scene.loose_props.position IS 'Location in scene as PostGIS point (SRID 0)';
|
||||
COMMENT ON COLUMN scene.loose_props.expires_at IS 'When prop auto-decays (NULL = permanent)';
|
||||
COMMENT ON COLUMN scene.loose_props.is_locked IS 'If true, only moderators can move/scale/pickup this prop';
|
||||
COMMENT ON COLUMN scene.loose_props.locked_by IS 'User ID of the moderator who locked this prop';
|
||||
COMMENT ON COLUMN scene.loose_props.server_state IS 'Public state visible to everyone';
|
||||
COMMENT ON COLUMN scene.loose_props.realm_state IS 'Public state visible to realm members';
|
||||
COMMENT ON COLUMN scene.loose_props.user_state IS 'Public state from previous owner';
|
||||
|
||||
CREATE INDEX idx_scene_loose_props_instance ON scene.loose_props (instance_id);
|
||||
CREATE INDEX idx_scene_loose_props_expires ON scene.loose_props (expires_at)
|
||||
|
|
@ -240,6 +254,10 @@ CREATE INDEX idx_scene_loose_props_expires ON scene.loose_props (expires_at)
|
|||
CREATE INDEX idx_scene_loose_props_position ON scene.loose_props
|
||||
USING GIST (position);
|
||||
|
||||
-- GIN index for state queries
|
||||
CREATE INDEX idx_loose_props_server_state ON scene.loose_props USING GIN (server_state)
|
||||
WHERE server_state != '{}';
|
||||
|
||||
-- =============================================================================
|
||||
-- Scene Decorations (moved from props.scene_decorations)
|
||||
-- =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue