2626#[ORM \Index(name: 'enteredindex ' , columns: ['entered ' ])]
2727#[ORM \Index(name: 'confidx ' , columns: ['confirmed ' ])]
2828#[ORM \Index(name: 'blidx ' , columns: ['blacklisted ' ])]
29+ #[ORM \Index(name: 'optidx ' , columns: ['optedin ' ])]
30+ #[ORM \Index(name: 'uuididx ' , columns: ['uuid ' ])]
31+ #[ORM \Index(name: 'foreignkey ' , columns: ['foreignkey ' ])]
32+ #[ORM \UniqueConstraint(name: 'email ' , columns: ['email ' ])]
2933#[ORM \HasLifecycleCallbacks]
3034class Subscriber implements DomainModel, Identity, CreationDate, ModificationDate
3135{
@@ -37,8 +41,8 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat
3741 #[ORM \Column(name: 'entered ' , type: 'datetime ' , nullable: true )]
3842 protected ?DateTime $ createdAt = null ;
3943
40- #[ORM \Column(name: 'modified ' , type: 'datetime ' )]
41- private ? DateTime $ updatedAt = null ;
44+ #[ORM \Column(name: 'modified ' , type: 'datetime ' , nullable: false )]
45+ private DateTime $ updatedAt ;
4246
4347 #[ORM \Column(unique: true )]
4448 private string $ email = '' ;
@@ -52,7 +56,7 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat
5256 #[ORM \Column(name: 'bouncecount ' , type: 'integer ' )]
5357 private int $ bounceCount = 0 ;
5458
55- #[ORM \Column(name: 'uniqid ' , unique : true )]
59+ #[ORM \Column(name: 'uniqid ' , type: ' string ' , length: 255 , nullable : true )]
5660 private string $ uniqueId = '' ;
5761
5862 #[ORM \Column(name: 'htmlemail ' , type: 'boolean ' )]
@@ -61,8 +65,8 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat
6165 #[ORM \Column(type: 'boolean ' )]
6266 private bool $ disabled = false ;
6367
64- #[ORM \Column(name: 'extradata ' , type: 'text ' )]
65- private ?string $ extraData ;
68+ #[ORM \Column(name: 'extradata ' , type: 'text ' , nullable: true )]
69+ private ?string $ extraData = null ;
6670
6771 #[ORM \OneToMany(
6872 targetEntity: Subscription::class,
@@ -83,12 +87,34 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat
8387 )]
8488 private Collection $ attributes ;
8589
90+ #[ORM \Column(name: 'optedin ' , type: 'boolean ' )]
91+ private bool $ optedIn = false ;
92+
93+ #[ORM \Column(name: 'uuid ' , type: 'string ' , length: 36 )]
94+ private string $ uuid = '' ;
95+
96+ #[ORM \Column(name: 'subscribepage ' , type: 'integer ' , nullable: true )]
97+ private ?int $ subscribePage = null ;
98+
99+ #[ORM \Column(name: 'rssfrequency ' , type: 'string ' , length: 100 , nullable: true )]
100+ private ?string $ rssFrequency = null ;
101+
102+ #[ORM \Column(name: 'password ' , type: 'string ' , length: 255 , nullable: true )]
103+ private ?string $ password = null ;
104+
105+ #[ORM \Column(name: 'passwordchanged ' , type: 'datetime ' , nullable: true )]
106+ private ?DateTime $ passwordChanged = null ;
107+
108+ #[ORM \Column(name: 'foreignkey ' , type: 'string ' , length: 100 , nullable: true )]
109+ private ?string $ foreignkey = null ;
110+
86111 public function __construct ()
87112 {
88113 $ this ->subscriptions = new ArrayCollection ();
89114 $ this ->attributes = new ArrayCollection ();
90115 $ this ->extraData = '' ;
91116 $ this ->createdAt = new DateTime ();
117+ $ this ->updatedAt = new DateTime ();
92118 }
93119
94120 public function getId (): ?int
@@ -101,12 +127,11 @@ public function getCreatedAt(): ?DateTime
101127 return $ this ->createdAt ;
102128 }
103129
104- public function getUpdatedAt (): ? DateTime
130+ public function getUpdatedAt (): DateTime
105131 {
106132 return $ this ->updatedAt ;
107133 }
108134
109- #[ORM \PrePersist]
110135 #[ORM \PreUpdate]
111136 public function updateUpdatedAt (): void
112137 {
0 commit comments