82 lines
1.5 KiB
PHP
82 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="subticket_type", indexes={
|
|
* @ORM\Index(name="subticket_type_idx", columns={"code"}),
|
|
* })
|
|
*/
|
|
class SubTicketType
|
|
{
|
|
// unique id
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=80)
|
|
* @Assert\NotBlank()
|
|
*/
|
|
protected $code;
|
|
|
|
// name
|
|
/**
|
|
* @ORM\Column(type="string", length=80)
|
|
* @Assert\NotBlank()
|
|
*/
|
|
protected $name;
|
|
|
|
// ticket type
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="TicketType")
|
|
* @ORM\JoinColumn(name="ticket_type_id", referencedColumnName="id", nullable=true)
|
|
*/
|
|
protected $ticket_type;
|
|
|
|
public function getID()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
return $this;
|
|
}
|
|
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setTicketType(TicketType $ticket_type)
|
|
{
|
|
$this->ticket_type = $ticket_type;
|
|
return $this;
|
|
}
|
|
|
|
public function getTicketType()
|
|
{
|
|
return $this->ticket_type;
|
|
}
|
|
|
|
public function setCode($code)
|
|
{
|
|
$this->code = $code;
|
|
return $this;
|
|
}
|
|
|
|
public function getCode()
|
|
{
|
|
return $this->code;
|
|
}
|
|
}
|