<?php
namespace App\Entity;
use App\Repository\ProjetRepository;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/* Projet sur lesquels l'utilisateur a travaillé */
#[ORM\Entity(repositoryClass: ProjetRepository::class)]
class Projet
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
/* nom du projet */
#[ORM\Column(type: 'string', length: 100)]
private $nom;
/* Description succinte du projet */
#[ORM\Column(type: 'text')]
private $description;
/* date de début du projet */
#[ORM\Column(type: 'date')]
private $datedebut;
/* date de fin du projet */
#[ORM\Column(type: 'date')]
private $datefin;
/* entreprise correspondant */
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $entreprise;
/* Utilisateur qui l'a créé sur la plateforme */
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private $user;
/* type du projet
1 - public
2 - privé
3 - thése
*/
#[ORM\Column(type: "integer", length: "1")]
private $type;
public function __construct()
{
$this->setType(1);
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getDatedebut(): ?\DateTimeInterface
{
return $this->datedebut;
}
public function setDatedebut(\DateTimeInterface $datedebut): self
{
$this->datedebut = $datedebut;
return $this;
}
public function getDatefin(): ?\DateTimeInterface
{
return $this->datefin;
}
public function setDatefin(\DateTimeInterface $datefin): self
{
$this->datefin = $datefin;
return $this;
}
public function getEntreprise(): ?string
{
return $this->entreprise;
}
public function setEntreprise(string $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
/**
* Get the value of user
*/
public function getUser()
{
return $this->user;
}
/**
* Set the value of user
*
* @return self
*/
public function setUser($user)
{
$this->user = $user;
return $this;
}
/**
* Get the value of public
*/
public function getType()
{
return $this->type;
}
/**
* Set the value of public
*
* @return self
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
}