feat: Add MicroDAO Dashboard with activity feed and statistics
- Add microdao_activity table for news/updates/events - Add statistics columns to microdaos table - Implement dashboard API endpoints - Create UI components (HeaderCard, ActivitySection, TeamSection) - Add seed data for DAARION DAO - Update backend models and repositories - Add frontend types and API client
This commit is contained in:
14
migrations/045_microdao_stats.sql
Normal file
14
migrations/045_microdao_stats.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- 045_microdao_stats.sql
|
||||
-- Migration: Add statistics columns to microdaos table
|
||||
|
||||
ALTER TABLE microdaos
|
||||
ADD COLUMN IF NOT EXISTS citizens_count INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN IF NOT EXISTS rooms_count INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN IF NOT EXISTS agents_count INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN IF NOT EXISTS last_update_at TIMESTAMPTZ;
|
||||
|
||||
COMMENT ON COLUMN microdaos.citizens_count IS 'Cached count of citizens (public agents) linked to this MicroDAO';
|
||||
COMMENT ON COLUMN microdaos.rooms_count IS 'Cached count of rooms belonging to this MicroDAO';
|
||||
COMMENT ON COLUMN microdaos.agents_count IS 'Cached count of agents (all) linked to this MicroDAO';
|
||||
COMMENT ON COLUMN microdaos.last_update_at IS 'Last time statistics were updated';
|
||||
|
||||
Reference in New Issue
Block a user