Add project deadline cases
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Dto;
|
||||
|
||||
enum ProjectDeadline: string
|
||||
{
|
||||
/**
|
||||
* A single deadline means the Project will only remain in campaing
|
||||
* for the minimum budget deadline.
|
||||
*/
|
||||
case Minimum = 'minimum';
|
||||
|
||||
/**
|
||||
* A double deadline means the Project can remain in campaing
|
||||
* past the minimum budget deadline until the optimum budget deadline,
|
||||
* if it did raise the minimum in the first deadline.
|
||||
*/
|
||||
case Optimum = 'optimum';
|
||||
}
|
||||
@@ -52,6 +52,13 @@ class ProjectEditDto
|
||||
#[Assert\NotBlank()]
|
||||
public string $description;
|
||||
|
||||
/**
|
||||
* Every campaign must raise the minimum before the minimum deadline.\
|
||||
* Optionally, a Project can choose to remain in campaign for a second deadline
|
||||
* if it did reach the minimum in the first place.
|
||||
*/
|
||||
public ProjectDeadline $deadlines = ProjectDeadline::Minimum;
|
||||
|
||||
/**
|
||||
* A URL to a video showcasing the Project.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user