You've already forked symfony-playground
inheritance
This commit is contained in:
55
src/Entity/Employee2.php
Normal file
55
src/Entity/Employee2.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity]
|
||||
class Employee2 extends Person2
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private int $id;
|
||||
|
||||
#[ORM\Column(type: 'string')]
|
||||
private string $job;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return Employee2
|
||||
*/
|
||||
public function setId(int $id): Employee2
|
||||
{
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getJob(): string
|
||||
{
|
||||
return $this->job;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $job
|
||||
* @return Employee2
|
||||
*/
|
||||
public function setJob(string $job): Employee2
|
||||
{
|
||||
$this->job = $job;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user