Move Project to own entity namespace

This commit is contained in:
2024-12-05 12:26:37 +01:00
parent 8daec98f74
commit 083a4fc17e
6 changed files with 51 additions and 19 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
namespace App\Entity\Accounting;
use App\Entity\Interface\AccountingOwnerInterface;
use App\Entity\Project;
use App\Entity\Project\Project;
use App\Entity\Tipjar;
use App\Entity\User;
use App\Repository\Accounting\AccountingRepository;
@@ -1,6 +1,6 @@
<?php
namespace App\Entity;
namespace App\Entity\Project;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Metadata as API;
@@ -9,7 +9,8 @@ use App\Entity\Interface\AccountingOwnerInterface;
use App\Entity\Trait\MigratedEntity;
use App\Entity\Trait\TimestampedCreationEntity;
use App\Entity\Trait\TimestampedUpdationEntity;
use App\Repository\ProjectRepository;
use App\Entity\User;
use App\Repository\Project\ProjectRepository;
use Doctrine\ORM\Mapping as ORM;
/**
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Entity\Project;
/**
* Projects have a start and an end, and in the meantime they go through different phases represented under this status.
*/
enum ProjectStatus: string
{
/**
* Project is under edition by it's owner.
*/
case InEditing = 'in_editing';
/**
* Owner finished editing and an admin is reviewing it.
*/
case InReview = 'in_review';
/**
* An admin reviewed it and rejected it. Final.
*/
case Rejected = 'rejected';
/**
* Project was reviewed and is in campaign for funding.
*/
case InCampaign = 'in_campaign';
/**
* Project finished campaigning but didn't meet funding goals. Final.
*/
case Unfunded = 'unfunded';
/**
* Project successfully finished campaigning and owner can receive funds.
*/
case InFunding = 'in_funding';
/**
* Project owner received funds and fulfilled their goals. Final.
*/
case Fulfilled = 'fulfilled';
}
-14
View File
@@ -1,14 +0,0 @@
<?php
namespace App\Entity;
enum ProjectStatus: string
{
case Rejected = 'rejected';
case Editing = 'editing';
case Reviewing = 'reviewing';
case InCampaign = 'in_campaign';
case Funded = 'funded';
case Fulfilled = 'fulfilled';
case Unfunded = 'unfunded';
}
+1
View File
@@ -6,6 +6,7 @@ use ApiPlatform\Metadata as API;
use App\Entity\Accounting\Accounting;
use App\Entity\Interface\AccountingOwnerInterface;
use App\Entity\Interface\UserOwnedInterface;
use App\Entity\Project\Project;
use App\Entity\Trait\MigratedEntity;
use App\Entity\Trait\TimestampedCreationEntity;
use App\Entity\Trait\TimestampedUpdationEntity;
@@ -1,9 +1,9 @@
<?php
namespace App\Repository;
namespace App\Repository\Project;
use App\Entity\Accounting\Accounting;
use App\Entity\Project;
use App\Entity\Project\Project;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;