Rewrite UserFlag entity to Doctrine

[MAILPOET-2014]
This commit is contained in:
Jan Jakeš
2019-07-04 11:24:06 +02:00
committed by M. Shull
parent 7105c8ad5b
commit c71bf4833c
9 changed files with 212 additions and 141 deletions

View File

@@ -0,0 +1,65 @@
<?php
namespace MailPoet\Doctrine\Entities;
use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait;
use MailPoet\Doctrine\EntityTraits\CreatedAtTrait;
use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait;
/**
* @Entity()
* @Table(name="user_flags")
*/
class UserFlag {
use AutoincrementedIdTrait;
use CreatedAtTrait;
use UpdatedAtTrait;
/**
* @Column(type="integer")
* @var int
*/
private $user_id;
/**
* @Column(type="string")
* @var string
*/
private $name;
/**
* @Column(type="string")
* @var string|null
*/
private $value;
/** @return int */
public function getUserId() {
return $this->user_id;
}
/** @param int $user_id */
public function setUserId($user_id) {
$this->user_id = $user_id;
}
/** @return string */
public function getName() {
return $this->name;
}
/** @param string $name */
public function setName($name) {
$this->name = $name;
}
/** @return string|null */
public function getValue() {
return $this->value;
}
/** @param string|null $value */
public function setValue($value) {
$this->value = $value;
}
}