<?php
/*
* This file is part of the kProjet project.
*
* (c) Kodiom <info@kodiom.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Contact
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="App\Entity\ContactRepository")
*/
class Contact
{
/**
* @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)
*
* @Assert\NotBlank()
*/
private $nom;
/**
* @var string
*
* @ORM\Column(name="sujet", type="string", length=255, nullable=true)
*/
private $sujet;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255)
*
* @Assert\NotBlank()
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="telephone", type="string", length=100, nullable=true)
*/
private $telephone;
/**
* @var string
*
* @ORM\Column(name="service", type="string", length=100)
*
* @Assert\NotBlank()
*/
private $service;
/**
* @var text
*
* @ORM\Column(name="message", type="text")
*
* @Assert\NotBlank()
*/
private $message;
/**
* @var date
*
* @ORM\Column(name="dateInfo", type="datetime")
*/
private $dateInfo;
/**
* Constructor of Contact Entity
*/
public function __construct()
{
$this->dateInfo = new \DateTime;
}
public function __toString()
{
return ($this->getNom()) ? $this->getNom() : '';
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set nom
*
* @param string $nom
*
* @return Contact
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get sujet
*
* @return string
*/
public function getSujet()
{
return $this->sujet;
}
/**
* Set sujet
*
* @param string $sujet
*
* @return Contact
*/
public function setSujet($sujet)
{
$this->sujet = $sujet;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set email
*
* @param string $email
*
* @return Contact
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get telephone
*
* @return string
*/
public function getTelephone()
{
return $this->telephone;
}
/**
* Set telephone
*
* @param string $telephone
*
* @return Contact
*/
public function setTelephone($telephone)
{
$this->telephone = $telephone;
return $this;
}
/**
* Get service
*
* @return string
*/
public function getService()
{
return $this->service;
}
/**
* Set service
*
* @param string $service
*
* @return Contact
*/
public function setService($service)
{
$this->service = $service;
return $this;
}
/**
* Get message
*
* @return text
*/
public function getMessage()
{
return $this->message;
}
/**
* Set message
*
* @param text $message
*
* @return Contact
*/
public function setMessage($message)
{
$this->message = $message;
return $this;
}
/**
* Get dateInfo
*
* @return date
*/
public function getDateInfo()
{
return $this->dateInfo;
}
/**
* Set dateInfo
*
* @param date $dateInfo
*
* @return Contact
*/
public function setDateInfo($dateInfo)
{
$this->dateInfo = $dateInfo;
return $this;
}
}