src/Entity/Revision.php line 12
<?phpnamespace App\Entity;use App\Repository\RevisionRepository;use DateTimeInterface;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: RevisionRepository::class)]class Revision{public const PENDING = 0;public const ACCEPTED = 1;public const REJECTED = -1;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?User $author = null;#[ORM\Column(type: Types::TEXT)]#[Assert\NotBlank]private ?string $content = null;#[ORM\Column(length: 1, options: ["default" => 0])]private ?int $status = self::PENDING;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?DateTimeInterface $createdAt = null;public function getId(): ?int{return $this->id;}public function getAuthor(): ?User{return $this->author;}public function setAuthor(?User $author): self{$this->author = $author;return $this;}public function getContent(): ?string{return $this->content;}public function setContent(string $content): self{$this->content = $content;return $this;}public function getStatus(): ?int{return $this->status;}public function setStatus(int $status): self{$this->status = $status;return $this;}public function getCreatedAt(): ?DateTimeInterface{return $this->createdAt;}public function setCreatedAt(DateTimeInterface $createdAt): self{$this->createdAt = $createdAt;return $this;}}