Skip to content

Commit

Permalink
composer update and resort attributes arguments in entities
Browse files Browse the repository at this point in the history
  • Loading branch information
berkut1 committed Jul 3, 2024
1 parent b234cfe commit a7f16b0
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 292 deletions.
563 changes: 281 additions & 282 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Model/ControlPanel/Entity/Location/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Location implements AggregateRoot
private string $name;

/** @var Collection|SolidcpServer[] */
#[ORM\OneToMany(mappedBy: "location", targetEntity: SolidcpServer::class)]
#[ORM\OneToMany(targetEntity: SolidcpServer::class, mappedBy: "location")]
private array|Collection|ArrayCollection $solidcpServers;

public function __construct(string $name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Doctrine\ORM\Mapping as ORM;

#[ORM\Table(name: "cp_package_virtual_machines")]
#[ORM\Index(columns: ["id_package"], name: "cp_package_virtual_machines_id_package_idx")]
#[ORM\Index(name: "cp_package_virtual_machines_id_package_idx", columns: ["id_package"])]
#[ORM\Entity]
class VirtualMachinePackage implements AggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class EnterpriseDispatcher implements AggregateRoot
private bool $enabled;

/** @var Collection|SolidcpServer[] */
#[ORM\OneToMany(mappedBy: "enterprise", targetEntity: SolidcpServer::class)]
#[ORM\OneToMany(targetEntity: SolidcpServer::class, mappedBy: "enterprise")]
private array|Collection|ArrayCollection $solidcpServers;

public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Doctrine\ORM\Mapping as ORM;

#[ORM\Table(name: "cp_solidcp_hosting_plans")]
#[ORM\Index(columns: ["id_hosting_space"], name: "cp_solidcp_hosting_plans_id_hosting_space_idx")]
#[ORM\Index(name: "cp_solidcp_hosting_plans_id_hosting_space_idx", columns: ["id_hosting_space"])]
#[ORM\Entity]
class SolidcpHostingPlan implements AggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#[ORM\Table(name: "cp_solidcp_hosting_space_os_templates")]
#[ORM\UniqueConstraint(name: "unique_ids_cp_solidcp_hosting_space_os_templates", columns: ["path", "id_hosting_space"])]
#[ORM\Index(columns: ["id_hosting_space"], name: "cp_solidcp_hosting_space_os_templates_id_hosting_space_idx")]
#[ORM\Index(name: "cp_solidcp_hosting_space_os_templates_id_hosting_space_idx", columns: ["id_hosting_space"])]
#[ORM\Entity]
class OsTemplate
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Doctrine\ORM\Mapping as ORM;

#[ORM\Table(name: "cp_solidcp_hosting_spaces")]
#[ORM\Index(columns: ["id_server"], name: "cp_solidcp_hosting_spaces_id_server_idx")]
#[ORM\Index(name: "cp_solidcp_hosting_spaces_id_server_idx", columns: ["id_server"])]
#[ORM\Entity]
class SolidcpHostingSpace implements AggregateRoot
{
Expand Down Expand Up @@ -51,11 +51,11 @@ class SolidcpHostingSpace implements AggregateRoot
private bool $enabled;

/** @var Collection|SolidcpHostingPlan[] */
#[ORM\OneToMany(mappedBy: "hostingSpace", targetEntity: SolidcpHostingPlan::class, cascade: ["persist"], orphanRemoval: true)]
#[ORM\OneToMany(targetEntity: SolidcpHostingPlan::class, mappedBy: "hostingSpace", cascade: ["persist"], orphanRemoval: true)]
private array|Collection|ArrayCollection $hostingPlans;

/** @var Collection|OsTemplate[] */
#[ORM\OneToMany(mappedBy: "hostingSpace", targetEntity: OsTemplate::class, cascade: ["persist"], orphanRemoval: true)]
#[ORM\OneToMany(targetEntity: OsTemplate::class, mappedBy: "hostingSpace", cascade: ["persist"], orphanRemoval: true)]
private array|Collection|ArrayCollection $osTemplates;

public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class SolidcpServer implements AggregateRoot
private int $id;

#[ORM\ManyToOne(targetEntity: EnterpriseDispatcher::class, inversedBy: "solidcpServers")]
#[ORM\JoinColumn(name: "id_enterprise_dispatcher", referencedColumnName: "id", nullable: false)]
#[ORM\JoinColumn(name: "id_enterprise_dispatcher", referencedColumnName: "id", nullable: false, onDelete: 'RESTRICT')]
private EnterpriseDispatcher $enterprise;

#[ORM\ManyToOne(targetEntity: Location::class, inversedBy: "solidcpServers")]
#[ORM\JoinColumn(name: "id_location", referencedColumnName: "id", nullable: false)]
#[ORM\JoinColumn(name: "id_location", referencedColumnName: "id", nullable: false, onDelete: 'RESTRICT')]
private Location $location;

#[ORM\Column(name: "name", type: Types::STRING, length: 128, nullable: false)]
Expand Down

0 comments on commit a7f16b0

Please sign in to comment.