-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
178 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,37 +20,37 @@ | |
* | ||
* @author Oliver Klee <[email protected]> | ||
*/ | ||
#[ORM\Entity(repositoryClass: "PhpList\Core\Domain\Repository\Identity\AdministratorRepository")] | ||
#[ORM\Table(name: "phplist_admin")] | ||
#[ORM\Entity(repositoryClass: 'PhpList\Core\Domain\Repository\Identity\AdministratorRepository')] | ||
#[ORM\Table(name: 'phplist_admin')] | ||
#[ORM\HasLifecycleCallbacks] | ||
class Administrator implements DomainModel, Identity, CreationDate, ModificationDate | ||
{ | ||
use IdentityTrait; | ||
use CreationDateTrait; | ||
use ModificationDateTrait; | ||
|
||
#[ORM\Column(name: "loginname")] | ||
#[ORM\Column(name: 'loginname')] | ||
private string $loginName; | ||
|
||
#[ORM\Column(name: "email")] | ||
#[ORM\Column(name: 'email')] | ||
private string $emailAddress; | ||
|
||
#[ORM\Column(name: "created", type: "datetime")] | ||
#[ORM\Column(name: 'created', type: 'datetime')] | ||
protected ?DateTime $creationDate = null; | ||
|
||
#[ORM\Column(name: "modified", type: "datetime")] | ||
#[ORM\Column(name: 'modified', type: 'datetime')] | ||
protected ?DateTime $modificationDate; | ||
|
||
#[ORM\Column(name: "password")] | ||
#[ORM\Column(name: 'password')] | ||
private string $passwordHash; | ||
|
||
#[ORM\Column(name: "passwordchanged", type: "date", nullable: true)] | ||
#[ORM\Column(name: 'passwordchanged', type: 'date', nullable: true)] | ||
private ?DateTime $passwordChangeDate; | ||
|
||
#[ORM\Column(type: "boolean")] | ||
#[ORM\Column(type: 'boolean')] | ||
private bool $disabled; | ||
|
||
#[ORM\Column(name: "superuser", type: "boolean")] | ||
#[ORM\Column(name: 'superuser', type: 'boolean')] | ||
private bool $superUser; | ||
|
||
public function __construct() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,29 @@ | |
* This class represents an API authentication token for an administrator. | ||
* @author Oliver Klee <[email protected]> | ||
*/ | ||
#[ORM\Entity(repositoryClass: "PhpList\Core\Domain\Repository\Identity\AdministratorTokenRepository")] | ||
#[ORM\Table(name: "phplist_admintoken")] | ||
#[ORM\Entity(repositoryClass: 'PhpList\Core\Domain\Repository\Identity\AdministratorTokenRepository')] | ||
#[ORM\Table(name: 'phplist_admintoken')] | ||
#[ORM\HasLifecycleCallbacks] | ||
class AdministratorToken implements DomainModel, Identity, CreationDate | ||
{ | ||
use IdentityTrait; | ||
|
||
public const DEFAULT_EXPIRY = '+1 hour'; | ||
|
||
#[ORM\Column(name: "entered", type: "integer")] | ||
#[ORM\Column(name: 'entered', type: 'integer')] | ||
#[Ignore] | ||
protected int $creationDate = 0; | ||
|
||
#[ORM\Column(name: "expires", type: "datetime")] | ||
#[SerializedName("expiry_date")] | ||
#[ORM\Column(name: 'expires', type: 'datetime')] | ||
#[SerializedName('expiry_date')] | ||
private ?DateTime $expiry = null; | ||
|
||
#[ORM\Column(name: "value")] | ||
#[SerializedName("key")] | ||
#[ORM\Column(name: 'value')] | ||
#[SerializedName('key')] | ||
private string $key = ''; | ||
|
||
#[ORM\ManyToOne(targetEntity: "PhpList\Core\Domain\Model\Identity\Administrator")] | ||
#[ORM\JoinColumn(name: "adminid")] | ||
#[ORM\ManyToOne(targetEntity: 'PhpList\Core\Domain\Model\Identity\Administrator')] | ||
#[ORM\JoinColumn(name: 'adminid')] | ||
#[Ignore] | ||
private ?Administrator $administrator = null; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,10 @@ | |
* selected lists (as the owner), send campaigns to these lists and edit subscribers. | ||
* @author Oliver Klee <[email protected]> | ||
*/ | ||
#[ORM\Entity(repositoryClass: "PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository")] | ||
#[ORM\Table(name: "phplist_list")] | ||
#[ORM\Index(name: "nameidx", columns: ["name"])] | ||
#[ORM\Index(name: "listorderidx", columns: ["listorder"])] | ||
#[ORM\Entity(repositoryClass: 'PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository')] | ||
#[ORM\Table(name: 'phplist_list')] | ||
#[ORM\Index(name: 'nameidx', columns: ['name'])] | ||
#[ORM\Index(name: 'listorderidx', columns: ['listorder'])] | ||
#[ORM\HasLifecycleCallbacks] | ||
class SubscriberList implements DomainModel, Identity, CreationDate, ModificationDate | ||
{ | ||
|
@@ -39,53 +39,53 @@ class SubscriberList implements DomainModel, Identity, CreationDate, Modificatio | |
use ModificationDateTrait; | ||
|
||
#[ORM\Column] | ||
#[SerializedName("name")] | ||
#[SerializedName('name')] | ||
#[Groups(['SubscriberList'])] | ||
private string $name = ''; | ||
|
||
#[ORM\Column] | ||
#[SerializedName("description")] | ||
#[SerializedName('description')] | ||
#[Groups(['SubscriberList'])] | ||
private string $description = ''; | ||
|
||
#[ORM\Column(name: "entered", type: "datetime", nullable: true)] | ||
#[SerializedName("creation_date")] | ||
#[ORM\Column(name: 'entered', type: 'datetime', nullable: true)] | ||
#[SerializedName('creation_date')] | ||
#[Groups(['SubscriberList'])] | ||
protected ?DateTime $creationDate = null; | ||
|
||
#[ORM\Column(name: "modified", type: "datetime")] | ||
#[ORM\Column(name: 'modified', type: 'datetime')] | ||
#[Ignore] | ||
protected ?DateTime $modificationDate = null; | ||
|
||
#[ORM\Column(name: "listorder", type: "integer")] | ||
#[SerializedName("list_position")] | ||
#[ORM\Column(name: 'listorder', type: 'integer')] | ||
#[SerializedName('list_position')] | ||
#[Groups(['SubscriberList'])] | ||
private ?int $listPosition; | ||
|
||
#[ORM\Column(name: "prefix")] | ||
#[SerializedName("subject_prefix")] | ||
#[ORM\Column(name: 'prefix')] | ||
#[SerializedName('subject_prefix')] | ||
#[Groups(['SubscriberList'])] | ||
private ?string $subjectPrefix; | ||
|
||
#[ORM\Column(name: "active", type: "boolean")] | ||
#[SerializedName("public")] | ||
#[ORM\Column(name: 'active', type: 'boolean')] | ||
#[SerializedName('public')] | ||
#[Groups(['SubscriberList'])] | ||
private bool $public; | ||
|
||
#[ORM\Column] | ||
#[SerializedName("category")] | ||
#[SerializedName('category')] | ||
#[Groups(['SubscriberList'])] | ||
private string $category; | ||
|
||
#[ORM\ManyToOne(targetEntity: "PhpList\Core\Domain\Model\Identity\Administrator")] | ||
#[ORM\JoinColumn(name: "owner")] | ||
#[ORM\ManyToOne(targetEntity: 'PhpList\Core\Domain\Model\Identity\Administrator')] | ||
#[ORM\JoinColumn(name: 'owner')] | ||
#[Ignore] | ||
private ?Administrator $owner = null; | ||
|
||
#[ORM\OneToMany( | ||
targetEntity: "PhpList\Core\Domain\Model\Subscription\Subscription", | ||
mappedBy: "subscriberList", | ||
cascade: ["remove"], | ||
targetEntity: 'PhpList\Core\Domain\Model\Subscription\Subscription', | ||
mappedBy: 'subscriberList', | ||
cascade: ['remove'], | ||
orphanRemoval: true, | ||
)] | ||
#[MaxDepth(1)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,71 +24,71 @@ | |
* campaigns for those subscriber lists. | ||
* @author Oliver Klee <[email protected]> | ||
*/ | ||
#[ORM\Entity(repositoryClass: "PhpList\Core\Domain\Repository\Subscription\SubscriberRepository")] | ||
#[ORM\Table(name: "phplist_user_user")] | ||
#[ORM\Index(name: "idxuniqid", columns: ["uniqid"])] | ||
#[ORM\Index(name: "enteredindex", columns: ["entered"])] | ||
#[ORM\Index(name: "confidx", columns: ["confirmed"])] | ||
#[ORM\Index(name: "blidx", columns: ["blacklisted"])] | ||
#[ORM\Entity(repositoryClass: 'PhpList\Core\Domain\Repository\Subscription\SubscriberRepository')] | ||
#[ORM\Table(name: 'phplist_user_user')] | ||
#[ORM\Index(name: 'idxuniqid', columns: ['uniqid'])] | ||
#[ORM\Index(name: 'enteredindex', columns: ['entered'])] | ||
#[ORM\Index(name: 'confidx', columns: ['confirmed'])] | ||
#[ORM\Index(name: 'blidx', columns: ['blacklisted'])] | ||
#[ORM\HasLifecycleCallbacks] | ||
class Subscriber implements DomainModel, Identity, CreationDate, ModificationDate | ||
{ | ||
use IdentityTrait; | ||
use CreationDateTrait; | ||
use ModificationDateTrait; | ||
|
||
#[ORM\Column(name: "entered", type: "datetime", nullable: true)] | ||
#[SerializedName("creation_date")] | ||
#[ORM\Column(name: 'entered', type: 'datetime', nullable: true)] | ||
#[SerializedName('creation_date')] | ||
#[Groups(['SubscriberListMembers'])] | ||
protected ?DateTime $creationDate = null; | ||
|
||
#[ORM\Column(name: "modified", type: "datetime")] | ||
#[ORM\Column(name: 'modified', type: 'datetime')] | ||
#[Ignore] | ||
protected ?DateTime $modificationDate = null; | ||
|
||
#[ORM\Column(unique: true)] | ||
#[SerializedName("email")] | ||
#[SerializedName('email')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private string $email = ''; | ||
|
||
#[ORM\Column(type: "boolean")] | ||
#[SerializedName("confirmed")] | ||
#[ORM\Column(type: 'boolean')] | ||
#[SerializedName('confirmed')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private bool $confirmed = false; | ||
|
||
#[ORM\Column(type: "boolean")] | ||
#[SerializedName("blacklisted")] | ||
#[ORM\Column(type: 'boolean')] | ||
#[SerializedName('blacklisted')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private bool $blacklisted = false; | ||
|
||
#[ORM\Column(name: "bouncecount", type: "integer")] | ||
#[SerializedName("bounce_count")] | ||
#[ORM\Column(name: 'bouncecount', type: 'integer')] | ||
#[SerializedName('bounce_count')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private int $bounceCount = 0; | ||
|
||
#[ORM\Column(name: "uniqid", unique: true)] | ||
#[SerializedName("unique_id")] | ||
#[ORM\Column(name: 'uniqid', unique: true)] | ||
#[SerializedName('unique_id')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private string $uniqueId = ''; | ||
|
||
#[ORM\Column(name: "htmlemail", type: "boolean")] | ||
#[SerializedName("html_email")] | ||
#[ORM\Column(name: 'htmlemail', type: 'boolean')] | ||
#[SerializedName('html_email')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private bool $htmlEmail = false; | ||
|
||
#[ORM\Column(type: "boolean")] | ||
#[SerializedName("disabled")] | ||
#[ORM\Column(type: 'boolean')] | ||
#[SerializedName('disabled')] | ||
#[Groups(['SubscriberListMembers'])] | ||
private bool $disabled = false; | ||
|
||
#[ORM\Column(name: "extradata", type: "text")] | ||
#[SerializedName("extra_data")] | ||
#[ORM\Column(name: 'extradata', type: 'text')] | ||
#[SerializedName('extra_data')] | ||
private ?string $extraData; | ||
|
||
#[ORM\OneToMany( | ||
targetEntity: "PhpList\Core\Domain\Model\Subscription\Subscription", | ||
mappedBy: "subscriber", | ||
cascade: ["remove"], | ||
targetEntity: 'PhpList\Core\Domain\Model\Subscription\Subscription', | ||
mappedBy: 'subscriber', | ||
cascade: ['remove'], | ||
orphanRemoval: true, | ||
)] | ||
private Collection $subscriptions; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,41 +21,41 @@ | |
* campaigns for those subscriber lists. | ||
* @author Oliver Klee <[email protected]> | ||
*/ | ||
#[ORM\Entity(repositoryClass: "PhpList\Core\Domain\Repository\Subscription\SubscriptionRepository")] | ||
#[ORM\Table(name: "phplist_listuser")] | ||
#[ORM\Index(name: "userenteredidx", columns: ["userid", "entered"])] | ||
#[ORM\Index(name: "userlistenteredidx", columns: ["userid", "entered", "listid"])] | ||
#[ORM\Index(name: "useridx", columns: ["userid"])] | ||
#[ORM\Index(name: "listidx", columns: ["listid"])] | ||
#[ORM\Entity(repositoryClass: 'PhpList\Core\Domain\Repository\Subscription\SubscriptionRepository')] | ||
#[ORM\Table(name: 'phplist_listuser')] | ||
#[ORM\Index(name: 'userenteredidx', columns: ['userid', 'entered'])] | ||
#[ORM\Index(name: 'userlistenteredidx', columns: ['userid', 'entered', 'listid'])] | ||
#[ORM\Index(name: 'useridx', columns: ['userid'])] | ||
#[ORM\Index(name: 'listidx', columns: ['listid'])] | ||
#[ORM\HasLifecycleCallbacks] | ||
class Subscription implements DomainModel, CreationDate, ModificationDate | ||
{ | ||
use CreationDateTrait; | ||
use ModificationDateTrait; | ||
|
||
#[ORM\Column(name: "entered", type: "datetime", nullable: true)] | ||
#[SerializedName("creation_date")] | ||
#[ORM\Column(name: 'entered', type: 'datetime', nullable: true)] | ||
#[SerializedName('creation_date')] | ||
protected ?DateTime $creationDate = null; | ||
|
||
#[ORM\Column(name: "modified", type: "datetime")] | ||
#[ORM\Column(name: 'modified', type: 'datetime')] | ||
#[Ignore] | ||
protected ?DateTime $modificationDate = null; | ||
|
||
#[ORM\Id] | ||
#[ORM\ManyToOne( | ||
targetEntity: "PhpList\Core\Domain\Model\Subscription\Subscriber", | ||
inversedBy: "subscriptions" | ||
targetEntity: 'PhpList\Core\Domain\Model\Subscription\Subscriber', | ||
inversedBy: 'subscriptions' | ||
)] | ||
#[ORM\JoinColumn(name: "userid")] | ||
#[SerializedName("subscriber")] | ||
#[ORM\JoinColumn(name: 'userid')] | ||
#[SerializedName('subscriber')] | ||
private ?Subscriber $subscriber = null; | ||
|
||
#[ORM\Id] | ||
#[ORM\ManyToOne( | ||
targetEntity: "PhpList\Core\Domain\Model\Messaging\SubscriberList", | ||
inversedBy: "subscriptions" | ||
targetEntity: 'PhpList\Core\Domain\Model\Messaging\SubscriberList', | ||
inversedBy: 'subscriptions' | ||
)] | ||
#[ORM\JoinColumn(name: "listid", onDelete: "CASCADE")] | ||
#[ORM\JoinColumn(name: 'listid', onDelete: 'CASCADE')] | ||
#[Ignore] | ||
private ?SubscriberList $subscriberList = null; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.