Diferencia entre revisiones de «Agregar SoftDeleteable en un Entity en Smyfony»
Ir a la navegación
Ir a la búsqueda
(feat: add Agregar SoftDeleteable en un Entity en Smyfony) |
(feat: add Agregar SoftDeleteable en un Entity en Smyfony) |
||
Línea 3: | Línea 3: | ||
namespace App\Entity; | namespace App\Entity; | ||
use App\Repository\UserRepository; | use App\Repository\UserRepository; | ||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||
use Gedmo\Mapping\Annotation as Gedmo; | use Gedmo\Mapping\Annotation as Gedmo; | ||
use Gedmo\SoftDeleteable\Traits\SoftDeleteable; | use Gedmo\SoftDeleteable\Traits\SoftDeleteable; | ||
#[ORM\Entity(repositoryClass: UserRepository::class)] | #[ORM\Entity(repositoryClass: UserRepository::class)] | ||
#[ORM\Table(name: '`user`')] | #[ORM\Table(name: '`user`')] | ||
Línea 20: | Línea 20: | ||
#[ORM\Column] | #[ORM\Column] | ||
private ?int $id = null; | private ?int $id = null; | ||
... | ... |
Revisión del 07:40 1 sep 2024
<?php namespace App\Entity; use App\Repository\UserRepository; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\SoftDeleteable\Traits\SoftDeleteable; #[ORM\Entity(repositoryClass: UserRepository::class)] #[ORM\Table(name: '`user`')] #[Gedmo\SoftDeleteable] class User { use SoftDeleteable; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; ...