CREATE TABLE token_pre_inscription (
    id BIGSERIAL PRIMARY KEY,
    valeur_uuid VARCHAR(36) NOT NULL UNIQUE,
    date_expiration TIMESTAMP NOT NULL,
    est_utilise BOOLEAN NOT NULL DEFAULT FALSE
);

CREATE TABLE pre_inscription (
    id BIGSERIAL PRIMARY KEY,
    nom VARCHAR(100) NOT NULL,
    prenom VARCHAR(100) NOT NULL,
    date_naissance DATE NOT NULL,
    telephone VARCHAR(20),
    email VARCHAR(150),
    adresse TEXT,
    representant_legal VARCHAR(150),
    statut_traite BOOLEAN NOT NULL DEFAULT FALSE,
    date_creation TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    saison_id BIGINT NOT NULL,
    CONSTRAINT fk_pre_inscription_saison FOREIGN KEY (saison_id) REFERENCES saison (id)
);
