1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of EC-CUBE |
5
|
|
|
* |
6
|
|
|
* Copyright(c) LOCKON CO.,LTD. All Rights Reserved. |
7
|
|
|
* |
8
|
|
|
* http://www.lockon.co.jp/ |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
11
|
|
|
* file that was distributed with this source code. |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
namespace Eccube\Entity; |
15
|
|
|
|
16
|
|
|
use Doctrine\ORM\Mapping as ORM; |
17
|
|
|
|
18
|
|
|
if (!class_exists('\Eccube\Entity\MailHistory')) { |
19
|
|
|
/** |
20
|
|
|
* MailHistory |
21
|
|
|
* |
22
|
|
|
* @ORM\Table(name="dtb_mail_history") |
23
|
|
|
* @ORM\InheritanceType("SINGLE_TABLE") |
24
|
|
|
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255) |
25
|
|
|
* @ORM\HasLifecycleCallbacks() |
26
|
|
|
* @ORM\Entity(repositoryClass="Eccube\Repository\MailHistoryRepository") |
27
|
|
|
*/ |
28
|
|
|
class MailHistory extends AbstractEntity |
29
|
|
|
{ |
30
|
|
|
/** |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public function __toString() |
34
|
|
|
{ |
35
|
|
|
return (string) $this->getMailSubject(); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var int |
40
|
|
|
* |
41
|
|
|
* @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
42
|
|
|
* @ORM\Id |
43
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
44
|
|
|
*/ |
45
|
|
|
private $id; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var \DateTime|null |
49
|
|
|
* |
50
|
|
|
* @ORM\Column(name="send_date", type="datetimetz", nullable=true) |
51
|
|
|
*/ |
52
|
|
|
private $send_date; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string|null |
56
|
|
|
* |
57
|
|
|
* @ORM\Column(name="mail_subject", type="string", length=255, nullable=true) |
58
|
|
|
*/ |
59
|
|
|
private $mail_subject; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @var string|null |
63
|
|
|
* |
64
|
|
|
* @ORM\Column(name="mail_body", type="text", nullable=true) |
65
|
|
|
*/ |
66
|
|
|
private $mail_body; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var string|null |
70
|
|
|
* |
71
|
|
|
* @ORM\Column(name="mail_html_body", type="text", nullable=true) |
72
|
|
|
*/ |
73
|
|
|
private $mail_html_body; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var \Eccube\Entity\Order |
77
|
|
|
* |
78
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Order", inversedBy="MailHistories") |
79
|
|
|
* @ORM\JoinColumns({ |
80
|
|
|
* @ORM\JoinColumn(name="order_id", referencedColumnName="id") |
81
|
|
|
* }) |
82
|
|
|
*/ |
83
|
|
|
private $Order; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var \Eccube\Entity\Member |
87
|
|
|
* |
88
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Member") |
89
|
|
|
* @ORM\JoinColumns({ |
90
|
|
|
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id", nullable=true) |
91
|
|
|
* }) |
92
|
|
|
*/ |
93
|
|
|
private $Creator; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Get id. |
97
|
|
|
* |
98
|
|
|
* @return int |
99
|
|
|
*/ |
100
|
|
|
public function getId() |
101
|
|
|
{ |
102
|
|
|
return $this->id; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Set sendDate. |
107
|
|
|
* |
108
|
|
|
* @param \DateTime|null $sendDate |
109
|
|
|
* |
110
|
|
|
* @return MailHistory |
111
|
|
|
*/ |
112
|
|
|
public function setSendDate($sendDate = null) |
113
|
|
|
{ |
114
|
|
|
$this->send_date = $sendDate; |
115
|
|
|
|
116
|
|
|
return $this; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* Get sendDate. |
121
|
|
|
* |
122
|
|
|
* @return \DateTime|null |
123
|
|
|
*/ |
124
|
|
|
public function getSendDate() |
125
|
|
|
{ |
126
|
|
|
return $this->send_date; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* Set mailSubject. |
131
|
|
|
* |
132
|
|
|
* @param string|null $mailSubject |
133
|
|
|
* |
134
|
|
|
* @return MailHistory |
135
|
|
|
*/ |
136
|
|
|
public function setMailSubject($mailSubject = null) |
137
|
|
|
{ |
138
|
|
|
$this->mail_subject = $mailSubject; |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* Get mailSubject. |
145
|
|
|
* |
146
|
|
|
* @return string|null |
147
|
|
|
*/ |
148
|
|
|
public function getMailSubject() |
149
|
|
|
{ |
150
|
|
|
return $this->mail_subject; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* Set mailBody. |
155
|
|
|
* |
156
|
|
|
* @param string|null $mailBody |
157
|
|
|
* |
158
|
|
|
* @return MailHistory |
159
|
|
|
*/ |
160
|
|
|
public function setMailBody($mailBody = null) |
161
|
|
|
{ |
162
|
|
|
$this->mail_body = $mailBody; |
163
|
|
|
|
164
|
|
|
return $this; |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* Get mailBody. |
169
|
|
|
* |
170
|
|
|
* @return string|null |
171
|
|
|
*/ |
172
|
|
|
public function getMailBody() |
173
|
|
|
{ |
174
|
|
|
return $this->mail_body; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* Set mailHtmlBody. |
179
|
|
|
* |
180
|
|
|
* @param string|null $mailHtmlBody |
181
|
|
|
* |
182
|
|
|
* @return MailHistory |
183
|
|
|
*/ |
184
|
|
|
public function setMailHtmlBody($mailHtmlBody = null) |
185
|
|
|
{ |
186
|
|
|
$this->mail_html_body = $mailHtmlBody; |
187
|
|
|
|
188
|
|
|
return $this; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* Get mailHtmlBody. |
193
|
|
|
* |
194
|
|
|
* @return string|null |
195
|
|
|
*/ |
196
|
|
|
public function getMailHtmlBody() |
197
|
|
|
{ |
198
|
|
|
return $this->mail_html_body; |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* Set order. |
203
|
|
|
* |
204
|
|
|
* @param \Eccube\Entity\Order|null $order |
205
|
|
|
* |
206
|
|
|
* @return MailHistory |
207
|
|
|
*/ |
208
|
|
|
public function setOrder(\Eccube\Entity\Order $order = null) |
209
|
|
|
{ |
210
|
|
|
$this->Order = $order; |
211
|
|
|
|
212
|
|
|
return $this; |
213
|
|
|
} |
214
|
|
|
|
215
|
|
|
/** |
216
|
|
|
* Get order. |
217
|
|
|
* |
218
|
|
|
* @return \Eccube\Entity\Order|null |
219
|
|
|
*/ |
220
|
|
|
public function getOrder() |
221
|
|
|
{ |
222
|
|
|
return $this->Order; |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* Set creator. |
227
|
|
|
* |
228
|
|
|
* @param \Eccube\Entity\Member|null $creator |
229
|
|
|
* |
230
|
|
|
* @return MailHistory |
231
|
|
|
*/ |
232
|
|
|
public function setCreator(\Eccube\Entity\Member $creator = null) |
233
|
|
|
{ |
234
|
|
|
$this->Creator = $creator; |
235
|
|
|
|
236
|
|
|
return $this; |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
/** |
240
|
|
|
* Get creator. |
241
|
|
|
* |
242
|
|
|
* @return \Eccube\Entity\Member|null |
243
|
|
|
*/ |
244
|
|
|
public function getCreator() |
245
|
|
|
{ |
246
|
|
|
return $this->Creator; |
247
|
|
|
} |
248
|
|
|
} |
249
|
|
|
} |
250
|
|
|
|