forked from codeconsortium/CCDNForumForumBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubscription.php~
143 lines (125 loc) · 2.86 KB
/
Subscription.php~
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
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
<?php
/*
* This file is part of the CCDNForum ForumBundle
*
* (c) CCDN (c) CodeConsortium <http://www.codeconsortium.com/>
*
* Available on github <http://www.github.com/codeconsortium/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CCDNForum\ForumBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="CCDNForum\ForumBundle\Repository\SubscriptionRepository")
* @ORM\Table(name="CC_Forum_Subscription")
*/
class Subscription
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Topic", cascade={"persist"})
* @ORM\JoinColumn(name="fk_topic_id", referencedColumnName="id", onDelete="SET NULL")
*/
protected $topic = null;
/**
* @ORM\ManyToOne(targetEntity="CCDNUser\UserBundle\Entity\User", cascade={"persist"})
* @ORM\JoinColumn(name="fk_owned_by_user_id", referencedColumnName="id", onDelete="SET NULL")
*/
protected $ownedBy = null;
/**
* @ORM\Column(type="boolean", name="is_read", nullable=false)
*/
protected $isRead = false;
/**
* @ORM\Column(type="boolean", name="is_subscribed", nullable=false)
*/
protected $isSubscribed = false;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set topic
*
* @param CCDNForum\ForumBundle\Entity\Topic $topic
*/
public function setTopic(\CCDNForum\ForumBundle\Entity\Topic $topic = null)
{
$this->topic = $topic;
}
/**
* Get topic
*
* @return CCDNForum\ForumBundle\Entity\Topic
*/
public function getTopic()
{
return $this->topic;
}
/**
* Set owned_by
*
* @param CCDNUser\UserBundle\Entity\User $ownedBy
*/
public function setOwnedBy(\CCDNUser\UserBundle\Entity\User $ownedBy = null)
{
$this->ownedBy = $ownedBy;
}
/**
* Get owned_by
*
* @return CCDNUser\UserBundle\Entity\User
*/
public function getOwnedBy()
{
return $this->ownedBy;
}
/**
* Set isRead
*
* @param boolean $isRead
*/
public function setIsRead($isRead)
{
$this->isRead = $isRead;
}
/**
* Get isRead
*
* @return boolean
*/
public function getIsRead()
{
return $this->isRead;
}
/**
* Set isSubscribed
*
* @param boolean $isSubscribed
*/
public function setIsSubscribed($isSubscribed)
{
$this->isSubscribed = $isSubscribed;
}
/**
* Get isSubscribed
*
* @return boolean
*/
public function getIsSubscribed()
{
return $this->isSubscribed;
}
}