<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- pour regarde la doc avec Mozilla en HTML -->
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<project name="atelier">
	<doc>Atelier - base de données pour la gestion d'une association et des données spécifiques à l'Atelier</doc>

	<info
		project		= "Atelier"
		file		= "sql/atelier.xml"
		description	= "description de la base de données pour la génération des scripts SQL et des classes Python"
		author		= "Cédric P. (cedric2), Sébastien R. (sebastien2), Christophe P. (chips)">
		<rcs
			author  = "$Author: chips $"
			date    = "$Date: 2001/10/31 13:30:41 $"
			header  = "$Header: /home/cvs/atelier/sql/atelier.xml.UPPER,v 1.1.1.1 2001/10/31 13:30:41 chips Exp $"
			id      = "$Id: atelier.xml.UPPER,v 1.1.1.1 2001/10/31 13:30:41 chips Exp $"
		/>
	</info>

<!--
	Gestion d'association
	*********************
-->

<object name="ASSOCIATION">
	<doc>Association - Loi 1901 de préférence</doc>
	<attribute name="ASS_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de l'association, par exemple « LN »</doc></attribute>
	<attribute name="ASS_LIB"		type="text"					><doc>Nom de l'association, par exemple « Linux-Nantes »</doc></attribute>
	<attribute name="ASS_ADR1"		type="text"					><doc>1ère partie de l'adresse, par exemple « 17, rue Paul Bellamy »</doc></attribute>
	<attribute name="ASS_ADR2"		type="text"					><doc>2nde partie de l'adresse, par exemple « c/o l'Atelier »</doc></attribute>
	<attribute name="ASS_CP"		type="text"					><doc>Code postal, par exemple « 44000 »</doc></attribute>
	<attribute name="ASS_VILLE"		type="text"					><doc>Ville, par exemple « Nantes »</doc></attribute>
	<attribute name="ASS_TEL"		type="text"					><doc>Numéro de téléphone</doc></attribute>
	<attribute name="ASS_FAX"		type="text"					><doc>Numéro de télécopieur</doc></attribute>
	<attribute name="ASS_EMAIL"		type="text"					><doc>Email de l'association, par exemple « contact@linux-nantes.fr.eu.org »</doc></attribute>
	<attribute name="ASS_WEB"		type="text"					><doc>Web de l'association, par exemple « http://www.linux-nantes.fr.eu.org/ »</doc></attribute>
</object>

<object name="CIVILITE">
	<doc>Civilité - chaque membre dispose d'une civilité</doc>
	<attribute name="CIV_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de la civilité, par exemple « MME »</doc></attribute>
	<attribute name="CIV_LIB"		type="text"					><doc>Libellé de la civilité, par exemple « Madame »</doc></attribute>
	<attribute name="CIV_ABR"		type="string"	length="5" 			><doc>Abréviation, par exemple « Mme »</doc></attribute>
</object>

<object name="PROFESSION">
	<doc>Profession - chaque membre a une profession</doc>
	<attribute name="PRO_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de profession, par exemple « ? »</doc></attribute>
	<attribute name="PRO_LIB"		type="text"					><doc>Libellé de la profession, par exemple « ? »</doc></attribute>
</object>

<object name="CSP">
	<doc>Catégorie socio-professionnelle - chaque membre fait partie d'une CSP</doc>
	<attribute name="CSP_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de catégorie socio-professionnelle, par exemple « C »</doc></attribute>
	<attribute name="CSP_LIB"		type="text"					><doc>Libellé de catégorie socio-professionnelle, par exemple « Cadre »</doc></attribute>
</object>

<object name="FONCTION">
	<doc>Fonction - chaque membre dispose d'une fonction au sein de l'association</doc>
	<attribute name="FON_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de la fonction, par exemple « PDT »</doc></attribute>
	<attribute name="FON_LIB"		type="text"					><doc>Libellé de la fonction au sein de l'association, par exemple « Président(e) »</doc></attribute>
</object>

<object name="MOYEN_CONTACT">
	<doc>Moyen de contact - liste des codes de moyen de contact</doc>
	<attribute name="MOY_CON_CODE"	type="string"	length="3" primarykey="true"		><doc>Code du moyen de contact, par exemple « TEL »</doc></attribute>
	<attribute name="MOY_CON_LIB"	type="text"						><doc>Libellé du moyen de contact, par exemple « Téléphone »</doc></attribute>
</object>

<object name="ATTRIBUT">
	<doc>Attribut - définit un attribut possible pour un membre</doc>
	<attribute name="ATT_NUM"		type="integer" autoinc="true" primarykey="true"	><doc>Numéro d'attribut</doc></attribute>
	<attribute name="ATT_LIB"		type="text"					><doc>Libellé de l'attribut, par exemple « Distribution préférée »</doc></attribute>
	<attribute name="ATT_REQUIS"		type="text"					><doc>Indique si l'attribut doit obligatoirement être renseigné</doc></attribute>
