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

Creation de l'entité financement et modification de these

parent fb48916d
Loading
Loading
Loading
Loading
+95 −0
Changes for module/Application/src/Application/Entity/Db/Financement.php: 95 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application\Entity\Db;

use Doctrine\Common\Collections\ArrayCollection;

class Financement {

    /** @var int */
    private $id;
    /** @var string */
    private $code;
    /** @var string */
    private $libelle;
    /** @var ArrayCollection */
    private $theses;

    public function __construct()
    {
        $this->theses = new ArrayCollection();
    }

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * @param string $code
     * @return Financement
     */
    public function setCode($code)
    {
        $this->code = $code;
        return $this;
    }

    /**
     * @return string
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * @param string $libelle
     * @return Financement
     */
    public function setLibelle($libelle)
    {
        $this->libelle = $libelle;
        return $this;
    }

    /**
     * @return ArrayCollection
     */
    public function getTheses()
    {
        return $this->theses;
    }

    /**
     * @param These $these
     * @return Financement
     */
    public function addThese($these)
    {
        $this->theses[] = $these;
        return $this;
    }

    /**
     * @param These $these
     * @return Financement
     */
    public function removeThese($these)
    {
        $this->theses->removeElement($these);
        return $this;
    }

}
 No newline at end of file
+26 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Financement.dcm.xml: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<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="Application\Entity\Db\Financement" table="FINANCEMENT"
            repository-class="">
        <id name="id" type="integer" column="ID">
            <generator strategy="SEQUENCE"/>
        </id>

        <field name="code" column="CODE" type="string" length="64" nullable="false" />
        <field name="libelle" column="LIBELLE" type="string" length="256" nullable="false" />


        <many-to-many target-entity="Application\Entity\Db\These" field="theses">
            <join-table name="FINACEMENT_THESE">
                <join-columns>
                    <join-column name="FINANCEMENT_ID" referenced-column-name="ID"/>
                </join-columns>
                <inverse-join-columns>
                    <join-column name="THESE_ID" referenced-column-name="ID"/>
                </inverse-join-columns>
            </join-table>
        </many-to-many>
    </entity>
</doctrine-mapping>
+11 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.These.dcm.xml: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -92,5 +92,16 @@
                <join-column name="HISTO_CREATEUR_ID" referenced-column-name="ID"/>
            </join-columns>
        </many-to-one>

        <many-to-many target-entity="Application\Entity\Db\Finacement" field="financements">
            <join-table name="FINACEMENT_THESE">
                <join-columns>
                    <join-column name="THESE_ID" referenced-column-name="ID"/>
                </join-columns>
                <inverse-join-columns>
                    <join-column name="FINANCEMENT_ID" referenced-column-name="ID"/>
                </inverse-join-columns>
            </join-table>
        </many-to-many>
    </entity>
</doctrine-mapping>
+35 −0
Changes for module/Application/src/Application/Entity/Db/These.php: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -206,6 +206,12 @@ class These implements HistoriqueAwareInterface, ResourceInterface
     */
    private $etablissement;


    /**
     * @var ArrayCollection
     */
    private $financements;

    /**
     * @return TitreApogeeFilter
     */
@@ -1051,6 +1057,35 @@ class These implements HistoriqueAwareInterface, ResourceInterface
        $this->etablissement = $etablissement;
    }


    /**
     * @return ArrayCollection
     */
    public function getFinancements()
    {
        return $this->financements;
    }

    /**
     * @param Financement $financement
     * @return These
     */
    public function addFinancement($financement)
    {
        $this->financements[] = $financement;
        return $this;
    }

    /**
     * @param Financement $financement
     * @return These
     */
    public function removeFinancement($financement)
    {
        $this->financements->removeElement($financement);
        return $this;
    }

    /**
     * Retourne les mails des directeurs de thèse.
     *