1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of EC-CUBE |
5
|
|
|
* |
6
|
|
|
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. |
7
|
|
|
* |
8
|
|
|
* http://www.ec-cube.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
|
1 |
|
if (!class_exists('\Eccube\Entity\MailTemplate')) { |
19
|
|
|
/** |
20
|
|
|
* MailTemplate |
21
|
|
|
* |
22
|
|
|
* @ORM\Table(name="dtb_mail_template") |
23
|
|
|
* @ORM\InheritanceType("SINGLE_TABLE") |
24
|
|
|
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255) |
25
|
|
|
* @ORM\HasLifecycleCallbacks() |
26
|
|
|
* @ORM\Entity(repositoryClass="Eccube\Repository\MailTemplateRepository") |
27
|
|
|
*/ |
28
|
|
|
class MailTemplate extends \Eccube\Entity\AbstractEntity |
29
|
|
|
{ |
30
|
|
|
|
31
|
|
|
const EDIT_TYPE_USER = 0; |
32
|
|
|
const EDIT_TYPE_DEFAULT = 1; |
33
|
5 |
|
|
34
|
|
|
/** |
35
|
5 |
|
* @return string |
36
|
|
|
*/ |
37
|
|
|
public function __toString() |
38
|
|
|
{ |
39
|
|
|
return $this->getName() ? $this->getName() : ''; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var int |
44
|
|
|
* |
45
|
|
|
* @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
46
|
|
|
* @ORM\Id |
47
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
48
|
|
|
*/ |
49
|
|
|
private $id; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var string|null |
53
|
|
|
* |
54
|
|
|
* @ORM\Column(name="name", type="string", length=255, nullable=true) |
55
|
|
|
*/ |
56
|
|
|
private $name; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var string|null |
60
|
|
|
* |
61
|
|
|
* @ORM\Column(name="file_name", type="string", length=255, nullable=true) |
62
|
|
|
*/ |
63
|
|
|
private $file_name; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var string|null |
67
|
|
|
* |
68
|
|
|
* @ORM\Column(name="mail_subject", type="string", length=255, nullable=true) |
69
|
|
|
*/ |
70
|
|
|
private $mail_subject; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @var int |
74
|
|
|
* |
75
|
|
|
* @ORM\Column(name="edit_type", type="smallint", options={"unsigned":true,"default":1}) |
76
|
|
|
*/ |
77
|
|
|
private $edit_type = self::EDIT_TYPE_DEFAULT; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @var \DateTime |
81
|
|
|
* |
82
|
|
|
* @ORM\Column(name="create_date", type="datetimetz") |
83
|
|
|
*/ |
84
|
|
|
private $create_date; |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @var \DateTime |
88
|
|
|
* |
89
|
|
|
* @ORM\Column(name="update_date", type="datetimetz") |
90
|
|
|
*/ |
91
|
|
|
private $update_date; |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @var \Eccube\Entity\Member |
95
|
|
|
* |
96
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Member") |
97
|
|
|
* @ORM\JoinColumns({ |
98
|
|
|
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id") |
99
|
|
|
* }) |
100
|
|
|
*/ |
101
|
|
|
private $Creator; |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* Get id. |
105
|
|
|
* |
106
|
|
|
* @return int |
107
|
|
|
*/ |
108
|
|
|
public function getId() |
109
|
|
|
{ |
110
|
|
|
return $this->id; |
111
|
2 |
|
} |
112
|
|
|
|
113
|
2 |
|
/** |
114
|
|
|
* Set name. |
115
|
|
|
* |
116
|
|
|
* @param string|null $name |
117
|
|
|
* |
118
|
|
|
* @return MailTemplate |
119
|
|
|
*/ |
120
|
|
|
public function setName($name = null) |
121
|
|
|
{ |
122
|
|
|
$this->name = $name; |
123
|
9 |
|
|
124
|
|
|
return $this; |
125
|
9 |
|
} |
126
|
|
|
|
127
|
9 |
|
/** |
128
|
|
|
* Get name. |
129
|
|
|
* |
130
|
|
|
* @return string|null |
131
|
|
|
*/ |
132
|
|
|
public function getName() |
133
|
|
|
{ |
134
|
|
|
return $this->name; |
135
|
5 |
|
} |
136
|
|
|
|
137
|
5 |
|
/** |
138
|
|
|
* Set fileName. |
139
|
|
|
* |
140
|
|
|
* @param string|null $fileName |
141
|
|
|
* |
142
|
|
|
* @return MailTemplate |
143
|
|
|
*/ |
144
|
|
|
public function setFileName($fileName = null) |
145
|
|
|
{ |
146
|
|
|
$this->file_name = $fileName; |
147
|
2 |
|
|
148
|
|
|
return $this; |
149
|
2 |
|
} |
150
|
|
|
|
151
|
2 |
|
/** |
152
|
|
|
* Get fileName. |
153
|
|
|
* |
154
|
|
|
* @return string|null |
155
|
|
|
*/ |
156
|
|
|
public function getFileName() |
157
|
|
|
{ |
158
|
|
|
return $this->file_name; |
159
|
28 |
|
} |
160
|
|
|
|
161
|
28 |
|
/** |
162
|
|
|
* Set mailSubject. |
163
|
|
|
* |
164
|
|
|
* @param string|null $mailSubject |
165
|
|
|
* |
166
|
|
|
* @return MailTemplate |
167
|
|
|
*/ |
168
|
|
|
public function setMailSubject($mailSubject = null) |
169
|
|
|
{ |
170
|
|
|
$this->mail_subject = $mailSubject; |
171
|
9 |
|
|
172
|
|
|
return $this; |
173
|
9 |
|
} |
174
|
|
|
|
175
|
9 |
|
/** |
176
|
|
|
* Get mailSubject. |
177
|
|
|
* |
178
|
|
|
* @return string|null |
179
|
|
|
*/ |
180
|
|
|
public function getMailSubject() |
181
|
|
|
{ |
182
|
|
|
return $this->mail_subject; |
183
|
27 |
|
} |
184
|
|
|
|
185
|
27 |
|
/** |
186
|
|
|
* Set editType. |
187
|
|
|
* |
188
|
|
|
* @param int $editType |
189
|
|
|
* |
190
|
|
|
* @return MailTemplate |
191
|
|
|
*/ |
192
|
|
|
public function setEditType($editType) |
193
|
|
|
{ |
194
|
|
|
$this->edit_type = $editType; |
195
|
9 |
|
|
196
|
|
|
return $this; |
197
|
9 |
|
} |
198
|
|
|
|
199
|
9 |
|
/** |
200
|
|
|
* Get editType. |
201
|
|
|
* |
202
|
|
|
* @return int |
203
|
|
|
*/ |
204
|
|
|
public function getEditType() |
205
|
|
|
{ |
206
|
|
|
return $this->edit_type; |
207
|
27 |
|
} |
208
|
|
|
|
209
|
27 |
|
/** |
210
|
|
|
* Set createDate. |
211
|
|
|
* |
212
|
|
|
* @param \DateTime $createDate |
213
|
|
|
* |
214
|
|
|
* @return MailTemplate |
215
|
|
|
*/ |
216
|
|
|
public function setCreateDate($createDate) |
217
|
|
|
{ |
218
|
|
|
$this->create_date = $createDate; |
219
|
9 |
|
|
220
|
|
|
return $this; |
221
|
9 |
|
} |
222
|
|
|
|
223
|
9 |
|
/** |
224
|
|
|
* Get createDate. |
225
|
|
|
* |
226
|
|
|
* @return \DateTime |
227
|
|
|
*/ |
228
|
|
|
public function getCreateDate() |
229
|
|
|
{ |
230
|
|
|
return $this->create_date; |
231
|
27 |
|
} |
232
|
|
|
|
233
|
27 |
|
/** |
234
|
|
|
* Set updateDate. |
235
|
|
|
* |
236
|
|
|
* @param \DateTime $updateDate |
237
|
|
|
* |
238
|
|
|
* @return MailTemplate |
239
|
|
|
*/ |
240
|
|
|
public function setUpdateDate($updateDate) |
241
|
|
|
{ |
242
|
|
|
$this->update_date = $updateDate; |
243
|
9 |
|
|
244
|
|
|
return $this; |
245
|
9 |
|
} |
246
|
|
|
|
247
|
9 |
|
/** |
248
|
|
|
* Get updateDate. |
249
|
|
|
* |
250
|
|
|
* @return \DateTime |
251
|
|
|
*/ |
252
|
|
|
public function getUpdateDate() |
253
|
|
|
{ |
254
|
|
|
return $this->update_date; |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* Set creator. |
259
|
|
|
* |
260
|
|
|
* @param \Eccube\Entity\Member|null $creator |
261
|
|
|
* |
262
|
|
|
* @return MailTemplate |
263
|
|
|
*/ |
264
|
|
|
public function setCreator(\Eccube\Entity\Member $creator = null) |
265
|
|
|
{ |
266
|
|
|
$this->Creator = $creator; |
267
|
9 |
|
|
268
|
|
|
return $this; |
269
|
9 |
|
} |
270
|
|
|
|
271
|
9 |
|
/** |
272
|
|
|
* Get creator. |
273
|
|
|
* |
274
|
|
|
* @return \Eccube\Entity\Member|null |
275
|
|
|
*/ |
276
|
|
|
public function getCreator() |
277
|
|
|
{ |
278
|
|
|
return $this->Creator; |
279
|
|
|
} |
280
|
|
|
} |
281
|
|
|
} |
282
|
|
|
|