Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Models;
- class Comment extends \Nikstas\ORM\Model\Model
- {
- /**
- * @var string
- */
- public static $tableName = "comments";
- /**
- * @var string
- */
- private $userId, $postId, $content, $createdAt, $updatedAd;
- /**
- * @return int
- */
- public function getId(): int
- {
- return $this->id;
- }
- /**
- * @param int $id
- */
- public function setId(int $id): void
- {
- $this->id = $id;
- }
- /**
- * @return mixed
- */
- /**
- * @return string
- */
- public function getUserId(): string
- {
- return $this->userId;
- }
- /**
- * @param string $userId
- */
- public function setUserId(string $userId)
- {
- $this->userId = $userId;
- }
- /**
- * @return string
- */
- public function getPostId(): string
- {
- return $this->postId;
- }
- /**
- * @param string $postId
- */
- public function setPostId(string $postId)
- {
- $this->postId = $postId;
- }
- /**
- * @return string
- */
- public function getContent(): string
- {
- return $this->content;
- }
- /**
- * @param string $content
- */
- public function setContent(string $content)
- {
- $this->content = $content;
- }
- /**
- * @return string
- */
- public function getCreatedAt(): string
- {
- return $this->createdAt;
- }
- /**
- * @param string $createdAt
- */
- public function setCreatedAt(string $createdAt)
- {
- $this->createdAt = $createdAt;
- }
- /**
- * @return string
- */
- public function getUpdatedAd(): string
- {
- return $this->updatedAd;
- }
- /**
- * @param string $updatedAd
- */
- public function setUpdatedAd(string $updatedAd)
- {
- $this->updatedAd = $updatedAd;
- }
- /**
- * @return array
- */
- public function getValues(): array
- {
- return [
- 'id' => $this->id,
- 'user_id' => $this->userId,
- 'post_id' => $this->postId,
- 'content' => $this->content,
- 'created_at' => $this->createdAt,
- 'updated_at' => $this->updatedAd
- ];
- }
- /**
- * @return array
- */
- public function getFields(): array
- {
- return ['id', 'user_id', 'post_id', 'content', 'created_at', 'updated_at'];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement