Skip to content

Database Schema

Bibek Pandey edited this page Jul 31, 2023 · 5 revisions
erDiagram
    DeepDataFetchTracker {
        int last_fetched_lead_id
        datetime last_fetched_lead_created
        int last_fetched_af_id
        datetime last_fetched_af_created
        int last_fetched_org_id
        datetime last_fetched_org_created
        int last_fetched_entry_id
        datetime last_fetched_entry_created
    }
    ToFetchProject {
        int original_project_id
        bool is_fetched
        datetime created_at
        int created_by
    }
    Leads {
        int lead_id
        int original_lead_id
        int af_mapping FK
        string full_text
        int project_id
        int authoring_org_id FK
        int publishing_org_id FK
        int confidentiality
        string source_url
        datetime created_at
        int created_by
    }
    Organizations {
        int org_id
        int original_org_id
        string org_name
        string org_short_name
        string org_long_name
        datetime created_at
        int created_by
    }
    Projects {
        int project_id
        int to_fetch_project_id FK
        int original_project_id
        string location
        string description
        int af_id FK
    }
    Entries {
        int entry_id
        int original_entry_id
        int lead_id
        json original_af_tags
        json nlp_af_tags
    
        string original_lang
        string excerpt_en
        string excerpt_es
        string excerpt_fr
        string excerpt_pt

        datetime craeted_at
        int created_by
    }
    AFMapping {
        int af_id
        string af_name
        int original_af_id
        json original_af_tags
        json nlp_tags
        bool is_mapped_manually
        datetime created_at
        int created_by
    }
    ClassificationModel {
        int model_id
        string name
        string version
        string url
        string description
        json extra_info
    }
    

    Organizations ||--|{ Leads : ""
    Projects ||--|{ Leads : ""
    AFMapping ||--|{ Leads: ""
    Leads ||--|{ Entries: ""
    Projects ||--|| ToFetchProject : "is"
Loading
Clone this wiki locally