test: define schema contract for topic fact graph

This commit is contained in:
2026-05-11 10:42:50 +09:00
parent cadc1b0733
commit fb140d7a50
5 changed files with 188 additions and 0 deletions

34
src/core/schema.ts Normal file
View File

@@ -0,0 +1,34 @@
export const TOPICS_TABLE = 'topics';
export const FACTS_TABLE = 'facts';
export const FACT_TOPICS_TABLE = 'fact_topics';
export const TOPIC_COLUMNS = [
'id',
'name',
'normalized_name',
'category',
'granularity',
'description',
'metadata',
'created_at',
'updated_at',
] as const;
export const FACT_COLUMNS = [
'id',
'statement',
'summary',
'source',
'confidence',
'metadata',
'created_at',
'updated_at',
] as const;
export const FACT_TOPIC_COLUMNS = [
'fact_id',
'topic_id',
'role',
'position',
'created_at',
] as const;