</object>

<object name="ATTRIBUT_VALEUR">
	<doc>Valeur d'attribut - liste des valeurs possibles pour un attribut</doc>
	<attribute name="ATV_NUM"		type="integer" autoinc="true" primarykey="true"	><doc>Numéro de valeur d'attribut</doc></attribute>
	<attribute name="attribut" 		type="ATTRIBUT" card="1"			><doc>Référence à l'attritut</doc></attribute>
	<attribute name="ATV_LIB"		type="text"					><doc>Libellé de la valeur, par exemple « Debian ;-) »</doc></attribute>
</object>

<object name="MEMBRE">
	<doc>Membre - liste des membres (actifs ou non) d'une association</doc>
	<attribute name="MEM_NUM"		type="integer" autoinc="true" primarykey="true"	><doc>Numéro de membre</doc></attribute>
	<attribute name="association" 		type="ASSOCIATION" card="1"			><doc></doc></attribute>
	<attribute name="civilite" 		type="CIVILITE" card="1"			><doc></doc></attribute>
	<attribute name="profession" 		type="PROFESSION"  card="1"			><doc></doc></attribute>
	<attribute name="csp" 			type="CSP" card="1"				><doc></doc></attribute>
	<attribute name="fonction" 		type="FONCTION" card="1"			><doc></doc></attribute>
	<attribute name="MEM_NOM"		type="text"					><doc>Nom du membre, par exemple « PETIT »</doc></attribute>
	<attribute name="MEM_PRENOM"		type="text"					><doc>Prénom du membre, par exemple « Christophe »</doc></attribute>
	<attribute name="MEM_SURNOM"		type="text"					><doc>Surnom du membre, par exemple « CHiPs »</doc></attribute>
	<attribute name="MEM_ADR1"		type="text"					><doc>1ère partie de l'adresse, par exemple « 44 rue Emile Zola »</doc></attribute>
	<attribute name="MEM_ADR2"		type="text"					><doc>2nde partie de l'adresse, par exemple «  »</doc></attribute>
	<attribute name="MEM_CP"		type="text"					><doc>Code postal, par exemple « 44400 »</doc></attribute>
	<attribute name="MEM_VILLE"		type="text"					><doc>Ville, par exemple « Rezé »</doc></attribute>
	<attribute name="MEM_DATNAI"		type="text"					><doc>Date de naissance, par exemple « 13/12/67 »</doc></attribute>
	<attribute name="MEM_SEXE"		type="text"					><doc>Sexe (M ou F)</doc></attribute>
	<attribute name="MEM_DATADH1"		type="date"					><doc>Date de 1ère adhésion, par exemple « 04/12/1999 »</doc></attribute>
	<attribute name="MEM_DATMAJ"		type="date"					><doc>Date dernière MAJ</doc></attribute>
	<index><attribute name="MEM_NOM"/><attribute name="MEM_PRENOM"/></index>
</object>

<object name="CONTACT">
	<doc>Contact - chaque membre dispose de plusieurs contacts (téléphone, e-mail, ...) - NB : cette table ne devrait pas avoir besoin d'être définie explicitement</doc>
	<attribute name="membre" 		type="MEMBRE" card="1" primarykey="true"><doc></doc></attribute>
	<attribute name="moyen_contact" 	type="MOYEN_CONTACT" card="1" primarykey="true"><doc></doc></attribute>
	<attribute name="CON_VAL"		type="text"					><doc>Valeur</doc></attribute>
</object>

<object name="ATTRIBUT_MEMBRE">
	<doc>Attribut d'un membre - associe une valeur d'attribut à un membre - NB : cette table ne devrait pas avoir besoin d'être définie explicitement</doc>
	<attribute name="membre" 		type="MEMBRE" card="1" primarykey="true"	><doc></doc></attribute>
	<attribute name="attribut" 		type="ATTRIBUT" card="1" primarykey="true"	><doc></doc></attribute>
	<attribute name="attribut_valeur" 	type="ATTRIBUT_VALEUR" card="1"			><doc></doc></attribute>
</object>

<!--
	Gestion des adhésions
	*********************
-->

<object name="TYPE_ADHESION">
	<doc>Type d'adhésion - chaque adhésion a un type</doc>
	<attribute name="TYP_ADH_CODE"		type="string"	length="3" primarykey="true"	><doc>Code du type d'adhésion, par exemple « A »</doc></attribute>
	<attribute name="TYP_ADH_LIB"		type="text"					><doc>Libellé du type d'adhésion, par exemple « Actif »</doc></attribute>
</object>

