Skip to content

Commit

Permalink
add documentation for future schema
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose authored Nov 17, 2024
1 parent 8e88a2e commit 0750f6d
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions stiller-backend/db/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ create table avatar (
create table gallery (
id integer unique primary key autoincrement not null,
owner integer not null references user (id),
-- ******slug (pedir al crear galería)
-- ******template_fk (pedir al crear galería)
title text not null,
description text,
deploy_stage integer not null,
Expand All @@ -54,21 +56,38 @@ create table template (
description text not null
);

create table templateblock (
id integer unique primary key autoincrement not null,
template integer references template (id),
posx real not null,
posy real not null,
direction integer not null
);
-- casafugaz.metatemplate
-- - escenario 3d (.blend, .obj)
-- - slots -> slot: ref=10 type=3d (.json)
-- - topdown_view (.svg)

-- Crear galería a partir de template t:
-- - select * from template where id = t;
-- - template = file.Open(res)
-- - parsear template -> escenario, *slots, topdown
-- - INSERT gallery;
-- - for slot of slots INSERT galleryslot;

create table galleryblock (
-- Saber cómo renderizar la galería
-- - slots (.json)
-- - topdown_view (.svg)
-- GET gallery/2d/casa-fugaz
-- - select * from gallery where slug = 'casa-fugaz' join template;
-- - template = file.Open(res)
-- - parsear template -> escenario, *slots, *topdown
-- - return json

-- GET gallery/3d/casa-fugaz
-- - slots (.json)
-- - topdown_view (.svg)
-- - lo mismo

create table galleryslot (
gallery integer not null references gallery (id),
block integer not null references templateblock (id),
slot_ref integer not null, -- inmutable
res integer references file (id),
title text not null,
description text not null,
scale real not null
description text not null
);

insert into
Expand Down

0 comments on commit 0750f6d

Please sign in to comment.