update murph
This commit is contained in:
parent
41cf9590c6
commit
58956f2a83
|
@ -16,13 +16,13 @@ doctrine:
|
|||
mappings:
|
||||
App\Core\Entity:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
type: attribute
|
||||
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
|
||||
prefix: 'App\Core\Entity'
|
||||
alias: App\Core\Entity
|
||||
App\Entity:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
type: attribute
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App\Entity
|
||||
|
|
|
@ -10,9 +10,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
|
||||
class CommentController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route("/api/blog/comment/preview", name="api_blog_comment_preview", options={"expose"=true})
|
||||
*/
|
||||
#[Route(path: '/api/blog/comment/preview', name: 'api_blog_comment_preview', options: ['expose' => true])]
|
||||
public function preview(Request $request, CommentParser $parser): JsonResponse
|
||||
{
|
||||
return $this->json([
|
||||
|
|
|
@ -18,9 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog/category")
|
||||
*/
|
||||
#[Route(path: '/admin/blog/category')]
|
||||
class CategoryAdminController extends CrudController
|
||||
{
|
||||
public function getConfiguration(): CrudConfiguration
|
||||
|
@ -81,33 +79,25 @@ class CategoryAdminController extends CrudController
|
|||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{page}", name="admin_blog_category_index", requirements={"page": "\d+"})
|
||||
*/
|
||||
#[Route(path: '/{page}', name: 'admin_blog_category_index', requirements: ['page' => '\d+'])]
|
||||
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doIndex($page, $query, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/new", name="admin_blog_category_new")
|
||||
*/
|
||||
#[Route(path: '/new', name: 'admin_blog_category_new')]
|
||||
public function new(EntityFactory $factory, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doNew($factory->create(), $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/edit/{entity}", name="admin_blog_category_edit")
|
||||
*/
|
||||
#[Route(path: '/edit/{entity}', name: 'admin_blog_category_edit')]
|
||||
public function edit(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doEdit($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/show/{entity}", name="admin_blog_category_show")
|
||||
*/
|
||||
#[Route(path: '/show/{entity}', name: 'admin_blog_category_show')]
|
||||
public function show(Entity $entity, PostRepositoryQuery $postQuery): Response
|
||||
{
|
||||
$posts = $postQuery->create()
|
||||
|
@ -123,25 +113,19 @@ class CategoryAdminController extends CrudController
|
|||
return $this->doShow($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/filter", name="admin_blog_category_filter", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/filter', name: 'admin_blog_category_filter', methods: ['GET'])]
|
||||
public function filter(Session $session): Response
|
||||
{
|
||||
return $this->doFilter($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/delete/{entity}", name="admin_blog_category_delete", methods={"DELETE"})
|
||||
*/
|
||||
#[Route(path: '/delete/{entity}', name: 'admin_blog_category_delete', methods: ['DELETE'])]
|
||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doDelete($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog_category/batch/{page}", name="admin_blog_category_batch", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/blog_category/batch/{page}', name: 'admin_blog_category_batch', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function batch(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doBatch($page, $query, $entityManager, $request, $session);
|
||||
|
|
|
@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog/comment")
|
||||
*/
|
||||
#[Route(path: '/admin/blog/comment')]
|
||||
class CommentAdminController extends CrudController
|
||||
{
|
||||
public function getConfiguration(): CrudConfiguration
|
||||
|
@ -67,49 +65,37 @@ class CommentAdminController extends CrudController
|
|||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{page}", name="admin_blog_comment_index", requirements={"page": "\d+"})
|
||||
*/
|
||||
#[Route(path: '/{page}', name: 'admin_blog_comment_index', requirements: ['page' => '\d+'])]
|
||||
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doIndex($page, $query, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/edit/{entity}", name="admin_blog_comment_edit")
|
||||
*/
|
||||
#[Route(path: '/edit/{entity}', name: 'admin_blog_comment_edit')]
|
||||
public function edit(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doEdit($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/show/{entity}", name="admin_blog_comment_show")
|
||||
*/
|
||||
#[Route(path: '/show/{entity}', name: 'admin_blog_comment_show')]
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->doShow($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/filters", name="admin_blog_comment_filter")
|
||||
*/
|
||||
#[Route(path: '/filters', name: 'admin_blog_comment_filter')]
|
||||
public function filter(Session $session): Response
|
||||
{
|
||||
return $this->doFilter($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/delete/{entity}", name="admin_blog_comment_delete", methods={"DELETE"})
|
||||
*/
|
||||
#[Route(path: '/delete/{entity}', name: 'admin_blog_comment_delete', methods: ['DELETE'])]
|
||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doDelete($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog_comment/batch/{page}", name="admin_blog_comment_batch", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/blog_comment/batch/{page}', name: 'admin_blog_comment_batch', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function batch(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doBatch($page, $query, $entityManager, $request, $session);
|
||||
|
|
|
@ -24,9 +24,7 @@ use App\Entity\Blog\Post;
|
|||
use App\Analytic\DateRangeAnalytic;
|
||||
use App\Core\Repository\Site\NodeRepository;
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog/post")
|
||||
*/
|
||||
#[Route(path: '/admin/blog/post')]
|
||||
class PostAdminController extends CrudController
|
||||
{
|
||||
public function getConfiguration(): CrudConfiguration
|
||||
|
@ -99,17 +97,13 @@ class PostAdminController extends CrudController
|
|||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{page}", name="admin_blog_post_index", requirements={"page": "\d+"})
|
||||
*/
|
||||
#[Route(path: '/{page}', name: 'admin_blog_post_index', requirements: ['page' => '\d+'])]
|
||||
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doIndex($page, $query, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/new", name="admin_blog_post_new")
|
||||
*/
|
||||
#[Route(path: '/new', name: 'admin_blog_post_new')]
|
||||
public function new(EntityFactory $factory, EntityManager $entityManager, FileUploadHandler $fileUpload, Request $request): Response
|
||||
{
|
||||
return $this->doNew(
|
||||
|
@ -130,9 +124,7 @@ class PostAdminController extends CrudController
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/edit/{entity}", name="admin_blog_post_edit")
|
||||
*/
|
||||
#[Route(path: '/edit/{entity}', name: 'admin_blog_post_edit')]
|
||||
public function edit(Entity $entity, EntityManager $entityManager, FileUploadHandler $fileUpload, Request $request): Response
|
||||
{
|
||||
return $this->doEdit(
|
||||
|
@ -153,25 +145,19 @@ class PostAdminController extends CrudController
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/show/{entity}", name="admin_blog_post_show")
|
||||
*/
|
||||
#[Route(path: '/show/{entity}', name: 'admin_blog_post_show')]
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->doShow($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/blog_post/batch/{page}", name="admin_blog_post_batch", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/blog_post/batch/{page}', name: 'admin_blog_post_batch', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function batch(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doBatch($page, $query, $entityManager, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/fetch_quick_data/{entity}", name="admin_blog_post_fetch_quick_data")
|
||||
*/
|
||||
#[Route(path: '/fetch_quick_data/{entity}', name: 'admin_blog_post_fetch_quick_data')]
|
||||
public function fetchQuickData(Entity $entity, EntityManager $entityManager): Response
|
||||
{
|
||||
$configuration = $this->getConfiguration();
|
||||
|
@ -216,25 +202,19 @@ class PostAdminController extends CrudController
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/filters", name="admin_blog_post_filter")
|
||||
*/
|
||||
#[Route(path: '/filters', name: 'admin_blog_post_filter')]
|
||||
public function filter(Session $session): Response
|
||||
{
|
||||
return $this->doFilter($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/delete/{entity}", name="admin_blog_post_delete", methods={"DELETE"})
|
||||
*/
|
||||
#[Route(path: '/delete/{entity}', name: 'admin_blog_post_delete', methods: ['DELETE'])]
|
||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doDelete($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/analytic_stats/{entity}/{range}", name="admin_blog_post_analytic_stats")
|
||||
*/
|
||||
#[Route(path: '/analytic_stats/{entity}/{range}', name: 'admin_blog_post_analytic_stats')]
|
||||
public function stats(
|
||||
Entity $entity,
|
||||
DateRangeAnalytic $analytic,
|
||||
|
|
|
@ -32,9 +32,7 @@ class PostController extends PageController
|
|||
$this->postQuery = $postQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* @UrlGenerator(service=PostGenerator::class, method="post")
|
||||
*/
|
||||
#[UrlGenerator(service: PostGenerator::class, method: 'post')]
|
||||
public function post(
|
||||
Post $post,
|
||||
string $slug,
|
||||
|
@ -123,9 +121,7 @@ class PostController extends PageController
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @UrlGenerator(service=PostGenerator::class, method="category")
|
||||
*/
|
||||
#[UrlGenerator(service: PostGenerator::class, method: 'category')]
|
||||
public function category(Category $category, string $slug, int $page = 1): Response
|
||||
{
|
||||
$entities = $this->createQuery()
|
||||
|
|
|
@ -6,14 +6,10 @@ use App\Core\Controller\Dashboard\DashboardAdminController as Controller;
|
|||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* @Route("/admin")
|
||||
*/
|
||||
#[Route(path: '/admin')]
|
||||
class DashboardAdminController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/", name="admin_dashboard_index")
|
||||
*/
|
||||
#[Route(path: '/', name: 'admin_dashboard_index')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('admin/dashboard.html.twig');
|
||||
|
|
|
@ -19,65 +19,49 @@ use App\Entity\Project;
|
|||
|
||||
class ProjectAdminController extends CrudController
|
||||
{
|
||||
/**
|
||||
* @Route("/admin/project/{page}", name="admin_project_index", methods={"GET"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/{page}', name: 'admin_project_index', methods: ['GET'], requirements: ['page' => '\d+'])]
|
||||
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doIndex($page, $query, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/new", name="admin_project_new", methods={"GET", "POST"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/new', name: 'admin_project_new', methods: ['GET', 'POST'])]
|
||||
public function new(Factory $factory, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doNew($factory->create(), $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/show/{entity}", name="admin_project_show", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/show/{entity}', name: 'admin_project_show', methods: ['GET'])]
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->doShow($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/filter", name="admin_project_filter", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/filter', name: 'admin_project_filter', methods: ['GET'])]
|
||||
public function filter(Session $session): Response
|
||||
{
|
||||
return $this->doFilter($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/edit/{entity}", name="admin_project_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/edit/{entity}', name: 'admin_project_edit', methods: ['GET', 'POST'])]
|
||||
public function edit(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doEdit($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/sort/{page}", name="admin_project_sort", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/sort/{page}', name: 'admin_project_sort', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function sort(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doSort($page, $query, $entityManager, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/batch/{page}", name="admin_project_batch", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/batch/{page}', name: 'admin_project_batch', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function batch(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doBatch($page, $query, $entityManager, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/project/delete/{entity}", name="admin_project_delete", methods={"DELETE"})
|
||||
*/
|
||||
#[Route(path: '/admin/project/delete/{entity}', name: 'admin_project_delete', methods: ['DELETE'])]
|
||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doDelete($entity, $entityManager, $request);
|
||||
|
|
|
@ -18,65 +18,49 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
|
||||
class StlMeshAdminController extends CrudController
|
||||
{
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/{page}", name="admin_stl_mesh_index", methods={"GET"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/{page}', name: 'admin_stl_mesh_index', methods: ['GET'], requirements: ['page' => '\d+'])]
|
||||
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doIndex($page, $query, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/new", name="admin_stl_mesh_new", methods={"GET", "POST"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/new', name: 'admin_stl_mesh_new', methods: ['GET', 'POST'])]
|
||||
public function new(Factory $factory, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doNew($factory->create(), $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/show/{entity}", name="admin_stl_mesh_show", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/show/{entity}', name: 'admin_stl_mesh_show', methods: ['GET'])]
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->doShow($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/filter", name="admin_stl_mesh_filter", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/filter', name: 'admin_stl_mesh_filter', methods: ['GET'])]
|
||||
public function filter(Session $session): Response
|
||||
{
|
||||
return $this->doFilter($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/edit/{entity}", name="admin_stl_mesh_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/edit/{entity}', name: 'admin_stl_mesh_edit', methods: ['GET', 'POST'])]
|
||||
public function edit(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doEdit($entity, $entityManager, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/sort/{page}", name="admin_stl_mesh_sort", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/sort/{page}', name: 'admin_stl_mesh_sort', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function sort(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doSort($page, $query, $entityManager, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/batch/{page}", name="admin_stl_mesh_batch", methods={"POST"}, requirements={"page":"\d+"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/batch/{page}', name: 'admin_stl_mesh_batch', methods: ['POST'], requirements: ['page' => '\d+'])]
|
||||
public function batch(RepositoryQuery $query, EntityManager $entityManager, Request $request, Session $session, int $page = 1): Response
|
||||
{
|
||||
return $this->doBatch($page, $query, $entityManager, $request, $session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/stl_mesh/delete/{entity}", name="admin_stl_mesh_delete", methods={"DELETE"})
|
||||
*/
|
||||
#[Route(path: '/admin/stl_mesh/delete/{entity}', name: 'admin_stl_mesh_delete', methods: ['DELETE'])]
|
||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||
{
|
||||
return $this->doDelete($entity, $entityManager, $request);
|
||||
|
|
|
@ -25,9 +25,7 @@ class StlMeshController extends PageController
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/mesh/download/{stlMesh}/{key}", name="mesh_download")
|
||||
*/
|
||||
#[Route(path: '/mesh/download/{stlMesh}/{key}', name: 'mesh_download')]
|
||||
public function download(StlMesh $stlMesh, int $key): Response
|
||||
{
|
||||
$file = $stlMesh->getFiles()[--$key] ?? null;
|
||||
|
@ -45,9 +43,7 @@ class StlMeshController extends PageController
|
|||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/mesh/viewer/{stlMesh}/{key}", name="mesh_viewer")
|
||||
*/
|
||||
#[Route(path: '/mesh/viewer/{stlMesh}/{key}', name: 'mesh_viewer')]
|
||||
public function viewer(StlMesh $stlMesh, int $key): Response
|
||||
{
|
||||
$file = $stlMesh->getFiles()[--$key] ?? null;
|
||||
|
|
|
@ -9,59 +9,39 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=CategoryRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: CategoryRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class Category implements EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $subTitle;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $slug;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=Post::class, mappedBy="categories")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: Post::class, mappedBy: 'categories')]
|
||||
private $posts;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=1})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 1])]
|
||||
private $isActive;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Category::class, inversedBy="categories")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Category::class, inversedBy: 'categories')]
|
||||
private $parentCategory;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Category::class, mappedBy="parentCategory")
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Category::class, mappedBy: 'parentCategory')]
|
||||
private $categories;
|
||||
|
||||
public function __construct()
|
||||
|
|
|
@ -9,66 +9,44 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=CommentRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: CommentRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class Comment implements EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $author;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $website;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean')]
|
||||
private $isActive;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Post::class, inversedBy="comments")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Post::class, inversedBy: 'comments')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private $post;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Comment::class, inversedBy="comments")
|
||||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Comment::class, inversedBy: 'comments')]
|
||||
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
|
||||
private $parentComment;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Comment::class, mappedBy="parentComment")
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'parentComment')]
|
||||
private $comments;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=PostFollow::class, mappedBy="comment", orphanRemoval=true)
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: PostFollow::class, mappedBy: 'comment', orphanRemoval: true)]
|
||||
private $postFollows;
|
||||
|
||||
public function __construct()
|
||||
|
|
|
@ -10,14 +10,11 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=PostRepository::class)
|
||||
* @ORM\Table(indexes={
|
||||
* @ORM\Index(name="post_title", columns={"title"}, flags={"fulltext"}),
|
||||
* @ORM\Index(name="post_content", columns={"content"}, flags={"fulltext"})
|
||||
* })
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Table]
|
||||
#[ORM\Index(name: 'post_title', columns: ['title'], flags: ['fulltext'])]
|
||||
#[ORM\Index(name: 'post_content', columns: ['content'], flags: ['fulltext'])]
|
||||
#[ORM\Entity(repositoryClass: PostRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class Post implements EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
|
@ -25,106 +22,66 @@ class Post implements EntityInterface
|
|||
const DRAFT = 0;
|
||||
const PUBLISHED = 1;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $slug;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||
private $publishedAt;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $image;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=Category::class, inversedBy="posts")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: Category::class, inversedBy: 'posts')]
|
||||
private $categories;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=20)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 20)]
|
||||
private $contentFormat;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="array", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'array', nullable: true)]
|
||||
private $tags = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $isQuick = false;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $quickUrl;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $quickImage;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $quickVideo;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private $quickVideoWidth;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private $quickVideoHeight;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $quickShowVideo = false;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Comment::class, mappedBy="post", orphanRemoval=true)
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'post', orphanRemoval: true)]
|
||||
private $comments;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $notebook;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=PostFollow::class, mappedBy="post", orphanRemoval=true)
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: PostFollow::class, mappedBy: 'post', orphanRemoval: true)]
|
||||
private $postFollows;
|
||||
|
||||
public function __construct()
|
||||
|
|
|
@ -7,41 +7,29 @@ use App\Core\Entity\EntityInterface;
|
|||
use App\Repository\Blog\PostFollowRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=PostFollowRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: PostFollowRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class PostFollow implements EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $hash;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean')]
|
||||
private $isEnabled;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Post::class, inversedBy="postFollows")
|
||||
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Post::class, inversedBy: 'postFollows')]
|
||||
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
|
||||
private $post;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Comment::class, inversedBy="postFollows")
|
||||
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Comment::class, inversedBy: 'postFollows')]
|
||||
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
|
||||
private $comment;
|
||||
|
||||
public function getId(): ?int
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class CategoriesPage extends TitledPage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class CategoryPage extends TitledPage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class ContactPage extends SimplePage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class LinksPage extends SimplePage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class MeshPage extends SimplePage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class PostPage extends TitledPage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class PostsPage extends TitledPage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,9 +8,7 @@ use App\Core\Form\Site\Page\TextBlockType;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class RssPage extends Page
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
|
|
@ -4,9 +4,7 @@ namespace App\Entity\Page;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class SearchPage extends TitledPage
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,9 +8,7 @@ use App\Form\Type\SimpleMdTextareaBlockType;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class SimplePage extends TitledPage
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
|
|
@ -9,9 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use App\Core\Entity\Site\Page\Page;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class TextPage extends Page
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
|
|
@ -8,9 +8,7 @@ use App\Core\Form\Site\Page\TextBlockType;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class TitledPage extends Page
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
|
|
@ -7,10 +7,8 @@ use App\Core\Entity\EntityInterface;
|
|||
use App\Repository\ProjectRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=ProjectRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: ProjectRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class Project implements EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
|
@ -18,41 +16,27 @@ class Project implements EntityInterface
|
|||
const DRAFT = 0;
|
||||
const PUBLISHED = 1;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'integer', options: ['default' => 0])]
|
||||
private $status = 0;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private $sortOrder;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="array")
|
||||
*/
|
||||
#[ORM\Column(type: 'array')]
|
||||
private $links = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $image;
|
||||
|
||||
public function getId(): ?int
|
||||
|
|
|
@ -6,41 +6,27 @@ use App\Repository\StlMeshRepository;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Core\Entity\EntityInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=StlMeshRepository::class)
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: StlMeshRepository::class)]
|
||||
class StlMesh implements EntityInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'integer', nullable: true)]
|
||||
private $sortOrder;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255)]
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="array", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'array', nullable: true)]
|
||||
private $files = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $preview;
|
||||
|
||||
public function getId(): ?int
|
||||
|
|
|
@ -10,64 +10,44 @@ use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
|
|||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=180, unique=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 180, unique: true)]
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[ORM\Column(type: 'json')]
|
||||
private $roles = [];
|
||||
|
||||
/**
|
||||
* @var string The hashed password
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
#[ORM\Column(type: 'string')]
|
||||
private $password;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $displayName;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $totpSecret;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||
private $passwordRequestedAt;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $confirmationToken;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $isAdmin;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $isWriter;
|
||||
|
||||
public function __construct()
|
||||
|
|
Loading…
Reference in New Issue