File size: 592 Bytes
c1cf2fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Schema definition for documents (bills, resolutions, etc.)
"""

from schemas.base import SchemaDefinition

# Define document schema
DOCUMENT_SCHEMA = SchemaDefinition(
    table_name="documents",
    schema={
        "id": "VARCHAR PRIMARY KEY",
        "document_type": "VARCHAR",  # sb, hb, etc.
        "congress": "INTEGER",
        "document_number": "INTEGER",
        "file_path": "VARCHAR",
        "content": "TEXT"
    },
    field_order=["id", "document_type", "congress", "document_number", "file_path", "content"],
    nested_fields=set()  # No nested fields for documents
)