summaryrefslogtreecommitdiffstats
path: root/lib/Entity/Mention.php
blob: 11498aaa0730c0c676eaa818843f8214d453dfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
<?php

declare(strict_types=1);

// Nextcloud - Social Support
// SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
// SPDX-License-Identifier: AGPL-3.0-or-later

namespace OCA\Social\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="social_mention")
 */
class Mention {
	/**
	 * @ORM\Id
	 * @ORM\Column(type="bigint")
	 * @ORM\GeneratedValue
	 */
	private string $id = "";

	/**
	 * @ORM\ManyToOne
	 * @ORM\JoinColumn()
	 */
	private ?Status $status = null;

	/**
	 * @ORM\ManyToOne
	 * @ORM\JoinColumn()
	 */
	private ?Account $account = null;

	/**
	 * @ORM\Column(name="created_at", type="datetime", nullable=false)
	 */
	private \DateTimeInterface $createdAt;

	/**
	 * @ORM\Column(name="updated_at", type="datetime", nullable=false)
	 */
	private \DateTimeInterface $updatedAt;

	/**
	 * @ORM\Column
	 */
	private bool $silent = false;

	public function __construct() {
		$this->createdAt = new \DateTime();
		$this->updatedAt = new \DateTime();
	}

	public function getId(): string {
		return $this->id;
	}

	public function getStatus(): ?Status {
		return $this->status;
	}

	public function setStatus(?Status $status): self {
		$this->status = $status;
		return $this;
	}

	public function getAccount(): ?Account {
		return $this->account;
	}

	public function setAccount(?Account $account): self {
		$this->account = $account;
		return $this;
	}

	public function getCreatedAt() {
		return $this->createdAt;
	}

	public function setCreatedAt($createdAt): self {
		$this->createdAt = $createdAt;
		return $this;
	}

	public function getUpdatedAt() {
		return $this->updatedAt;
	}

	public function setUpdatedAt($updatedAt): self {
		$this->updatedAt = $updatedAt;
		return $this;
	}

	public function isSilent(): bool {
		return $this->silent;
	}

	public function setSilent(bool $silent): self {
		$this->silent = $silent;
		return $this;
	}
}