infinito/application/src/Entity/User.php

51 lines
976 B
PHP
Raw Normal View History

2018-09-05 15:46:14 +02:00
<?php
2018-09-12 22:25:22 +02:00
2018-09-05 15:46:14 +02:00
namespace App\Entity;
2018-09-06 14:03:08 +02:00
use Doctrine\ORM\Mapping as ORM;
2018-09-13 02:24:25 +02:00
use FOS\UserBundle\Model\User as BaseUser;
use App\Entity\Attribut\NodeAttribut;
2018-09-06 15:14:33 +02:00
2018-09-05 15:46:14 +02:00
/**
* @author kevinfrantz
2018-09-06 11:57:32 +02:00
* @ORM\Table(name="source_user")
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
2018-09-05 15:46:14 +02:00
*/
2018-09-13 02:24:25 +02:00
class User extends BaseUser implements SourceInterface
2018-09-05 15:46:14 +02:00
{
2018-09-13 02:24:25 +02:00
use NodeAttribut;
2018-09-12 22:25:22 +02:00
2018-09-06 11:57:32 +02:00
/**
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive;
2018-09-13 02:24:25 +02:00
/**
* @ORM\Id()
* @ORM\GeneratedValue
* @ORM\Column(type="integer")(strategy="AUTO")
*/
protected $id;
2018-09-06 11:57:32 +02:00
2018-09-13 02:24:25 +02:00
public function setId(int $id): void
2018-09-06 11:57:32 +02:00
{
2018-09-13 02:24:25 +02:00
$this->id = $id;
2018-09-06 11:57:32 +02:00
}
2018-09-13 02:24:25 +02:00
public function getId(): int
2018-09-06 11:57:32 +02:00
{
2018-09-13 02:24:25 +02:00
return $this->id;
2018-09-06 11:57:32 +02:00
}
2018-09-13 02:24:25 +02:00
public function __construct()
2018-09-06 11:57:32 +02:00
{
parent::__construct();
/*
2018-09-13 02:24:25 +02:00
* @todo Remove this later
* @var \App\Entity\User $isActive
*/
$this->isActive = true;
2018-09-13 12:29:07 +02:00
$this->node = new Node();
2018-09-06 11:57:32 +02:00
}
}