Newer
Older
<?php
namespace App\Entity;
use App\Repository\NewsCommentRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NewsCommentRepository::class)]
class NewsComment
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private ?Uuid $id = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(nullable: false)]
private ?News $newsId = null;
#[ORM\Column]
private ?bool $moderated = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?User $moderatorId = null;
#[ORM\Column(length: 255)]
private ?string $userName = null;
#[ORM\ManyToOne(inversedBy: 'newsComments')]
#[ORM\JoinColumn(nullable: false)]
private ?User $userId = null;
#[ORM\Column(length: 255)]
private ?string $text = null;
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
private ?\DateTimeInterface $createAt = null;
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
private ?\DateTimeImmutable $updateAt = null;
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
return $this->id;
}
public function getNewsId(): ?News
{
return $this->newsId;
}
public function setNewsId(News $newsId): static
{
$this->newsId = $newsId;
return $this;
}
public function isModerated(): ?bool
{
return $this->moderated;
}
public function setModerated(bool $moderated): static
{
$this->moderated = $moderated;
return $this;
}
public function getModeratorId(): ?User
{
return $this->moderatorId;
}
public function setModeratorId(?User $moderatorId): static
{
$this->moderatorId = $moderatorId;
return $this;
}
public function getUserName(): ?string
{
return $this->userName;
}
public function setUserName(string $userName): static
{
$this->userName = $userName;
return $this;
}
public function getUserId(): ?User
{
return $this->userId;
}
public function setUserId(?User $userId): static
{
$this->userId = $userId;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(string $text): static
{
$this->text = $text;
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->createAt;
}
public function setCreateAt(\DateTimeInterface $createAt): static
{
$this->createAt = $createAt;
return $this;
}
public function getUpdateAt(): ?\DateTimeImmutable
{
return $this->updateAt;
}
public function setUpdateAt(\DateTimeImmutable $updateAt): static
{
$this->updateAt = $updateAt;
return $this;
}
}