<?php
// src/App/Entity/User.php
namespace App\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Doctrine\Common\Collections\ArrayCollection;
#[ORM\Entity()]
#[ORM\Table(name: '`piece_description`')]
#[ORM\HasLifecycleCallbacks()]
class PieceDescription
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable:true)]
private $url;
#[ORM\ManyToOne(targetEntity: Tache::class, inversedBy: "pieces_desc")]
#[ORM\JoinColumn(name: "tache_id", referencedColumnName: "id", nullable: false, onDelete: "CASCADE")]
private $tache;
/**
* Set message
*
* @param \stdClass $tache
*
* @return Tache
*/
public function setTache(Tache $tache)
{
$this->tache = $tache;
return $this;
}
/**
* Get Tachew
*
* @return \stdClass
*/
public function getTache()
{
return $this->tache;
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set url
*
* @param string $url
*
* @return Piece
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* Get url
*
* @return string
*/
public function getUrl()
{
return $this->url;
}
public function __toString() {
return $this->url;
}
}