Commit 09a73496 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

STRUCTURE + FICHEPOSTE (WIP)

parent 269ad9c2
Loading
Loading
Loading
Loading
+2 −2
Changes for documentation/SQL/002_CARRIERE.sql: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
-- Date de MAJ 20/11/2023 ----------------------------------------------------------------------------------------------
-- Script avant version 4.1.2 ------------------------------------------------------------------------------------------
-- Date de MAJ 24/11/2023 ----------------------------------------------------------------------------------------------
-- Script avant version 4.2.0 ------------------------------------------------------------------------------------------
-- Color scheme : Brown  -----------------------------------------------------------------------------------------------

-- TTTTTTTTTTTTTTTTTTTTTTT         AAA               BBBBBBBBBBBBBBBBB   LLLLLLLLLLL             EEEEEEEEEEEEEEEEEEEEEE
+71 −65
Changes for documentation/SQL/007_AGENT_PART1.sql: 71 added lines, 65 removed lines.
Original line number Diff line number Diff line
-- Date de MAJ 23/11/2023 ----------------------------------------------------------------------------------------------
-- Script avant version 4.1.2 ------------------------------------------------------------------------------------------
-- Color scheme : BLue et 37495D  --------------------------------------------------------------------------------------

-- TTTTTTTTTTTTTTTTTTTTTTT         AAA               BBBBBBBBBBBBBBBBB   LLLLLLLLLLL             EEEEEEEEEEEEEEEEEEEEEE
-- T:::::::::::::::::::::T        A:::A              B::::::::::::::::B  L:::::::::L             E::::::::::::::::::::E
-- T:::::::::::::::::::::T       A:::::A             B::::::BBBBBB:::::B L:::::::::L             E::::::::::::::::::::E
-- T:::::TT:::::::TT:::::T      A:::::::A            BB:::::B     B:::::BLL:::::::LL             EE::::::EEEEEEEEE::::E
-- TTTTTT  T:::::T  TTTTTT     A:::::::::A             B::::B     B:::::B  L:::::L                 E:::::E       EEEEEE
--         T:::::T            A:::::A:::::A            B::::B     B:::::B  L:::::L                 E:::::E
--         T:::::T           A:::::A A:::::A           B::::BBBBBB:::::B   L:::::L                 E::::::EEEEEEEEEE
--         T:::::T          A:::::A   A:::::A          B:::::::::::::BB    L:::::L                 E:::::::::::::::E
--         T:::::T         A:::::A     A:::::A         B::::BBBBBB:::::B   L:::::L                 E:::::::::::::::E
--         T:::::T        A:::::AAAAAAAAA:::::A        B::::B     B:::::B  L:::::L                 E::::::EEEEEEEEEE
--         T:::::T       A:::::::::::::::::::::A       B::::B     B:::::B  L:::::L                 E:::::E
--         T:::::T      A:::::AAAAAAAAAAAAA:::::A      B::::B     B:::::B  L:::::L         LLLLLL  E:::::E       EEEEEE
--       TT:::::::TT   A:::::A             A:::::A   BB:::::BBBBBB::::::BLL:::::::LLLLLLLLL:::::LEE::::::EEEEEEEE:::::E
--       T:::::::::T  A:::::A               A:::::A  B:::::::::::::::::B L::::::::::::::::::::::LE::::::::::::::::::::E
--       T:::::::::T A:::::A                 A:::::A B::::::::::::::::B  L::::::::::::::::::::::LE::::::::::::::::::::E
--       TTTTTTTTTTTAAAAAAA                   AAAAAAABBBBBBBBBBBBBBBBB   LLLLLLLLLLLLLLLLLLLLLLLLEEEEEEEEEEEEEEEEEEEEEE


-- ---------------------------------------------------------------------------------------------------------------------
-- Entité de base ------------------------------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------------

create table agent
(
    c_individu            varchar(40)                                                        not null
@@ -29,37 +55,9 @@ create table agent
    id_orig               varchar(100)
);

create table agent_missionspecifique
(
    id                    serial
        constraint agent_missionspecifique_pk
        primary key,
    agent_id              varchar(40) not null,
    mission_id            integer     not null
        constraint agent_missionspecifique_mission_specifique_id_fk
        references mission_specifique
        on delete cascade,
    structure_id          integer,
    date_debut            timestamp,
    date_fin              timestamp,
    commentaire           varchar(2048),
    decharge              double precision,
    histo_creation        timestamp   not null,
    histo_createur_id     integer     not null
        constraint agent_missionspecifique_createur_fk
        references unicaen_utilisateur_user,
    histo_modification    timestamp,
    histo_modificateur_id integer
        constraint agent_missionspecifique_modificateur_fk
        references unicaen_utilisateur_user,
    histo_destruction     timestamp,
    histo_destructeur_id  integer
        constraint agent_missionspecifique_destructeur_fk
        references unicaen_utilisateur_user
);

