Move Project to own entity namespace
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
@@ -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';
|
||||
}
|
||||
@@ -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';
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user