mappings: | mappings: | ||||
App: | App: | ||||
is_bundle: false | is_bundle: false | ||||
type: annotation | |||||
type: attribute | |||||
dir: '%kernel.project_dir%/src/Entity' | dir: '%kernel.project_dir%/src/Entity' | ||||
prefix: 'App\Entity' | prefix: 'App\Entity' | ||||
alias: App | alias: App |
use Lc\SovBundle\Model\File\FileModel; | use Lc\SovBundle\Model\File\FileModel; | ||||
use Lc\SovBundle\Repository\File\FileRepository; | use Lc\SovBundle\Repository\File\FileRepository; | ||||
/** | |||||
* @ORM\Entity(repositoryClass=FileRepository::class) | |||||
*/ | |||||
#[ORM\Entity(repositoryClass: FileRepository::class)] | |||||
class File extends FileModel implements FileInterface | 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 | public function getId(): ?int | ||||
{ | { |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\Reminder\ReminderModel; | 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 | 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 | public function getId(): ?int | ||||
{ | { |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\Setting\SiteSettingModel; | use Lc\SovBundle\Model\Setting\SiteSettingModel; | ||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteSettingRepository::class) | |||||
*/ | |||||
#[ORM\Entity(repositoryClass: SiteSettingRepository::class)] | |||||
class SiteSetting extends SiteSettingModel | 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 | public function getId(): ?int | ||||
{ | { |
use App\Entity\File\File; | use App\Entity\File\File; | ||||
use Lc\SovBundle\Repository\Site\PageRepository; | use Lc\SovBundle\Repository\Site\PageRepository; | ||||
/** | |||||
* @ORM\Entity(repositoryClass=PageRepository::class) | |||||
*/ | |||||
#[ORM\Entity(repositoryClass: PageRepository::class)] | |||||
class Page extends AbstractFullEntity | 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; | 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; | private $gallery; | ||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||||
*/ | |||||
#[ORM\ManyToOne(targetEntity: File::class, cascade: ['persist'])] | |||||
private $file; | private $file; | ||||
public function __construct() | public function __construct() |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\Site\SiteModel; | use Lc\SovBundle\Model\Site\SiteModel; | ||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteRepository::class) | |||||
*/ | |||||
#[ORM\Entity(repositoryClass: SiteRepository::class)] | |||||
class Site extends SiteModel | 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; | |||||
} | |||||
} | } |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\Ticket\TicketModel; | 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 | 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 | public function getId(): ?int | ||||
{ | { |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\Ticket\TicketMessageModel; | 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 | 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 | public function getId(): ?int | ||||
{ | { |
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\User\GroupUserModel; | 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 | 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 | public function getId(): ?int | ||||
{ | { |
use Lc\SovBundle\Model\User\UserInterface; | use Lc\SovBundle\Model\User\UserInterface; | ||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | 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 | 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 | public function getId(): ?int |