create unique index agent_missionspecifique_id_uindex
    on agent_missionspecifique (id);
-- ---------------------------------------------------------------------------------------------------------------------
-- TABLE - Hiérarchie  -------------------------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------------

create table agent_hierarchie_superieur
(
@@ -85,15 +83,8 @@ create table agent_hierarchie_superieur
        constraint agent_superieur_unicaen_utilisateur_user_id_fk2
        references unicaen_utilisateur_user
);

alter table agent_hierarchie_superieur
    owner to ad_emc2_demo;

create index agent_superieur_agent_id_index
    on agent_hierarchie_superieur (agent_id);

create index agent_superieur_superieur_id_index
    on agent_hierarchie_superieur (superieur_id);
create index agent_superieur_agent_id_index on agent_hierarchie_superieur (agent_id);
create index agent_superieur_superieur_id_index on agent_hierarchie_superieur (superieur_id);

create table agent_hierarchie_autorite
(
@@ -119,29 +110,13 @@ create table agent_hierarchie_autorite
        constraint agent_autorite_unicaen_utilisateur_user_id_fk2
        references unicaen_utilisateur_user
);
create index agent_autorite_agent_id_index on agent_hierarchie_autorite (agent_id);
create index agent_autorite_autorite_id_index on agent_hierarchie_autorite (autorite_id);

alter table agent_hierarchie_autorite
    owner to ad_emc2_demo;
-- ---------------------------------------------------------------------------------------------------------------------
-- TABLE - Acquis ------------------------------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------------

create index agent_autorite_agent_id_index
    on agent_hierarchie_autorite (agent_id);

create index agent_autorite_autorite_id_index
    on agent_hierarchie_autorite (autorite_id);

create table agent_fichier
(
    agent   varchar(40) not null,
    fichier varchar(13) not null
        constraint agent_fichier_fichier_fk
        references fichier_fichier
        on delete cascade,
    constraint agent_fichier_pk
        primary key (agent, fichier)
);

alter table agent_fichier
    owner to ad_emc2_demo;

create table agent_element_application
(
@@ -157,8 +132,6 @@ create table agent_element_application
        primary key (agent_id, application_element_id)
);

alter table agent_element_application
    owner to ad_emc2_demo;

create table agent_element_competence
(
@@ -188,6 +161,39 @@ create table agent_element_formation
        primary key (agent_id, formation_element_id)
);

alter table agent_element_formation
    owner to ad_emc2_demo;
-- ---------------------------------------------------------------------------------------------------------------------
-- TABLE - Autre -------------------------------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------------

create table agent_fichier
(
    agent   varchar(40) not null
        constraint agent_fichier_agent_c_individu_fk
            references agent
            on delete set null,
    fichier varchar(13) not null
        constraint agent_fichier_fichier_fk
            references fichier_fichier
            on delete cascade,
    constraint agent_fichier_pk
        primary key (agent, fichier)
);

-- IIIIIIIIIINNNNNNNN        NNNNNNNN   SSSSSSSSSSSSSSS EEEEEEEEEEEEEEEEEEEEEERRRRRRRRRRRRRRRRR   TTTTTTTTTTTTTTTTTTTTTTT
-- I::::::::IN:::::::N       N::::::N SS:::::::::::::::SE::::::::::::::::::::ER::::::::::::::::R  T:::::::::::::::::::::T
-- I::::::::IN::::::::N      N::::::NS:::::SSSSSS::::::SE::::::::::::::::::::ER::::::RRRRRR:::::R T:::::::::::::::::::::T
-- II::::::IIN:::::::::N     N::::::NS:::::S     SSSSSSSEE::::::EEEEEEEEE::::ERR:::::R     R:::::RT:::::TT:::::::TT:::::T
--   I::::I  N::::::::::N    N::::::NS:::::S              E:::::E       EEEEEE  R::::R     R:::::RTTTTTT  T:::::T  TTTTTT
--   I::::I  N:::::::::::N   N::::::NS:::::S              E:::::E               R::::R     R:::::R        T:::::T
--   I::::I  N:::::::N::::N  N::::::N S::::SSSS           E::::::EEEEEEEEEE     R::::RRRRRR:::::R         T:::::T
--   I::::I  N::::::N N::::N N::::::N  SS::::::SSSSS      E:::::::::::::::E     R:::::::::::::RR          T:::::T
--   I::::I  N::::::N  N::::N:::::::N    SSS::::::::SS    E:::::::::::::::E     R::::RRRRRR:::::R         T:::::T
--   I::::I  N::::::N   N:::::::::::N       SSSSSS::::S   E::::::EEEEEEEEEE     R::::R     R:::::R        T:::::T
--   I::::I  N::::::N    N::::::::::N            S:::::S  E:::::E               R::::R     R:::::R        T:::::T
--   I::::I  N::::::N     N:::::::::N            S:::::S  E:::::E       EEEEEE  R::::R     R:::::R        T:::::T
-- II::::::IIN::::::N      N::::::::NSSSSSSS     S:::::SEE::::::EEEEEEEE:::::ERR:::::R     R:::::R      TT:::::::TT
-- I::::::::IN::::::N       N:::::::NS::::::SSSSSS:::::SE::::::::::::::::::::ER::::::R     R:::::R      T:::::::::T
-- I::::::::IN::::::N        N::::::NS:::::::::::::::SS E::::::::::::::::::::ER::::::R     R:::::R      T:::::::::T
-- IIIIIIIIIINNNNNNNN         NNNNNNN SSSSSSSSSSSSSSS   EEEEEEEEEEEEEEEEEEEEEERRRRRRRR     RRRRRRR      TTTTTTTTTTT

