Skip to content

Commit

Permalink
[Core] Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Jun 1, 2024
1 parent f2d141c commit d27b119
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 103 deletions.
1 change: 1 addition & 0 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ doctrine:
url: '%env(resolve:TIMESCALE_URL)%'

orm:
default_entity_manager: default
auto_generate_proxy_classes: true
resolve_target_entities:
Parthenon\User\Entity\UserInterface: App\Entity\User
Expand Down
7 changes: 2 additions & 5 deletions src/Entity/ForgotPasswordCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="forgot_password_code")
*/
#[ORM\Entity()]
#[ORM\Table('forgot_password_code')]
class ForgotPasswordCode extends \Parthenon\User\Entity\ForgotPasswordCode
{
}
7 changes: 2 additions & 5 deletions src/Entity/InviteCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="invite_codes")
*/
#[ORM\Entity()]
#[ORM\Table('invite_codes')]
class InviteCode extends \Parthenon\User\Entity\InviteCode
{
}
7 changes: 2 additions & 5 deletions src/Entity/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="payment")
*/
#[ORM\Entity()]
#[ORM\Table('payment')]
class Payment extends \Parthenon\Billing\Entity\Payment
{
}
7 changes: 2 additions & 5 deletions src/Entity/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="price")
*/
#[ORM\Entity()]
#[ORM\Table('price')]
class Price extends \Parthenon\Billing\Entity\Price
{
}
7 changes: 2 additions & 5 deletions src/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="product")
*/
#[ORM\Entity()]
#[ORM\Table('product')]
class Product extends \Parthenon\Billing\Entity\Product
{
}
7 changes: 2 additions & 5 deletions src/Entity/Receipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="receipt")
*/
#[ORM\Entity()]
#[ORM\Table(name: 'receipt')]
class Receipt extends \Parthenon\Billing\Entity\Receipt
{
}
7 changes: 2 additions & 5 deletions src/Entity/ReceiptLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="receipt_line")
*/
#[ORM\Entity()]
#[ORM\Table('receipt_line')]
class ReceiptLine extends \Parthenon\Billing\Entity\ReceiptLine
{
}
7 changes: 2 additions & 5 deletions src/Entity/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="subscription")
*/
#[ORM\Entity()]
#[ORM\Table('subscription')]
class Subscription extends \Parthenon\Billing\Entity\Subscription
{
}
7 changes: 2 additions & 5 deletions src/Entity/SubscriptionPlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="subscription_plan")
*/
#[ORM\Entity()]
#[ORM\Table('subscription_plan')]
class SubscriptionPlan extends \Parthenon\Billing\Entity\SubscriptionPlan
{
}
33 changes: 8 additions & 25 deletions src/Entity/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,28 @@

use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Parthenon\Athena\Entity\CrudEntityInterface;
use Parthenon\Billing\Entity\CustomerInterface;
use Parthenon\Billing\Entity\EmbeddedSubscription;
use Parthenon\Common\Address;
use Parthenon\User\Entity\MemberInterface;
use Parthenon\User\Entity\UserInterface;

/**
* @ORM\Entity()
*
* @ORM\Table(name="teams")
*/
class Team extends \Parthenon\User\Entity\Team implements CustomerInterface, CrudEntityInterface
#[ORM\Entity()]
#[ORM\Table('teams')]
class Team extends \Parthenon\User\Entity\Team implements CustomerInterface
{
/**
* @ORM\OneToMany(targetEntity="App\Entity\User", mappedBy="team")
*
* @var UserInterface[]|Collection
*/
#[ORM\OneToMany(targetEntity: User::class, mappedBy: 'teams')]
protected Collection $members;

/**
* @ORM\Embedded(class="Parthenon\Common\Address")
*/
#[ORM\Embedded(class: Address::class)]
protected Address $billingAddress;

/**
* @ORM\Column(name="external_customer_reference", nullable=true)
*/
#[ORM\Column(name: 'external_customer_reference', nullable: true)]
protected ?string $externalCustomerReference;

/**
* @ORM\Column(name="payment_provider_details_url", nullable=true)
*/
#[ORM\Column(name: 'payment_provider_details_url', nullable: true)]
protected ?string $paymentProviderDetailsUrl;

/**
* @ORM\Embedded(class="Parthenon\Billing\Entity\EmbeddedSubscription")
*/
#[ORM\Embedded(class: EmbeddedSubscription::class)]
private ?EmbeddedSubscription $subscription;

public function setSubscription(EmbeddedSubscription $subscription)
Expand Down
7 changes: 2 additions & 5 deletions src/Entity/TeamInviteCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="team_invite_codes")
*/
#[ORM\Entity()]
#[ORM\Table('team_invite_codes')]
class TeamInviteCode extends \Parthenon\User\Entity\TeamInviteCode
{
}
7 changes: 2 additions & 5 deletions src/Entity/Tenant.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="tenant")
*/
#[ORM\Entity()]
#[ORM\Table('tenant')]
class Tenant extends \Parthenon\MultiTenancy\Entity\Tenant
{
}
11 changes: 3 additions & 8 deletions src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,11 @@
use Parthenon\User\Entity\MemberInterface;
use Parthenon\User\Entity\TeamInterface;

/**
* @ORM\Entity()
*
* @ORM\Table(name="users")
*/
#[ORM\Entity]
#[ORM\Table(name: 'users')]
class User extends \Parthenon\User\Entity\User implements MemberInterface, LimitedUserInterface, BillingAdminInterface
{
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Team", fetch="EAGER")
*/
#[ORM\ManyToOne(targetEntity: Team::class, fetch: 'EAGER')]
private Team|SubscriberInterface $team;

public function getTeam(): Team
Expand Down
21 changes: 6 additions & 15 deletions src/MultiTenant/Entity/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,16 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity()
*
* @ORM\Table(name="links")
*/
#[ORM\Entity]
#[ORM\Table(name: 'links')]
class Link
{
/**
* @ORM\Id
*
* @ORM\Column(type="integer")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private int $id;

/**
* @ORM\Column(type="string")
*/
#[ORM\Column(type: 'string', length: 255)]
private string $url;

public function getId(): int
Expand Down

0 comments on commit d27b119

Please sign in to comment.