entity recreated + repository + migration done

This commit is contained in:
2021-09-03 11:26:04 +02:00
parent 7c37a5f583
commit 3bb0e470bc
3 changed files with 106 additions and 15 deletions

View File

@@ -1,36 +1,44 @@
<?php
use Chill\DocStoreBundle\Entity\Document;
namespace App\Entity;
use App\Repository\AccompanyingCourseDocumentRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table("chill_doc.accompanying_course_document")
* @ORM\Entity()
* @ORM\Entity(repositoryClass=AccompanyingCourseDocumentRepository::class)
* @ORM\Table("chill_doc.accompanyingcourse_document")
*/
class AccompanyingCourseDocument extends Document
class AccompanyingCourseDocument
{
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
* @var AccompanyingPeriod
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class)
* @ORM\JoinColumn(nullable=false)
*/
private $course;
/**
* Get accompanying course
*
* @return \Chill\PersonBundle\Entity\AccompanyingPeriod
*/
public function getCourse()
public function getId(): ?int
{
return $this->id;
}
public function getCourse(): ?AccompanyingPeriod
{
return $this->course;
}
public function setCourse($course): self
public function setCourse(?AccompanyingPeriod $course): self
{
$this->course = $course;
return $this;
}
}
}