mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -13,9 +13,7 @@ namespace Chill\BudgetBundle\Entity;
|
||||
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Ramsey\Uuid\Type\Decimal;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
|
@@ -17,8 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Charge.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ChargeRepository::class)]
|
||||
#[ORM\Table(name: 'chill_budget.charge')]
|
||||
@@ -39,7 +37,6 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
self::HELP_NOT_RELEVANT,
|
||||
];
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: ChargeKind::class, inversedBy: 'AbstractElement')]
|
||||
#[ORM\JoinColumn]
|
||||
private ?ChargeKind $charge = null;
|
||||
@@ -47,7 +44,6 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
#[ORM\Column(name: 'help', type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)]
|
||||
private ?string $help = self::HELP_NOT_RELEVANT;
|
||||
|
||||
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
|
@@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Type of charge.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[UniqueEntity(fields: ['kind'])]
|
||||
#[ORM\Entity]
|
||||
@@ -26,7 +24,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
#[ORM\UniqueConstraint(name: 'charge_kind_unique_type_idx', fields: ['kind'])]
|
||||
class ChargeKind
|
||||
{
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
|
@@ -17,20 +17,16 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Resource.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ResourceRepository::class)]
|
||||
#[ORM\Table(name: 'chill_budget.resource')]
|
||||
class Resource extends AbstractElement implements HasCentersInterface
|
||||
{
|
||||
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: ResourceKind::class, inversedBy: 'AbstractElement')]
|
||||
#[ORM\JoinColumn]
|
||||
private ?ResourceKind $resource = null;
|
||||
|
@@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Type of resource.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[UniqueEntity(fields: ['kind'])]
|
||||
#[ORM\UniqueConstraint(name: 'resource_kind_unique_type_idx', fields: ['kind'])] // @ORM\Entity
|
||||
@@ -28,7 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
#[ORM\Entity] // @ORM\Entity
|
||||
class ResourceKind
|
||||
{
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
|
Reference in New Issue
Block a user