TheIOFoundation / ProjectLockdown

Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual representation of the policies adopted, assisting a broad range of stakeholders in understanding the global state of their Rights. This empowers them to become active agents of global change.
https://ProjectLockdown.world
GNU General Public License v3.0
36 stars 14 forks source link

[API] create controller for endpoints needed for adding data from DEI #396

Open jeff-knurek opened 3 years ago

jeff-knurek commented 3 years ago

logo

Problem

The DEI needs to leverage the API as connection to the database. In order to save a DSL from the spreadsheet https://docs.google.com/spreadsheets/d/1mVyQxxLxAF3E1dw870WHXTOLgYzmumojvzIekpgvLV0/edit#gid=629188932 controllers for

need to be created

jeff-knurek commented 3 years ago

general idea of DB structure in Mongoose:

DSL
    _id : ObjectId
    Name : string
    Version : string or number
    Type : enum or DSL_Type
    Status : enum or Status
    Description : string
    Categories: []Category
    DateCreated 
    DateUpdated 
​
​
Category
    _id : ObjectId
    CategoryRefID : string
    DSL._id : ObjectId
    NameShort : string
    Name : string
    Description : string
    IconID : string
    Tags : []string
    Order : number
    DataPoints : []DataPoint
    DateCreated 
    DateUpdated 

​
DataPoint
    _id : ObjectId
    DataPointRefID : string
    Category._id : ObjectId
    NameShort : string
    Name : string
    Description : string
    IconID : string
    Tags : []string
    Order : number
    DateCreated 
    DateUpdated 
​
​
DataSetEntry
    _id : ObjectId
    Funnel/Type/Source : enum or Funnel
    Status : enum or Status
    DSL._id : ObjectId
    Territory : Territory
    Answers : []Answer
    SourceUrl: string
    MediaName: string
    StatusTitle: string
    DateIssued: datetime
    Status: Status
    Editor: string or User
    Type: 
    DateCreated 
    DateUpdated 
​
Answer
    _id : ObjectId
    Value : string
    DateStart : 
    DateEnd : 
    Details : string
    DataPoint : DataPoint
    DataSetEntry : DataSetEntry
    DateCreated 
    DateUpdated 
​
​
Territory
    _id : ObjectId
    PLD_Code : string
    Name : string
    ISO2 : string
    ISO3 : string
    UN_Code : string
    NATO_Code : string
    Wikidate_ID : string
    Reseacher : string
    Encoder : string
    Editor : string
    Region : Region
    BoundryLevel : string
    SubTerritories : []Territory
    DateCreated 
    DateUpdated 
​
Region
    _id : ObjectId
    Name : string   
    Tld : string    
​
//-------------- Optional 
​
Funnel/Type/Source
    type: string
    ???
    DateCreated 
    DateUpdated 
​
Status
    name: string
    ???
​
DSL_Type
    type: string
    ????