fix(#90): BDD assistantes_maternelles alignée entité + script test curl
- BDD.sql: ville_residence, annee_experience, specialite, date_agrement nullable - scripts/test-register-am.sh pour tester POST /auth/register/am Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c94f2cf0d5
commit
31bd8c3175
27
backend/scripts/test-register-am.sh
Executable file
27
backend/scripts/test-register-am.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Test POST /auth/register/am (ticket #90)
|
||||||
|
# Usage: ./scripts/test-register-am.sh [BASE_URL]
|
||||||
|
# Exemple: ./scripts/test-register-am.sh https://app.ptits-pas.fr/api/v1
|
||||||
|
# ./scripts/test-register-am.sh http://localhost:3000/api/v1
|
||||||
|
|
||||||
|
BASE_URL="${1:-http://localhost:3000/api/v1}"
|
||||||
|
echo "Testing POST $BASE_URL/auth/register/am"
|
||||||
|
echo "---"
|
||||||
|
|
||||||
|
curl -s -w "\n\nHTTP %{http_code}\n" -X POST "$BASE_URL/auth/register/am" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"email": "marie.dupont.test@ptits-pas.fr",
|
||||||
|
"prenom": "Marie",
|
||||||
|
"nom": "DUPONT",
|
||||||
|
"telephone": "0612345678",
|
||||||
|
"adresse": "1 rue Test",
|
||||||
|
"code_postal": "75001",
|
||||||
|
"ville": "Paris",
|
||||||
|
"consentement_photo": true,
|
||||||
|
"nir": "123456789012345",
|
||||||
|
"numero_agrement": "AGR-2024-001",
|
||||||
|
"capacite_accueil": 4,
|
||||||
|
"acceptation_cgu": true,
|
||||||
|
"acceptation_privacy": true
|
||||||
|
}'
|
||||||
@ -80,12 +80,15 @@ CREATE INDEX idx_utilisateurs_token_creation_mdp
|
|||||||
CREATE TABLE assistantes_maternelles (
|
CREATE TABLE assistantes_maternelles (
|
||||||
id_utilisateur UUID PRIMARY KEY REFERENCES utilisateurs(id) ON DELETE CASCADE,
|
id_utilisateur UUID PRIMARY KEY REFERENCES utilisateurs(id) ON DELETE CASCADE,
|
||||||
numero_agrement VARCHAR(50),
|
numero_agrement VARCHAR(50),
|
||||||
date_agrement DATE NOT NULL, -- Obligatoire selon CDC v1.3
|
|
||||||
nir_chiffre CHAR(15),
|
nir_chiffre CHAR(15),
|
||||||
nb_max_enfants INT,
|
nb_max_enfants INT,
|
||||||
place_disponible INT,
|
|
||||||
biographie TEXT,
|
biographie TEXT,
|
||||||
disponible BOOLEAN DEFAULT true
|
disponible BOOLEAN DEFAULT true,
|
||||||
|
ville_residence VARCHAR(100),
|
||||||
|
date_agrement DATE,
|
||||||
|
annee_experience SMALLINT,
|
||||||
|
specialite VARCHAR(100),
|
||||||
|
place_disponible INT
|
||||||
);
|
);
|
||||||
|
|
||||||
-- ==========================================================
|
-- ==========================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user