%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emtnaeewxm/www/src/EEM/TraiteBundle/Entity/
Upload File :
Create Path :
Current File : /home/emtnaeewxm/www/src/EEM/TraiteBundle/Entity/Client.php

<?php

namespace EEM\TraiteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Client
 *
 * @ORM\Table(name="client")
 * @ORM\Entity(repositoryClass="EEM\TraiteBundle\Repository\ClientRepository")
 */
class Client
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="nom", type="string", length=255, nullable=true)
     * @Assert\NotBlank(message="Ce champs est obligatoire")
     */
    private $nom;

    /**
     * @var string
     *
     * @ORM\Column(name="prenom", type="string", length=255, nullable=true)
     * @Assert\NotBlank(message="Ce champs est obligatoire")
     */
    private $prenom;

    /**
     * @var int
     *
     * @ORM\Column(name="telephone", type="integer", nullable=true)
     * @Assert\NotBlank(message="Ce champs est obligatoire")
     * @Assert\Length(
     *      min = 8,
     *      max = 8,
     *      exactMessage = "Num téléphone doit avoir 8 chiffres",
     * )
     */
    private $telephone;

    /**
     * @var string
     *
     * @ORM\Column(name="mf", type="string", length=255, nullable=true)
     */
    private $mf;

    /**
     * @var string
     *
     * @ORM\Column(name="adresse", type="string", length=255, nullable=true)
     */
    private $adresse;

    /**
     * @var string
     *
     * @ORM\Column(name="cin", type="string", length=255, nullable=true)
     * @Assert\NotBlank(message="Ce champs est obligatoire")
     */
    private $cin;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_cin", type="datetime", nullable=true)
     * @Assert\NotBlank(message="Ce champs est obligatoire")
     */
    private $dateCin;

    /**
     * @var string
     *
     * @ORM\Column(name="etat", type="string", length=255, nullable=true)
     */
    private $etat;

    /**
     * @var string
     *
     * @ORM\Column(name="note", type="text", nullable=true)
     */
    private $note;

    /**
     * @ORM\OneToMany(targetEntity="EEM\TraiteBundle\Entity\Traite", mappedBy="client",cascade={"persist", "remove"})
     *
     * @var ArrayCollection
     */
    private $traites;

    /**
     * @ORM\OneToMany(targetEntity="EEM\PieceBundle\Entity\Piece", mappedBy="client",cascade={"persist", "remove"})
     *
     * @var ArrayCollection
     */
    private $pieces;

    /**
     * @ORM\OneToMany(targetEntity="EEM\VenteBundle\Entity\Vente", mappedBy="client")
     *
     * @var ArrayCollection
     */
    private $ventes;

    private $prenomNom;

    public function listeEtat(){
        return [
            'engage'=>'Engagé',
            'non_engage'=>'Non Engagé',
        ];
    }


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

    /**
     * Set nom
     *
     * @param string $nom
     *
     * @return Client
     */
    public function setNom($nom)
    {
        $this->nom = $nom;

        return $this;
    }

    /**
     * Get nom
     *
     * @return string
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * Set prenom
     *
     * @param string $prenom
     *
     * @return Client
     */
    public function setPrenom($prenom)
    {
        $this->prenom = $prenom;

        return $this;
    }

    /**
     * Get prenom
     *
     * @return string
     */
    public function getPrenom()
    {
        return $this->prenom;
    }

    /**
     * Set telephone
     *
     * @param integer $telephone
     *
     * @return Client
     */
    public function setTelephone($telephone)
    {
        $this->telephone = $telephone;

        return $this;
    }

    /**
     * Get telephone
     *
     * @return int
     */
    public function getTelephone()
    {
        return $this->telephone;
    }

    /**
     * Set adresse
     *
     * @param string $adresse
     *
     * @return Client
     */
    public function setAdresse($adresse)
    {
        $this->adresse = $adresse;

        return $this;
    }

    /**
     * Get adresse
     *
     * @return string
     */
    public function getAdresse()
    {
        return $this->adresse;
    }

    /**
     * Set cin
     *
     * @param string $cin
     *
     * @return Client
     */
    public function setCin($cin)
    {
        $this->cin = $cin;

        return $this;
    }

    /**
     * Get cin
     *
     * @return string
     */
    public function getCin()
    {
        return $this->cin;
    }

    /**
     * Set dateCin
     *
     * @param \DateTime $dateCin
     *
     * @return Client
     */
    public function setDateCin($dateCin)
    {
        $this->dateCin = $dateCin;

        return $this;
    }

    /**
     * Get dateCin
     *
     * @return \DateTime
     */
    public function getDateCin()
    {
        return $this->dateCin;
    }

    /**
     * Set etat
     *
     * @param string $etat
     *
     * @return Client
     */
    public function setEtat($etat)
    {
        $this->etat = $etat;

        return $this;
    }

    /**
     * Get etat
     *
     * @return string
     */
    public function getEtat()
    {
        return $this->etat;
    }

    /**
     * Set note
     *
     * @param string $note
     *
     * @return Client
     */
    public function setNote($note)
    {
        $this->note = $note;

        return $this;
    }

    /**
     * Get note
     *
     * @return string
     */
    public function getNote()
    {
        return $this->note;
    }

    public function getPrenomNom()
    {
        return $this->prenom." ".$this->nom;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->traites = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add traite
     *
     * @param \EEM\TraiteBundle\Entity\Traite $traite
     *
     * @return Client
     */
    public function addTraite(\EEM\TraiteBundle\Entity\Traite $traite)
    {
        $this->traites[] = $traite;

        return $this;
    }

    /**
     * Remove traite
     *
     * @param \EEM\TraiteBundle\Entity\Traite $traite
     */
    public function removeTraite(\EEM\TraiteBundle\Entity\Traite $traite)
    {
        $this->traites->removeElement($traite);
    }

    /**
     * Get traites
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getTraites()
    {
        return $this->traites;
    }

    /**
     * Add vente
     *
     * @param \EEM\VenteBundle\Entity\Vente $vente
     *
     * @return Client
     */
    public function addVente(\EEM\VenteBundle\Entity\Vente $vente)
    {
        $this->ventes[] = $vente;

        return $this;
    }

    /**
     * Remove vente
     *
     * @param \EEM\VenteBundle\Entity\Vente $vente
     */
    public function removeVente(\EEM\VenteBundle\Entity\Vente $vente)
    {
        $this->ventes->removeElement($vente);
    }

    /**
     * Get ventes
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getVentes()
    {
        return $this->ventes;
    }

    /**
     * Add piece
     *
     * @param \EEM\PieceBundle\Entity\Piece $piece
     *
     * @return Client
     */
    public function addPiece(\EEM\PieceBundle\Entity\Piece $piece)
    {
        $this->pieces[] = $piece;

        return $this;
    }

    /**
     * Remove piece
     *
     * @param \EEM\PieceBundle\Entity\Piece $piece
     */
    public function removePiece(\EEM\PieceBundle\Entity\Piece $piece)
    {
        $this->pieces->removeElement($piece);
    }

    /**
     * Get pieces
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPieces()
    {
        return $this->pieces;
    }

    /**
     * Set mf
     *
     * @param string $mf
     *
     * @return Client
     */
    public function setMf($mf)
    {
        $this->mf = $mf;

        return $this;
    }

    /**
     * Get mf
     *
     * @return string
     */
    public function getMf()
    {
        return $this->mf;
    }
}

Zerion Mini Shell 1.0