<object name="MODE_PAIEMENT">
	<doc>Mode de paiement - chaque règlement est effectué selon un mode de paiement</doc>
	<attribute name="MOD_PAI_CODE"		type="string"	length="3" primarykey="true"	><doc>Code du mode de paiement, par exemple « CHQ »</doc></attribute>
	<attribute name="MOD_PAI_LIB"		type="text"					><doc>Libellé du mode de paiement, par exemple « Chèque »</doc></attribute>
</object>

<object name="TRANCHE">
	<doc>Tranche - chaque tarif est découpé en une ou plusieurs tranches</doc>
	<attribute name="TRA_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de tranche</doc></attribute>
	<attribute name="TRA_MNTMAX"		type="float"					><doc>Montant maximum de cette tranche</doc></attribute>
</object>

<object name="TARIF">
	<doc>Tarif - chaque type d'adhésion est associé à un tarif</doc>
	<attribute name="type_adhesion" 	type="TYPE_ADHESION" card="1" primarykey="true"><doc></doc></attribute>
	<attribute name="tranche" 		type="TRANCHE" card="1" primarykey="true"	><doc></doc></attribute>
	<attribute name="tar_montant"		type="float"					><doc>Montant</doc></attribute>
</object>

<object name="ADHESION">
	<doc>Adhésion - liste des adhésions d'un membre</doc>
	<attribute name="ADH_NUM"		type="integer" autoinc="true" primarykey="true"	><doc>Numéro d'ahésion</doc></attribute>
	<attribute name="membre" 		type="MEMBRE" card="1"				><doc></doc></attribute>
	<attribute name="type_adhesion" 	type="TYPE_ADHESION" card="1"			><doc></doc></attribute>
	<attribute name="ADH_DAT"		type="date"					><doc>Date d'adhésion</doc></attribute>
	<attribute name="ADH_DATCRE"		type="date"					><doc>Date de création de l'adhésion (pour sortie de comptabilité)</doc></attribute>
	<attribute name="ADH_NBPART"		type="float"					><doc>Nombre de parts</doc></attribute>
	<attribute name="ADH_NBPERS"		type="float"					><doc>Nombre de personnes à charge</doc></attribute>
	<attribute name="ADH_REVENU"		type="float"					><doc>Revenu annuel (au moment de l'adhésion)</doc></attribute>
	<attribute name="ADH_MONTANT"		type="float"					><doc>Montant de la cotisation</doc></attribute>
	<attribute name="ADH_NBVERS"		type="integer"					><doc>Nombre de versements</doc></attribute>
</object>

<object name="REGLEMENT">
	<doc>Règlement - chaque adhésion donne lieu à un ou plusieurs règlements</doc>
	<attribute name="REG_NUM"		type="integer" autoinc="true" primarykey="true"	><doc>Code de règlement</doc></attribute>
	<attribute name="adhesion" 		type="ADHESION" card="1"			><doc></doc></attribute>
	<attribute name="mode_paiement" 	type="MODE_PAIEMENT" card="1"			><doc></doc></attribute>
	<attribute name="REG_DATECH"		type="date"					><doc>Date d'échéance</doc></attribute>
	<attribute name="REG_MONT"		type="float"					><doc>Montant du règlement</doc></attribute>
	<attribute name="REG_REF"		type="text"					><doc>Référence du règlement</doc></attribute>
	<attribute name="REG_VALID"		type="boolean"					><doc>Validation du règlement</doc></attribute>
	<attribute name="REG_POINT"		type="boolean"					><doc>Pointage du règlement</doc></attribute>
	<attribute name="REG_DOMDPT"		type="boolean"					><doc>Chèque en département ou hors-département</doc></attribute>
</object>

<!--
	Gestion de l'Atelier
	********************
-->

<object name="ENERGIE">
	<doc>Energie - chaque véhicule est mû par une énergie</doc>
	<attribute name="ENE_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de l'énergie, par exemple « E »</doc></attribute>
	<attribute name="ENE_LIB"		type="text"					><doc>Libellé de l'énergie, par exemple « Essence »</doc></attribute>
</object>

<object name="MARQUE">
	<doc>Marque - chaque véhicule est d'une marque</doc>
	<attribute name="MAR_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de marque de véhicule, par exemple « REN »</doc></attribute>
	<attribute name="MAR_LIB"		type="text"					><doc>Libellé de la marque, par exemple « Renault »</doc></attribute>
</object>

<object name="VEHICULE">
	<doc>Véhicule - un adhérent possède un ou plusieurs véhicules</doc>
	<attribute name="veh_num"		type="integer" autoinc="true" primarykey="true"	><doc>Code du véhicule</doc></attribute>
	<attribute name="membre" 		type="MEMBRE" card="1"				><doc>Propriétaire</doc></attribute>
	<attribute name="marque" 		type="MARQUE" card="1"				><doc>Marque</doc></attribute>
	<attribute name="energie" 		type="ENERGIE" card="1"				><doc>Energie</doc></attribute>
	<attribute name="VEH_APPEL"		type="text"					><doc>Appelation du véhicule, par exemple « R25 TX »</doc></attribute>
	<attribute name="VEH_IMMAT"		type="text"					><doc>Immatriculation, par exemple « 123 ABQ 44 »</doc></attribute>
	<attribute name="VEH_DATMEC"		type="date"					><doc>Date 1ère mise en circulation, par exemple « 25/03/1990 »</doc></attribute>
	<attribute name="VEH_GENRE"		type="text"					><doc>Genre du véhicule, par exemple « Berline »</doc></attribute>
	<attribute name="VEH_TYPE"		type="text"					><doc>Type du véhicule, par exemple « R1123 »</doc></attribute>
	<attribute name="VEH_PUISS"		type="integer"					><doc>Puissance du véhicule, par exemple « 9 »</doc></attribute>
	<attribute name="VEH_ACTUEL"		type="boolean"					><doc>Indique si le véhicule est toujours entretenu à l'Atelier</doc></attribute>
</object>

<object name="ORGANE">
	<doc>Organe - chaque activité concerne un organe</doc>
	<attribute name="ORG_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de l'organe, par exemple « BOU »</doc></attribute>
	<attribute name="ORG_LIB"		type="text"					><doc>Libellé de l'organe, par exemple « Bougie »</doc></attribute>
	<attribute name="ORG_ORD"		type="integer"					><doc>Numérotation dans une nomenclature, par exemple « 1 »</doc></attribute>
</object>

<object name="FAMILLE_ACTIVITE">
	<doc>Famille d'activité - chaque famille regroupe des types d'activité</doc>
	<attribute name="FAM_ACT_CODE"		type="string"	length="3" primarykey="true"	><doc>Code de la famille d'activité, par exemple « ENT »</doc></attribute>
	<attribute name="FAM_ACT_LIB"		type="text"					><doc>Libellé de la famille d'activité, par exemple « entretien »</doc></attribute>
</object>

<object name="TYPE_ACTIVITE">
	<doc>Type d'activité - chaque type regroupe des activités</doc>
	<attribute name="TYP_ACT_CODE"		type="string"	length="3" primarykey="true"	><doc>Code du type d'activité, par exemple « ALL »</doc></attribute>
	<attribute name="famille_activite" 	type="FAMILLE_ACTIVITE" card="1"		><doc></doc></attribute>
	<attribute name="TYP_ACT_LIB"		type="text"					><doc>Libellé du type d'activité, par exemple « Allumage »</doc></attribute>
</object>

<object name="ACTIVITE">
	<doc>Activité - chaque activité fait partie d'un type et concerne un organe</doc>
	<attribute name="ACT_CODE"		type="string" length="3" primarykey="true"	><doc>Code d'activité, par exemple « ECB »</doc></attribute>
	<attribute name="type_activite" 	type="TYPE_ACTIVITE" card="1"			><doc></doc></attribute>
	<attribute name="organe" 		type="ORGANE" card="1"				><doc></doc></attribute>
	<attribute name="ACT_LIB"		type="text"					><doc>Libellé d'activité, par exemple « Echange des bougies »</doc></attribute>
</object>

<object name="FICHE_FORMATION">
	<doc>Fiche-formation - saisie pour un véhicule, regroupe un ensemble de lignes</doc>
	<attribute name="FIC_FOR_CODE"		type="integer" autoinc="true" primarykey="true"	><doc>Code de la fiche de formation</doc></attribute>
	<attribute name="vehicule" 		type="VEHICULE" card="1"			><doc></doc></attribute>
	<attribute name="FIC_FOR_DATE"		type="date"					><doc>date de création de la fiche</doc></attribute>
	<attribute name="FIC_FOR_KM"		type="integer"					><doc>Kilométrage du véhicule à cette date, null autorisé</doc></attribute>
	<attribute name="FIC_FOR_OBS"		type="text"					><doc>Observations</doc></attribute>
</object>

<object name="LIGNE_FORMATION">
	<doc>Ligne de fiche-formation - ensemble des opérations effectuées lors d'une formation</doc>
	<attribute name="LIG_FOR_CODE"		type="integer" autoinc="true" primarykey="true"	><doc>N° de la ligne de formation, sert pour la chronologie</doc></attribute>
	<attribute name="fiche_formation" 	type="FICHE_FORMATION"  card="1"		><doc></doc></attribute>
	<attribute name="activite" 		type="ACTIVITE" card="1"			><doc></doc></attribute>
	<attribute name="LIG_FIC_LIB"		type="text"					><doc>Libellé</doc></attribute>
	<attribute name="LIG_FIC_NBH"		type="float"					><doc>Nombre d'heures</doc></attribute>
</object>

</project>

<!-- EOF -->

