mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-24 04:47:46 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -17,56 +17,41 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_issue")
|
||||
*/
|
||||
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['social_issue' => SocialIssue::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_social_issue')]
|
||||
class SocialIssue
|
||||
{
|
||||
/**
|
||||
* @var Collection<SocialIssue>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity=SocialIssue::class, mappedBy="parent")
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: SocialIssue::class, mappedBy: 'parent')]
|
||||
private Collection $children;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $desactivationDate = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', options: ['default' => '0.0'])]
|
||||
private float $ordering = 0.0;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: SocialIssue::class, inversedBy: 'children')]
|
||||
private ?SocialIssue $parent = null;
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="issue")
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: SocialAction::class, mappedBy: 'issue')]
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
private array $title = [];
|
||||
|
||||
public function __construct()
|
||||
|
||||
Reference in New Issue
Block a user