Triple major
Tables (23)
ActivityLogs
- log_id — uuid — Primary key — NOT NULL
- user_id — uuid
- action — varchar(100)
- target_type — varchar(50)
- target_id — uuid
- description — text
- ip_address — varchar(50)
- created_at — timestamp
ApiData
- data_id — uuid — Primary key — NOT NULL
- endpoint_id — uuid
- data_type — varchar(50)
- content — jsonb
- source_date — date
- embedding — vector
- created_at — timestamp
ApiEndpoints
- endpoint_id — uuid — Primary key — NOT NULL
- user_id — uuid
- name — varchar(200)
- url — varchar(500)
- method — varchar(10)
- headers — jsonb
- schedule — varchar(100)
- category — varchar(50)
- status — varchar(50)
- last_sync_at — timestamp
- next_sync_at — timestamp
- created_at — timestamp
- updated_at — timestamp
ApiSyncLogs
- log_id — uuid — Primary key — NOT NULL
- endpoint_id — uuid
- status — varchar(50)
- response_time — int
- records_synced — int
- error_message — text
- synced_at — timestamp
BIMElements
- element_id — uuid — Primary key — NOT NULL
- ifc_id — uuid
- element_type — varchar(100)
- global_id — varchar(100)
- name — varchar(200)
- floor — varchar(50)
- category — varchar(100)
- properties — jsonb
- quantities — jsonb
- created_at — timestamp
ChunkingSettings
- setting_id — uuid — Primary key — NOT NULL
- user_id — uuid
- chunk_size — int
- chunk_overlap — int
- separators — jsonb
- length_function — varchar(20)
- min_chunk_size — int
- max_chunk_size — int
- keep_separator — boolean
- is_active — boolean
- created_at — timestamp
- updated_at — timestamp
Conversations
- conversation_id — uuid — Primary key — NOT NULL
- project_id — uuid
- user_id — uuid
- title — varchar(200)
- mode — varchar(50)
- status — varchar(50)
- created_at — timestamp
- updated_at — timestamp
CostEstimations
- estimation_id — uuid — Primary key — NOT NULL
- project_id — uuid
- element_id — uuid
- work_type — varchar(100)
- item_name — varchar(200)
- item_code — varchar(50)
- unit — varchar(20)
- quantity — decimal(12,4)
- unit_price — decimal(12,2)
- amount — decimal(15,2)
- loss_rate — decimal(5,2)
- created_at — timestamp
- updated_at — timestamp
DocumentChunks
- chunk_id — uuid — Primary key — NOT NULL
- document_id — uuid
- chunk_index — int
- content — text
- start_position — int
- end_position — int
- length — int
- embedding — vector
- metadata — jsonb
DocumentTemplates
- template_id — uuid — Primary key — NOT NULL
- name — varchar(200)
- document_type — varchar(100)
- version — varchar(20)
- content — text
- metadata — jsonb
- created_by — uuid
- created_at — timestamp
- updated_at — timestamp
Documents
- document_id — uuid — Primary key — NOT NULL
- user_id — uuid
- name — varchar(255)
- file_type — varchar(10)
- file_size — bigint
- file_path — varchar(500)
- category — varchar(50)
- status — varchar(50)
- chunk_count — int
- uploaded_at — timestamp
- processed_at — timestamp
ExternalSubmissions
- submission_id — uuid — Primary key — NOT NULL
- project_id — uuid
- generated_doc_id — uuid
- system_name — varchar(100)
- receipt_number — varchar(100)
- submission_status — varchar(50)
- submitted_at — timestamp
- response_data — jsonb
GeneratedDocuments
- generated_doc_id — uuid — Primary key — NOT NULL
- project_id — uuid
- user_id — uuid
- conversation_id — uuid
- document_type — varchar(100)
- file_name — varchar(255)
- file_type — varchar(10)
- file_size — bigint
- file_path — varchar(500)
- status — varchar(50)
- created_at — timestamp
- updated_at — timestamp
IFCFiles
- ifc_id — uuid — Primary key — NOT NULL
- project_id — uuid
- revit_file_name — varchar(255)
- revit_file_path — varchar(500)
- ifc_file_path — varchar(500)
- conversion_status — varchar(50)
- converted_at — timestamp
- created_at — timestamp
MessageSources
- source_id — uuid — Primary key — NOT NULL
- message_id — uuid
- source_type — varchar(50)
- source_id_ref — uuid
- score — decimal(5,2)
- metadata — jsonb
Messages
- message_id — uuid — Primary key — NOT NULL
- conversation_id — uuid
- user_id — uuid
- role — varchar(20)
- content — text
- token_count — int
- created_at — timestamp
PriceHistory
- history_id — uuid — Primary key — NOT NULL
- price_id — uuid
- price — decimal(12,2)
- changed_at — timestamp
ProjectRequirements
- requirement_id — uuid — Primary key — NOT NULL
- project_id — uuid
- regulation_id — uuid
- is_applicable — boolean
- is_satisfied — boolean
- notes — text
- checked_at — timestamp
Projects
- project_id — uuid — Primary key — NOT NULL
- user_id — uuid
- name — varchar(200)
- location — varchar(255)
- zone — varchar(100)
- usage — varchar(100)
- site_area — decimal(10,2)
- building_area — decimal(10,2)
- floor_area — decimal(10,2)
- floors — int
- height — decimal(5,2)
- parking_count — int
- status — varchar(50)
- progress — int
- created_at — timestamp
- updated_at — timestamp
Regulations
- regulation_id — uuid — Primary key — NOT NULL
- law_name — varchar(200)
- article_number — varchar(50)
- content — text
- category — varchar(100)
- effective_from — date
- effective_to — date
- created_at — timestamp
RequiredDocuments
- required_doc_id — uuid — Primary key — NOT NULL
- project_id — uuid
- document_type — varchar(100)
- is_required — boolean
- is_completed — boolean
- due_date — date
- created_at — timestamp
UnitPrices
- price_id — uuid — Primary key — NOT NULL
- item_code — varchar(50)
- item_name — varchar(200)
- unit — varchar(20)
- price — decimal(12,2)
- source — varchar(50)
- region — varchar(100)
- valid_from — date
- valid_to — date
- created_at — timestamp
Users
- user_id — uuid — Primary key — NOT NULL
- email — varchar(255)
- password_hash — varchar(255)
- name — varchar(100)
- role — varchar(50)
- company — varchar(100)
- phone — varchar(20)
- created_at — timestamp
- updated_at — timestamp
- last_login_at — timestamp