const posts = ref([]); const currentTheme = ref({}); const showSubmit = ref(false); const socket = io(import.meta.env.VITE_WS_URL);
-- Reactions (one row per user‑post‑emoji) CREATE TABLE reactions ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), emoji TEXT CHECK (emoji IN ('heart','moon','sound','fireworks')), PRIMARY KEY (post_id, user_id, emoji) );
-- Votes (daily) CREATE TABLE votes ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), vote_date DATE, PRIMARY KEY (user_id, vote_date) );
const posts = ref([]); const currentTheme = ref({}); const showSubmit = ref(false); const socket = io(import.meta.env.VITE_WS_URL);
-- Reactions (one row per user‑post‑emoji) CREATE TABLE reactions ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), emoji TEXT CHECK (emoji IN ('heart','moon','sound','fireworks')), PRIMARY KEY (post_id, user_id, emoji) ); nevernight vk
-- Votes (daily) CREATE TABLE votes ( post_id BIGINT REFERENCES posts(id), user_id BIGINT REFERENCES users(vk_id), vote_date DATE, PRIMARY KEY (user_id, vote_date) ); const posts = ref([]); const currentTheme = ref({});