Skip to content

Commit

Permalink
feat(demographie): ajout collection (#1357)
Browse files Browse the repository at this point in the history
* feat(demographie): ajout collection

* fix(demographie): string pour les dept

* fix(demographie): retours PR
  • Loading branch information
alebret authored Aug 22, 2022
1 parent afbf9be commit bea4fba
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 1 deletion.
52 changes: 52 additions & 0 deletions back/strapi/api/informations-demographiques/config/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/informations-demographiques",
"handler": "informations-demographiques.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/informations-demographiques/count",
"handler": "informations-demographiques.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/informations-demographiques/:id",
"handler": "informations-demographiques.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/informations-demographiques",
"handler": "informations-demographiques.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/informations-demographiques/:id",
"handler": "informations-demographiques.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/informations-demographiques/:id",
"handler": "informations-demographiques.delete",
"config": {
"policies": []
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"kind": "collectionType",
"collectionName": "informations_demographiques",
"info": {
"name": "Informations démographiques",
"description": "Informations démographiques des utilisateurs"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"attributes": {
"genre": {
"type": "enumeration",
"enum": [
"homme",
"femme",
"nonPrecise"
]
},
"age": {
"type": "enumeration",
"enum": [
"moinsDe18ans",
"entre18_25ans",
"entre25_30ans",
"entre30_35ans",
"entre35_40ans",
"entre40_45ans",
"plusDe45ans"
]
},
"entourage_dispo": {
"type": "enumeration",
"enum": [
"oui",
"non",
"jeNeSaisPas"
]
},
"situation": {
"type": "enumeration",
"enum": [
"vousAttendez1Enfant",
"vousAvezEnfantDeMoinsDe2ans",
"vousAvezDesEnfantsDePlusDe2ans"
]
},
"code_postal": {
"type": "string"
},
"ville": {
"type": "string"
},
"departement": {
"type": "string"
},
"region": {
"type": "string"
},
"reponses_epds": {
"model": "reponses-epds"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"model": "widget-epds-sources"
}
}
}
}

0 comments on commit bea4fba

Please sign in to comment.