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

Changement de l'id des inscriptions

parent 80f096d0
......@@ -4,6 +4,8 @@ namespace Octopus\Entity\Db;
class IndividuInscription {
/** @var int */
private $id;
/** @var Individu */
private $individu;
/** @var OffreDeFormationEtape */
......@@ -23,6 +25,14 @@ class IndividuInscription {
/** @var string */
private $aDistance;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return Individu
*/
......@@ -77,7 +87,7 @@ class IndividuInscription {
public function isObtenu()
{
if ($this->obtenuDip === 'O' OR $this->obtenuVet === 'O') return true;
if ($this->obtenu === 'N' AND $this->obtenuVet === 'N') return false;
if ($this->obtenuDip === 'N' AND $this->obtenuVet === 'N') return false;
return null;
}
......
......@@ -2,10 +2,9 @@
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Octopus\Entity\Db\IndividuInscription" table="INDIVIDU_INSC_ADMIN">
<id name="individu" association-key="true" />
<id name="diplome" association-key="true" />
<id name="annee" column="ANNEE_UNIV" type="string" length="4"/>
<id name="id" type="integer" column="ID">
<generator strategy="IDENTITY"/>
</id>
<many-to-one target-entity="Octopus\Entity\Db\Individu" field="individu">
<join-column name="INDIVIDU_ID" referenced-column-name="C_INDIVIDU_CHAINE" />
......@@ -24,6 +23,7 @@
<field name="obtenuDip" column="T_OBTENU_DIP" type="string" length="1" nullable="true" />
<field name="obtenuVet" column="T_OBTENU_VET" type="string" length="1" nullable="true" />
<field name="aDistance" column="T_A_DISTANCE" type="string" length="1" nullable="true" />
<field name="annee" column="ANNEE_UNIV" type="string" length="4" nullable="true" />
</entity>
</doctrine-mapping>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment