<?php
declare(strict_types=1);
namespace Croisiland\CommonBundle\Entity\Price;
use Crea\ParameterBundle\Entity\Parameter;
use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
use Croisiland\CommonBundle\Entity\Company\Company;
use Croisiland\CommonBundle\Repository\Price\ServiceChargeTypeRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
/**
* @ORM\Table(
* uniqueConstraints={
*
* @UniqueConstraint(name="service_charge_type_unique",
* columns={"service_charge_type_id", "origin_company_id"})
* }
* )
*
* @ORM\Entity(repositoryClass=ServiceChargeTypeRepository::class)
*/
class ServiceChargeType
{
use LifecycleUserIdentifierTrait;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=Parameter::class)
*
* @ORM\JoinColumn(nullable=false)
*/
private ?Parameter $serviceChargeType = null;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="serviceChargeTypes")
*
* @ORM\JoinColumn(nullable=false)
*/
private ?Company $originCompany = null;
public function getId(): ?int
{
return $this->id;
}
public function getServiceChargeType(): ?Parameter
{
return $this->serviceChargeType;
}
public function setServiceChargeType(?Parameter $serviceChargeType): self
{
$this->serviceChargeType = $serviceChargeType;
return $this;
}
public function getOriginCompany(): ?Company
{
return $this->originCompany;
}
public function setOriginCompany(?Company $originCompany): self
{
$this->originCompany = $originCompany;
return $this;
}
}