+25 −0
Changes for documentation/SQL/008_STRUCTURE.dot: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
digraph "structure" {

splines  = ortho;
fontname = "Inconsolata";

node [colorscheme = ylgnbu4];
edge [colorscheme = dark28, dir = both];

agent                  [shape = record, label = "{ agent |  utilisateur_id : integer\l  prenom : varchar(64)\l  nom_usage : varchar(64)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  octo_id : varchar(40)\l  preecog_id : varchar(40)\l  harp_id : integer\l  login : varchar(256)\l  email : varchar(1024)\l  sexe : varchar(1)\l  t_contrat_long : varchar(1)\l  date_naissance : date\l  nom_famille : varchar(256)\l  id : bigint\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l  source_id : varchar(128)\l  id_orig : varchar(100)\l| c_individu : varchar(40)\l }"];
structure              [shape = record, label = "{ structure |  code : varchar(40)\l  sigle : varchar(40)\l  libelle_court : varchar(128)\l  libelle_long : varchar(1024)\l  type_id : bigint\l  d_ouverture : timestamp\l  d_fermeture : timestamp\l  fermeture_ow : timestamp\l  resume_mere : boolean\l  description : text\l  adresse_fonctionnelle : varchar(1024)\l  parent_id : bigint\l  niv2_id : bigint\l  niv2_id_ow : bigint\l  source_id : varchar(128)\l  id_orig : varchar(100)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l| id : bigint\l }"];
structure_agent_force  [shape = record, label = "{ structure_agent_force |  structure_id : integer\l  agent_id : varchar(40)\l  histo_creation : timestamp\l  histo_createur_id : integer\l  histo_modification : timestamp\l  histo_modificateur_id : integer\l  histo_destruction : timestamp\l  histo_destructeur_id : integer\l| id : integer\l }"];
structure_gestionnaire [shape = record, label = "{ structure_gestionnaire |  structure_id : integer\l  agent_id : varchar(40)\l  fonction_id : integer\l  date_debut : timestamp\l  date_fin : timestamp\l  source_id : varchar(128)\l  id_orig : varchar(100)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l| id : bigint\l }"];
structure_responsable  [shape = record, label = "{ structure_responsable |  structure_id : integer\l  agent_id : varchar(40)\l  fonction_id : integer\l  date_debut : timestamp\l  date_fin : timestamp\l  source_id : varchar(128)\l  id_orig : varchar(100)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l| id : bigint\l }"];
structure_type         [shape = record, label = "{ structure_type |  code : varchar(64)\l  libelle : varchar(256)\l  description : text\l  source_id : varchar(128)\l  id_orig : varchar(100)\l  created_on : timestamp(0)\l  updated_on : timestamp(0)\l  deleted_on : timestamp(0)\l  histo_createur_id : bigint\l  histo_modificateur_id : bigint\l  histo_destructeur_id : bigint\l| id : bigint\l }"];

structure              -> structure_type         [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "type_id:id", headlabel = ""];
structure_agent_force  -> agent                  [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:id", headlabel = ""];
structure_agent_force  -> agent                  [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:c_individu", headlabel = ""];
structure_agent_force  -> structure              [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "structure_id:id", headlabel = ""];
structure_gestionnaire -> agent                  [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:id", headlabel = ""];
structure_gestionnaire -> structure              [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "structure_id:id", headlabel = ""];
structure_responsable  -> agent                  [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "agent_id:id", headlabel = ""];
structure_responsable  -> structure              [color = "#595959", style = solid , arrowtail = none    , arrowhead = normal  , taillabel = "", label = "structure_id:id", headlabel = ""];

}
+518 KiB
Loading image diff...
+216 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading