Skip to content

Commit 761056e

Browse files
committed
message models
1 parent 87a349e commit 761056e

File tree

10 files changed

+445
-2
lines changed

10 files changed

+445
-2
lines changed

src/Domain/Model/Identity/AdminPasswordRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AdminPasswordRequest implements DomainModel, Identity
1818
#[ORM\Id]
1919
#[ORM\GeneratedValue]
2020
#[ORM\Column(name: 'id_key', type: 'integer', options: ['unsigned' => true])]
21-
private int $id;
21+
private ?int $id = null;
2222

2323
#[ORM\Column(name: 'date', type: 'datetime', nullable: true)]
2424
private ?DateTime $date;
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpList\Core\Domain\Model\Messaging;
6+
7+
use Doctrine\ORM\Mapping as ORM;
8+
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
9+
use PhpList\Core\Domain\Model\Interfaces\Identity;
10+
use PhpList\Core\Domain\Model\Traits\IdentityTrait;
11+
use PhpList\Core\Domain\Repository\Messaging\SubscriberAttachmentRepository;
12+
13+
#[ORM\Entity(repositoryClass: SubscriberAttachmentRepository::class)]
14+
#[ORM\Table(name: 'phplist_attachment')]
15+
class Attachment implements DomainModel, Identity
16+
{
17+
use IdentityTrait;
18+
19+
#[ORM\Column(type: 'string', length: 255, nullable: true)]
20+
private ?string $filename;
21+
22+
#[ORM\Column(name:'remotefile', type: 'string', length: 255, nullable: true)]
23+
private ?string $remoteFile;
24+
25+
#[ORM\Column(name: 'mimetype', type: 'string', length: 255, nullable: true)]
26+
private ?string $mimeType;
27+
28+
#[ORM\Column(type: 'text', nullable: true)]
29+
private ?string $description;
30+
31+
#[ORM\Column(type: 'integer', nullable: true)]
32+
private ?int $size;
33+
34+
public function __construct(
35+
?string $filename = null,
36+
?string $remoteFile = null,
37+
?string $mimeType = null,
38+
?string $description = null,
39+
?int $size = null
40+
) {
41+
$this->filename = $filename;
42+
$this->remoteFile = $remoteFile;
43+
$this->mimeType = $mimeType;
44+
$this->description = $description;
45+
$this->size = $size;
46+
}
47+
48+
public function getFilename(): ?string
49+
{
50+
return $this->filename;
51+
}
52+
53+
public function setFilename(?string $filename): void
54+
{
55+
$this->filename = $filename;
56+
}
57+
58+
public function getRemoteFile(): ?string
59+
{
60+
return $this->remoteFile;
61+
}
62+
63+
public function setRemoteFile(?string $remoteFile): void
64+
{
65+
$this->remoteFile = $remoteFile;
66+
}
67+
68+
public function getMimeType(): ?string
69+
{
70+
return $this->mimeType;
71+
}
72+
73+
public function setMimeType(?string $mimeType): void
74+
{
75+
$this->mimeType = $mimeType;
76+
}
77+
78+
public function getDescription(): ?string
79+
{
80+
return $this->description;
81+
}
82+
83+
public function setDescription(?string $description): void
84+
{
85+
$this->description = $description;
86+
}
87+
88+
public function getSize(): ?int
89+
{
90+
return $this->size;
91+
}
92+
93+
public function setSize(?int $size): void
94+
{
95+
$this->size = $size;
96+
}
97+
}

