WIP: Implement application process
This commit is contained in:
@@ -6,37 +6,57 @@ use App\Entity\Traits\TimestampableEntity;
|
||||
use App\Repository\ApplicationRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ApplicationRepository::class)]
|
||||
class Application implements TimestampableEntityInterface
|
||||
{
|
||||
use TimestampableEntity;
|
||||
|
||||
public const STATUS_NEW = 'new';
|
||||
public const STATUS_PENDING = 'pending';
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'applications')]
|
||||
private ?Assignment $assignment = null;
|
||||
#[ORM\Column(type: 'string', length: 36, unique: true)]
|
||||
private string $uuid;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'applications')]
|
||||
private ?Teamer $teamer = null;
|
||||
private ?Assignment $assignment;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'applications')]
|
||||
private ?Teamer $teamer;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $requests = null;
|
||||
|
||||
#[ORM\Column(length: 64)]
|
||||
private ?string $status = null;
|
||||
private ?string $status;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $remarks = null;
|
||||
|
||||
public function __construct(Assignment $assignment, Teamer $teamer)
|
||||
{
|
||||
$this->uuid = Uuid::v4();
|
||||
$this->assignment = $assignment;
|
||||
$this->teamer = $teamer;
|
||||
$this->status = static::STATUS_NEW;
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUuid(): string
|
||||
{
|
||||
return $this->uuid;
|
||||
}
|
||||
|
||||
public function getAssignment(): ?Assignment
|
||||
{
|
||||
return $this->assignment;
|
||||
|
||||
Reference in New Issue
Block a user