@@ -9,7 +9,7 @@ doctrine: | |||
mappings: | |||
App: | |||
is_bundle: false | |||
type: annotation | |||
type: attribute | |||
dir: '%kernel.project_dir%/src/Entity' | |||
prefix: 'App\Entity' | |||
alias: App |
@@ -7,17 +7,13 @@ use Lc\SovBundle\Model\File\FileInterface; | |||
use Lc\SovBundle\Model\File\FileModel; | |||
use Lc\SovBundle\Repository\File\FileRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=FileRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: FileRepository::class)] | |||
class File extends FileModel implements FileInterface | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -5,18 +5,15 @@ namespace App\Entity\Reminder; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\Reminder\ReminderModel; | |||
use Lc\SovBundle\Repository\Reminder\ReminderRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=ReminderRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: ReminderRepository::class)] | |||
class Reminder extends ReminderModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -6,17 +6,13 @@ use Lc\SovBundle\Repository\Setting\SiteSettingRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\Setting\SiteSettingModel; | |||
/** | |||
* @ORM\Entity(repositoryClass=SiteSettingRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: SiteSettingRepository::class)] | |||
class SiteSetting extends SiteSettingModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -9,32 +9,22 @@ use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | |||
use App\Entity\File\File; | |||
use Lc\SovBundle\Repository\Site\PageRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=PageRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: PageRepository::class)] | |||
class Page extends AbstractFullEntity | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
/** | |||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"}) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: File::class, cascade: ['persist', 'remove'])] | |||
private $image; | |||
/** | |||
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true) | |||
* @ORM\OrderBy({"position" = "ASC"}) | |||
*/ | |||
#[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist', 'remove'], orphanRemoval: true)] | |||
#[ORM\OrderBy(['position' => 'ASC'])] | |||
private $gallery; | |||
/** | |||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||
*/ | |||
#[ORM\ManyToOne(targetEntity: File::class, cascade: ['persist'])] | |||
private $file; | |||
public function __construct() |
@@ -6,20 +6,16 @@ use Lc\SovBundle\Repository\Site\SiteRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\Site\SiteModel; | |||
/** | |||
* @ORM\Entity(repositoryClass=SiteRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: SiteRepository::class)] | |||
class Site extends SiteModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ | |||
return $this->id; | |||
} | |||
public function getId(): ?int | |||
{ | |||
return $this->id; | |||
} | |||
} |
@@ -5,18 +5,15 @@ namespace App\Entity\Ticket; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\Ticket\TicketModel; | |||
use Lc\SovBundle\Repository\Ticket\TicketRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=TicketRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: TicketRepository::class)] | |||
class Ticket extends TicketModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -5,18 +5,15 @@ namespace App\Entity\Ticket; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\Ticket\TicketMessageModel; | |||
use Lc\SovBundle\Repository\Ticket\TicketMessageRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=TicketMessageRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: TicketMessageRepository::class)] | |||
class TicketMessage extends TicketMessageModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -5,18 +5,15 @@ namespace App\Entity\User; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\SovBundle\Model\User\GroupUserModel; | |||
use Lc\SovBundle\Repository\User\GroupUserRepository; | |||
/** | |||
* @ORM\Entity(repositoryClass=GroupUserRepository::class) | |||
*/ | |||
#[ORM\Entity(repositoryClass: GroupUserRepository::class)] | |||
class GroupUser extends GroupUserModel | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int | |||
{ |
@@ -7,18 +7,14 @@ use Lc\SovBundle\Model\User\UserModel as SovUserModel; | |||
use Lc\SovBundle\Model\User\UserInterface; | |||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | |||
/** | |||
* @ORM\Entity(repositoryClass="Lc\SovBundle\Repository\User\UserRepository") | |||
* @UniqueEntity(fields={"email"}, message="There is already an account with this email") | |||
*/ | |||
#[ORM\Entity(repositoryClass: 'Lc\SovBundle\Repository\User\UserRepository')] | |||
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')] | |||
class User extends SovUserModel implements UserInterface | |||
{ | |||
/** | |||
* @ORM\Id | |||
* @ORM\GeneratedValue | |||
* @ORM\Column(type="integer") | |||
*/ | |||
private $id; | |||
#[ORM\Id] | |||
#[ORM\GeneratedValue] | |||
#[ORM\Column(type: 'integer')] | |||
private ?int $id = null; | |||
public function getId(): ?int |