<?php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
#[ApiResource(attributes: ['route_prefix' => 'v1'])]
#[Entity]
class Badge
{
#[Id]
#[GeneratedValue]
#[Column(type: 'integer', nullable: false, options: ['unsigned' => true])]
private ?int $id = null;
#[Column(type: 'integer', nullable: false, options: ['unsigned' => true])]
private int $weight;
#[Column(type: 'string', nullable: true)]
private ?string $file = null;
#[Column(type: 'string')]
private string $description;
#[Column(type: 'text')]
private string $expression;
public function getId(): ?int
{
return $this->id;
}
public function setWeight(int $weight): static
{
$this->weight = $weight;
return $this;
}
public function getWeight(): int
{
return $this->weight;
}
public function setFile(?string $file): static
{
$this->file = $file;
return $this;
}
public function getFile(): ?string
{
return $this->file;
}
public function setDescription(string $description): static
{
$this->description = $description;
return $this;
}
public function getDescription(): string
{
return $this->description;
}
public function setExpression(string $expression): static
{
$this->expression = $expression;
return $this;
}
public function getExpression(): string
{
return $this->expression;
}
}