Skip to content
Snippets Groups Projects
Commit 95181097 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Documentation

parent 7e0d01f6
No related branches found
No related tags found
No related merge requests found
Pipeline #22751 passed
create table unicaen_autoform_formulaire
(
id serial not null
constraint autoform_formulaire_pk primary key,
libelle varchar(128) not null,
description varchar(2048),
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user,
code varchar(256)
);
create unique index autoform_formulaire_id_uindex on unicaen_autoform_formulaire (id);
create table unicaen_autoform_categorie
(
id serial not null
constraint autoform_categorie_pk primary key,
code varchar(64) not null,
libelle varchar(256) not null,
ordre integer default 10000 not null,
formulaire integer not null
constraint autoform_categorie_formulaire_fk references unicaen_autoform_formulaire (id)
on delete cascade,
mots_clefs varchar(1024),
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user
);
create unique index autoform_categorie_code_uindex on unicaen_autoform_categorie (code);
create unique index autoform_categorie_id_uindex on unicaen_autoform_categorie (id);
create table unicaen_autoform_champ
(
id serial not null
constraint autoform_champ_pk primary key,
categorie integer not null
constraint autoform_champ_categorie_fk references unicaen_autoform_categorie
on delete cascade,
code varchar(64) not null,
libelle varchar(256) not null,
texte varchar(256) not null,
ordre integer default 10000 not null,
element varchar(64),
balise boolean,
options varchar(1024),
mots_clefs varchar(1024),
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user
);
create unique index autoform_champ_id_uindex
on unicaen_autoform_champ (id);
create table unicaen_autoform_formulaire_instance
(
id serial not null
constraint autoform_formulaire_instance_pk primary key,
formulaire integer not null
constraint autoform_formulaire_instance_autoform_formulaire_id_fk references unicaen_autoform_formulaire (id)
on delete cascade,
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user
);
create unique index autoform_formulaire_instance_id_uindex
on unicaen_autoform_formulaire_instance (id);
create table unicaen_autoform_formulaire_reponse
(
id serial not null
constraint autoform_reponse_pk primary key,
instance integer not null
constraint autoform_formulaire_reponse_instance_fk references unicaen_autoform_formulaire_instance
on delete cascade,
champ integer not null
constraint autoform_reponse_champ_fk references unicaen_autoform_champ
on delete cascade,
reponse text,
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user
);
create unique index autoform_reponse_id_uindex on unicaen_autoform_formulaire_reponse (id);
create table unicaen_autoform_validation
(
id serial not null
constraint validation_pk primary key,
type varchar(64) not null,
instance integer not null
constraint validation_instance_fk references unicaen_autoform_formulaire_instance
on delete cascade,
type_validation varchar(64),
reference integer
constraint autoform_validation_autoform_formulaire_instance_id_fk references unicaen_autoform_formulaire_instance
on delete cascade,
complement text,
differences text,
informations text,
histo_creation timestamp not null,
histo_createur_id integer not null
constraint composante_createur_fk references unicaen_utilisateur_user,
histo_modification timestamp not null,
histo_modificateur_id integer not null
constraint composante_modificateur_fk references unicaen_utilisateur_user,
histo_destruction timestamp,
histo_destructeur_id integer
constraint composante_destructeur_fk references unicaen_utilisateur_user
);
create unique index validation_id_uindex on unicaen_autoform_validation (id);
create table unicaen_autoform_validation_reponse
(
id serial not null
constraint validation_reponse_pk primary key,
validation integer not null
constraint autoform_validation_reponse_autoform_validation_id_fk references unicaen_autoform_validation
on delete cascade,
reponse integer not null
constraint validation_reponse_autoform_reponse_id_fk references unicaen_autoform_formulaire_reponse
on delete cascade,
value varchar(256) default NULL::character varying not null
);
create unique index validation_reponse_id_uindex on unicaen_autoform_validation_reponse (id);
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('autoformindex','Autoform - Gestion de l''index',5000,'UnicaenAutoform\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
SELECT 'index', 'Afficher le menu', 10
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'autoformindex';
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('autoformformulaire','Autoform - Gestion des formulaires',5100,'UnicaenAutoform\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
SELECT 'formulaire_index', 'Accéder à l''index', 10 UNION
SELECT 'formulaire_afficher', 'Afficher', 20 UNION
SELECT 'formulaire_ajouter', 'Ajouter', 30 UNION
SELECT 'formulaire_modifier', 'Modifier', 40 UNION
SELECT 'formulaire_historiser', 'Historiser/Restaurer', 50 UNION
SELECT 'formulaire_supprimer', 'Supprimer', 60
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'autoformformulaire';
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('autoformcategorie','Autoform - Gestion des catégories',5200,'UnicaenAutoform\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
SELECT 'categorief_index', 'Accéder à l''index', 10 UNION
SELECT 'categorief_afficher', 'Afficher', 20 UNION
SELECT 'categorief_ajouter', 'Ajouter', 30 UNION
SELECT 'categorief_modifier', 'Modifier', 40 UNION
SELECT 'categorief_historiser', 'Historiser/Restaurer', 50 UNION
SELECT 'categorief_supprimer', 'Supprimer', 60
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'autoformcategorie';
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('autoformchamp','Autoform - Gestion des champs',5300,'UnicaenAutoform\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
SELECT 'champ_index', 'Accéder à l''index', 10 UNION
SELECT 'champ_afficher', 'Afficher', 20 UNION
SELECT 'champ_ajouter', 'Ajouter', 30 UNION
SELECT 'champ_modifier', 'Modifier', 40 UNION
SELECT 'champ_historiser', 'Historiser/Restaurer', 50 UNION
SELECT 'champ_supprimer', 'Supprimer', 60
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'autoformchamp';
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('autoformvalidation','Autoform - Gestion des validations',5400,'UnicaenAutoform\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
SELECT 'validationf_index', 'Accéder à l''index', 10 UNION
SELECT 'validationf_afficher', 'Afficher', 20 UNION
SELECT 'validationf_ajouter', 'Ajouter', 30 UNION
SELECT 'validationf_modifier', 'Modifier', 40 UNION
SELECT 'validationf_historiser', 'Historiser/Restaurer', 50 UNION
SELECT 'validationf_supprimer', 'Supprimer', 60
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'autoformchamp';
UnicaenAutorform
===
Changement
---
**v6.0.1**
- Ajout des fichiers SQL
- Debut d'implémentation du drag end drop
**v6.0.0**
- Version compatible php 8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment