mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
Moved yaml doctrine conf to annotation
This commit is contained in:
@@ -48,15 +48,39 @@ class ORMServiceProvider implements ServiceProviderInterface
|
||||
$config->setSQLLogger($app['EM.sql-logger']);
|
||||
}
|
||||
|
||||
\Doctrine\Common\Annotations\AnnotationRegistry::registerFile(
|
||||
$app['root.path'] .'/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
|
||||
);
|
||||
|
||||
$opCodeCacheType = $app['phraseanet.configuration']['main']['opcodecache']['type'];
|
||||
$opCodeCacheOptions = $app['phraseanet.configuration']['main']['opcodecache']['options'];
|
||||
|
||||
$cacheType = $app['phraseanet.configuration']['main']['cache']['type'];
|
||||
$cacheOptions = $app['phraseanet.configuration']['main']['cache']['options'];
|
||||
|
||||
$annotationReader = new \Doctrine\Common\Annotations\AnnotationReader;
|
||||
$cachedAnnotationReader = new \Doctrine\Common\Annotations\CachedReader(
|
||||
$annotationReader,
|
||||
new \Doctrine\Common\Cache\ArrayCache
|
||||
);
|
||||
|
||||
$driverChain = new \Doctrine\ORM\Mapping\Driver\DriverChain();
|
||||
\Gedmo\DoctrineExtensions::registerAbstractMappingIntoDriverChainORM(
|
||||
$driverChain,
|
||||
$cachedAnnotationReader
|
||||
);
|
||||
|
||||
$annotationDriver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver(
|
||||
$annotationReader,
|
||||
array($app['root.path'].'/lib/Doctrine/Entities')
|
||||
);
|
||||
|
||||
$driverChain->addDriver($annotationDriver, 'Entities');
|
||||
|
||||
$config->setMetadataCacheImpl($app['phraseanet.cache-service']->factory(
|
||||
'ORMmetadata', $opCodeCacheType, $opCodeCacheOptions
|
||||
));
|
||||
|
||||
$config->setQueryCacheImpl($app['phraseanet.cache-service']->factory(
|
||||
'ORMquery', $opCodeCacheType, $opCodeCacheOptions
|
||||
));
|
||||
@@ -64,14 +88,12 @@ class ORMServiceProvider implements ServiceProviderInterface
|
||||
'ORMresult', $cacheType, $cacheOptions
|
||||
));
|
||||
|
||||
//define autoregeneration of proxies base on debug mode
|
||||
$config->setAutoGenerateProxyClasses($app['debug']);
|
||||
|
||||
$chainDriverImpl = new DriverChain();
|
||||
$driverYaml = new YamlDriver(array($app['root.path'] . '/lib/conf.d/Doctrine'));
|
||||
$chainDriverImpl->addDriver($driverYaml, 'Entities');
|
||||
$chainDriverImpl->addDriver($driverYaml, 'Gedmo\Timestampable');
|
||||
$config->setMetadataDriverImpl($chainDriverImpl);
|
||||
// $driverYaml = new YamlDriver(array($app['root.path'] . '/lib/conf.d/Doctrine'));
|
||||
// $chainDriverImpl->addDriver($driverYaml, 'Entities');
|
||||
|
||||
$config->setMetadataDriverImpl($driverChain);
|
||||
|
||||
$config->setProxyDir($app['root.path'] . '/lib/Doctrine/Proxies');
|
||||
$config->setProxyNamespace('Proxies');
|
||||
|
@@ -12,34 +12,39 @@
|
||||
namespace Entities;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* AuthFailure
|
||||
* @ORM\Table(name="AuthFailures")
|
||||
* @ORM\Entity(repositoryClass="Repositories\AuthFailureRepository")
|
||||
*/
|
||||
class AuthFailure
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128)
|
||||
*/
|
||||
private $username;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128, nullable=true)
|
||||
*/
|
||||
private $ip;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $locked;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
@@ -12,9 +12,12 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* Basket
|
||||
* @ORM\Table(name="Baskets")
|
||||
* @ORM\Entity(repositoryClass="Repositories\BasketRepository")
|
||||
*/
|
||||
class Basket
|
||||
{
|
||||
@@ -23,57 +26,62 @@ class Basket
|
||||
const ELEMENTSORDER_ASC = 'asc';
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128)
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $is_read = false;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $pusher_id;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $archived = false;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="update")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\ValidationSession
|
||||
* @ORM\OneToOne(targetEntity="ValidationSession", mappedBy="basket", cascade={"ALL"})
|
||||
*/
|
||||
private $validation;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="BasketElement", mappedBy="basket", cascade={"ALL"})
|
||||
* @ORM\OrderBy({"ord" = "ASC"})
|
||||
*/
|
||||
private $elements;
|
||||
|
||||
|
@@ -13,49 +13,57 @@ namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* BasketElement
|
||||
* @ORM\Table(name="BasketElements", uniqueConstraints={@ORM\UniqueConstraint(name="unique_recordcle", columns={"basket_id","sbas_id","record_id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\BasketElementRepository")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class BasketElement
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $record_id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $sbas_id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $ord;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="ValidationData", mappedBy="basket_element", cascade={"all"})
|
||||
*/
|
||||
private $validation_datas;
|
||||
|
||||
/**
|
||||
* @var \Entities\Basket
|
||||
* @ORM\ManyToOne(targetEntity="Basket", inversedBy="elements", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="basket_id", referencedColumnName="id")
|
||||
*/
|
||||
private $basket;
|
||||
|
||||
|
@@ -12,39 +12,47 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* LazaretAttribute
|
||||
* @ORM\Table(name="LazaretAttributes")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class LazaretAttribute
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=64)
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=2048)
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\LazaretFile
|
||||
* @ORM\ManyToOne(targetEntity="LazaretFile", inversedBy="attributes", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="lazaret_file_id", referencedColumnName="id")
|
||||
*/
|
||||
private $lazaretFile;
|
||||
|
||||
|
@@ -12,24 +12,30 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* LazaretCheck
|
||||
* @ORM\Table(name="LazaretChecks")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class LazaretCheck
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=512)
|
||||
*/
|
||||
private $checkClassname;
|
||||
|
||||
/**
|
||||
* @var \Entities\LazaretFile
|
||||
* @ORM\ManyToOne(targetEntity="LazaretFile", inversedBy="checks", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="lazaret_file_id", referencedColumnName="id")
|
||||
*/
|
||||
private $lazaretFile;
|
||||
|
||||
|
@@ -12,74 +12,84 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* LazaretFile
|
||||
* @ORM\Table(name="LazaretFiles")
|
||||
* @ORM\Entity(repositoryClass="Repositories\LazaretFileRepository")
|
||||
*/
|
||||
class LazaretFile
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=512)
|
||||
*/
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=512)
|
||||
*/
|
||||
private $thumbFilename;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=256)
|
||||
*/
|
||||
private $originalName;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $base_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=36)
|
||||
*/
|
||||
private $uuid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=64)
|
||||
*/
|
||||
private $sha256;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $forced = false;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="LazaretAttribute", mappedBy="lazaretFile", cascade={"all"})
|
||||
* @ORM\OrderBy({"id" = "ASC"})
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="LazaretCheck", mappedBy="lazaretFile", cascade={"all"})
|
||||
* @ORM\OrderBy({"id" = "ASC"})
|
||||
*/
|
||||
private $checks;
|
||||
|
||||
/**
|
||||
* @var \Entities\LazaretSession
|
||||
* @ORM\ManyToOne(targetEntity="LazaretSession", inversedBy="files", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="lazaret_session_id", referencedColumnName="id")
|
||||
*/
|
||||
private $session;
|
||||
|
||||
|
@@ -12,34 +12,42 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* LazaretSession
|
||||
* @ORM\Table(name="LazaretSessions")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class LazaretSession
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="LazaretFile", mappedBy="session", cascade={"all"})
|
||||
* @ORM\OrderBy({"id" = "ASC"})
|
||||
*/
|
||||
private $files;
|
||||
|
||||
|
@@ -12,79 +12,87 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* Session
|
||||
* @ORM\Table(name="Sessions", indexes={@ORM\index(name="usr_id", columns={"usr_id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\SessionRepository")
|
||||
*/
|
||||
class Session
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=512)
|
||||
*/
|
||||
private $user_agent;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=40, nullable=true)
|
||||
*/
|
||||
private $ip_address;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128, nullable=true)
|
||||
*/
|
||||
private $platform;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128, nullable=true)
|
||||
*/
|
||||
private $browser_name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=32, nullable=true)
|
||||
*/
|
||||
private $browser_version;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $screen_width;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
private $screen_height;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=128, nullable=true, unique=true)
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=16, nullable=true)
|
||||
*/
|
||||
private $nonce;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="SessionModule", mappedBy="session", cascade={"all"})
|
||||
* @ORM\OrderBy({"module_id" = "ASC"})
|
||||
*/
|
||||
private $modules;
|
||||
|
||||
|
@@ -12,34 +12,42 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* SessionModule
|
||||
* @ORM\Table(name="SessionModules", uniqueConstraints={@ORM\UniqueConstraint(name="unique_module", columns={"session_id", "module_id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\SessionModuleRepository")
|
||||
*/
|
||||
class SessionModule
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $module_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\Session
|
||||
* @ORM\ManyToOne(targetEntity="Session", inversedBy="modules", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
|
||||
*/
|
||||
private $session;
|
||||
|
||||
|
@@ -13,33 +13,40 @@ namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* StoryWZ
|
||||
* @ORM\Table(name="StoryWZ", uniqueConstraints={@ORM\UniqueConstraint(name="user_story", columns={"usr_id", "sbas_id", "record_id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\StoryWZRepository")
|
||||
*/
|
||||
class StoryWZ
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $sbas_id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $record_id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
@@ -3,42 +3,52 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* UsrAuthProvider
|
||||
* @ORM\Table(name="UsrAuthProviders", uniqueConstraints={
|
||||
* @ORM\UniqueConstraint(name="unique_provider_per_user", columns={"usr_id", "provider"}),
|
||||
* @ORM\UniqueConstraint(name="provider_ids", columns={"provider", "distant_id"})
|
||||
* })
|
||||
* @ORM\Entity(repositoryClass="Repositories\UsrAuthProviderRepository")
|
||||
*/
|
||||
class UsrAuthProvider
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=32)
|
||||
*/
|
||||
private $provider;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string", length=192)
|
||||
*/
|
||||
private $distant_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @Gedmo\Timestampable(on="update")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
|
@@ -12,39 +12,46 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* UsrList
|
||||
* @ORM\Table(name="UsrLists")
|
||||
* @ORM\Entity(repositoryClass="Repositories\UsrListRepository")
|
||||
*/
|
||||
class UsrList
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="UsrListOwner", mappedBy="list", cascade={"all"})
|
||||
*/
|
||||
private $owners;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="UsrListEntry", mappedBy="list", cascade={"all"})
|
||||
*/
|
||||
private $entries;
|
||||
|
||||
|
@@ -12,34 +12,42 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* UsrListEntry
|
||||
* @ORM\Table(name="UsrListsContent", uniqueConstraints={@ORM\UniqueConstraint(name="unique_usr_per_list", columns={"usr_id", "list_id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\UsrListEntryRepository")
|
||||
*/
|
||||
class UsrListEntry
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\UsrList
|
||||
* @ORM\ManyToOne(targetEntity="UsrList", inversedBy="entries", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="list_id", referencedColumnName="id")
|
||||
*/
|
||||
private $list;
|
||||
|
||||
|
@@ -12,9 +12,12 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* UsrListOwner
|
||||
* @ORM\Table(name="UsrListOwners", uniqueConstraints={@ORM\UniqueConstraint(name="unique_owner", columns={"usr_id", "id"})})
|
||||
* @ORM\Entity(repositoryClass="Repositories\UsrListOwnerRepository")
|
||||
*/
|
||||
class UsrListOwner
|
||||
{
|
||||
@@ -23,32 +26,37 @@ class UsrListOwner
|
||||
const ROLE_ADMIN = 3;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
private $role;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\UsrList
|
||||
* @ORM\ManyToOne(targetEntity="UsrList", inversedBy="owners", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="list_id", referencedColumnName="id")
|
||||
*/
|
||||
private $list;
|
||||
|
||||
|
@@ -12,39 +12,47 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* ValidationData
|
||||
* @ORM\Table(name="ValidationDatas")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class ValidationData
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean", nullable=true)
|
||||
*/
|
||||
private $agreement;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private $note;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \Entities\ValidationParticipant
|
||||
* @ORM\ManyToOne(targetEntity="ValidationParticipant", inversedBy="datas", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="participant_id", referencedColumnName="id")
|
||||
*/
|
||||
private $participant;
|
||||
|
||||
/**
|
||||
* @var \Entities\BasketElement
|
||||
* @ORM\ManyToOne(targetEntity="BasketElement", inversedBy="validation_datas", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="basket_element_id", referencedColumnName="id")
|
||||
*/
|
||||
private $basket_element;
|
||||
|
||||
|
@@ -12,54 +12,60 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
|
||||
/**
|
||||
* ValidationParticipant
|
||||
* @ORM\Table(name="ValidationParticipants")
|
||||
* @ORM\Entity(repositoryClass="Repositories\ValidationParticipantRepository")
|
||||
*/
|
||||
class ValidationParticipant
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $usr_id;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $is_aware = false;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $is_confirmed = false;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $can_agree = false;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $can_see_others = false;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private $reminded;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="ValidationData", mappedBy="participant", cascade={"all"})
|
||||
*/
|
||||
private $datas;
|
||||
|
||||
/**
|
||||
* @var \Entities\ValidationSession
|
||||
* @ORM\ManyToOne(targetEntity="ValidationSession", inversedBy="participants", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="ValidationSession_id", referencedColumnName="id")
|
||||
*/
|
||||
private $session;
|
||||
|
||||
|
@@ -12,45 +12,53 @@
|
||||
namespace Entities;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* ValidationSession
|
||||
* @ORM\Table(name="ValidationSessions")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class ValidationSession
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $initiator_id;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @Gedmo\Timestampable(on="create")
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private $expires;
|
||||
|
||||
/**
|
||||
* @var \Entities\Basket
|
||||
* @ORM\OneToOne(targetEntity="Basket", mappedBy="validation", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="basket_id", referencedColumnName="id")
|
||||
*/
|
||||
private $basket;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
* @ORM\OneToMany(targetEntity="ValidationParticipant", mappedBy="session", cascade={"all"})
|
||||
*/
|
||||
private $participants;
|
||||
|
||||
|
Reference in New Issue
Block a user