src/Domain/Model/Messaging/Bounce.php

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpList\Core\Domain\Model\Messaging;
6+
7+
use Doctrine\ORM\Mapping as ORM;
8+
use DateTime;
9+
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
10+
use PhpList\Core\Domain\Model\Interfaces\Identity;
11+
use PhpList\Core\Domain\Model\Traits\IdentityTrait;
12+
use PhpList\Core\Domain\Repository\Messaging\BounceRepository;
13+
14+
#[ORM\Entity(repositoryClass: BounceRepository::class)]
15+
#[ORM\Table(name: 'phplist_bounce')]
16+
#[ORM\Index(name: 'dateindex', columns: ['date'])]
17+
#[ORM\Index(name: 'statusidx', columns: ['status'])]
18+
class Bounce implements DomainModel, Identity
19+
{
20+
use IdentityTrait;
21+
22+
#[ORM\Column(type: 'datetime', nullable: true)]
23+
private ?DateTime $date;
24+
25+
#[ORM\Column(type: 'text', nullable: true)]
26+
private ?string $header;
27+
28+
#[ORM\Column(type: 'blob', nullable: true)]
29+
private ?string $data;
30+
31+
#[ORM\Column(type: 'string', length: 255, nullable: true)]
32+
private ?string $status;
33+
34+
#[ORM\Column(type: 'text', nullable: true)]
35+
private ?string $comment;
36+
37+
public function __construct(
38+
?DateTime $date = null,
39+
?string $header = null,
40+
?string $data = null,
41+
?string $status = null,
42+
?string $comment = null
43+
) {
44+
$this->date = $date;
45+
$this->header = $header;
46+
$this->data = $data;
47+
$this->status = $status;
48+
$this->comment = $comment;
49+
}
50+
51+
public function getId(): int
52+
{
53+
return $this->id;
54+
}
55+
56+
public function getDate(): ?DateTime
57+
{
58+
return $this->date;
59+
}
60+
61+
public function setDate(?DateTime $date): void
62+
{
63+
$this->date = $date;
64+
}
65+
66+
public function getHeader(): ?string
67+
{
68+
return $this->header;
69+
}
70+
71+
public function setHeader(?string $header): void
72+
{
73+
$this->header = $header;
74+
}
75+
76+
public function getData(): ?string
77+
{
78+
return $this->data;
79+
}
80+
81+
public function setData(?string $data): void
82+
{
83+
$this->data = $data;
84+
}
85+
86+
public function getStatus(): ?string
87+
{
88+
return $this->status;
89+
}
90+
91+
public function setStatus(?string $status): void
92+
{
93+
$this->status = $status;
94+
}
95+
96+
public function getComment(): ?string
97+
{
98+
return $this->comment;
99+
}
100+
101+
public function setComment(?string $comment): void
102+
{
103+
$this->comment = $comment;
104+
}
105+
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpList\Core\Domain\Model\Messaging;
6+
7+
use Doctrine\ORM\Mapping as ORM;
8+
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
9+
use PhpList\Core\Domain\Model\Interfaces\Identity;
10+
use PhpList\Core\Domain\Model\Traits\IdentityTrait;
11+
use PhpList\Core\Domain\Repository\Messaging\BounceRegexRepository;
12+
13+
#[ORM\Entity(repositoryClass: BounceRegexRepository::class)]
14+
#[ORM\Table(name: 'phplist_bounceregex')]
15+
#[ORM\UniqueConstraint(name: 'regex', columns: ['regexhash'])]
16+
class BounceRegex implements DomainModel, Identity
17+
{
18+
use IdentityTrait;
19+
20+
#[ORM\Column(type: 'string', length: 2083, nullable: true)]
21+
private ?string $regex;
22+
23+
#[ORM\Column(name: 'regexhash', type: 'string', length: 32, nullable: true)]
24+
private ?string $regexHash;
25+
26+
#[ORM\Column(type: 'string', length: 255, nullable: true)]
27+
private ?string $action;
28+
29+
#[ORM\Column(name: 'listorder', type: 'integer', nullable: true, options: ['default' => 0])]
30+
private ?int $listOrder = 0;
31+
32+
#[ORM\Column(type: 'integer', nullable: true)]
33+
private ?int $admin;
34+
35+
#[ORM\Column(type: 'text', nullable: true)]
36+
private ?string $comment;
37+
38+
#[ORM\Column(type: 'string', length: 255, nullable: true)]
39+
private ?string $status;
40+
41+
#[ORM\Column(type: 'integer', nullable: true, options: ['default' => 0])]
42+
private ?int $count = 0;
43+
44+
public function __construct(
45+
?string $regex = null,
46+
?string $regexHash = null,
47+
?string $action = null,
48+
?int $listOrder = 0,
49+
?int $admin = null,
50+
?string $comment = null,
51+
?string $status = null,
52+
?int $count = 0
53+
) {
54+
$this->regex = $regex;
55+
$this->regexHash = $regexHash;
56+
$this->action = $action;
57+
$this->listOrder = $listOrder;
58+
$this->admin = $admin;
59+
$this->comment = $comment;
60+
$this->status = $status;
61+
$this->count = $count;
62+
}
63+
64+
public function getId(): int
65+
{
66+
return $this->id;
67+
}
68+
69+
public function getRegex(): ?string
70+
{
71+
return $this->regex;
72+
}
73+
74+
public function setRegex(?string $regex): void
75+
{
76+
$this->regex = $regex;
77+
}
78+
79+
public function getRegexHash(): ?string
80+
{
81+
return $this->regexHash;
82+
}
83+
84+
public function setRegexHash(?string $regexHash): void
85+
{
86+
$this->regexHash = $regexHash;
87+
}
88+
89+
public function getAction(): ?string
90+
{
91+
return $this->action;
92+
}
93+
94+
public function setAction(?string $action): void
95+
{
96+
$this->action = $action;
97+
}
98+
99+
public function getListOrder(): ?int
100+
{
101+
return $this->listOrder;
102+
}
103+
104+
public function setListOrder(?int $listOrder): void
105+
{
106+
$this->listOrder = $listOrder;
107+
}
108+
109+
public function getAdmin(): ?int
110+
{
111+
return $this->admin;
112+
}
113+
114+
public function setAdmin(?int $admin): void
115+
{
116+
$this->admin = $admin;
117+
}
118+
119+
public function getComment(): ?string
120+
{
121+
return $this->comment;
122+
}
123+
124+
public function setComment(?string $comment): void
125+
{
126+
$this->comment = $comment;
127+
}
128+
129+
public function getStatus(): ?string
130+
{
131+
return $this->status;
132+
}
133+
134+
public function setStatus(?string $status): void
135+
{
136+
$this->status = $status;
137+
}
138+
139+
public function getCount(): ?int
140+
{
141+
return $this->count;
142+
}
143+
144+
public function setCount(?int $count): void
145+
{
146+
$this->count = $count;
147+
}
148+
}

0 commit comments

Comments
 (0)