Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wishlist-application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZAHDI Mohcine
Wishlist-application
Commits
74f8c138
Commit
74f8c138
authored
2 months ago
by
Mounouar Othmane
Browse files
Options
Downloads
Patches
Plain Diff
creating wishlist
parent
54062ea9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Entity/Wishlist.php
+66
-0
66 additions, 0 deletions
src/Entity/Wishlist.php
src/Repository/WishlistRepository.php
+43
-0
43 additions, 0 deletions
src/Repository/WishlistRepository.php
with
109 additions
and
0 deletions
src/Entity/Wishlist.php
0 → 100644
+
66
−
0
View file @
74f8c138
<?php
namespace
App\Entity
;
use
App\Repository\WishlistRepository
;
use
Doctrine\DBAL\Types\Types
;
use
Doctrine\ORM\Mapping
as
ORM
;
#[ORM\Entity(repositoryClass: WishlistRepository::class)]
class
Wishlist
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private
?int
$id
=
null
;
#[ORM\Column(length: 255)]
private
?string
$name
=
null
;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private
?
\DateTimeInterface
$deadline
=
null
;
#[ORM\Column]
private
?bool
$isDisabled
=
null
;
public
function
getId
():
?int
{
return
$this
->
id
;
}
public
function
getName
():
?string
{
return
$this
->
name
;
}
public
function
setName
(
string
$name
):
static
{
$this
->
name
=
$name
;
return
$this
;
}
public
function
getDeadline
():
?
\DateTimeInterface
{
return
$this
->
deadline
;
}
public
function
setDeadline
(
\DateTimeInterface
$deadline
)
:
static
{
$this
->
deadline
=
$deadline
;
return
$this
;
}
public
function
isDisabled
():
?bool
{
return
$this
->
isDisabled
;
}
public
function
setIsDisabled
(
bool
$isDisabled
):
static
{
$this
->
isDisabled
=
$isDisabled
;
return
$this
;
}
}
This diff is collapsed.
Click to expand it.
src/Repository/WishlistRepository.php
0 → 100644
+
43
−
0
View file @
74f8c138
<?php
namespace
App\Repository
;
use
App\Entity\Wishlist
;
use
Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository
;
use
Doctrine\Persistence\ManagerRegistry
;
/**
* @extends ServiceEntityRepository<Wishlist>
*/
class
WishlistRepository
extends
ServiceEntityRepository
{
public
function
__construct
(
ManagerRegistry
$registry
)
{
parent
::
__construct
(
$registry
,
Wishlist
::
class
);
}
// /**
// * @return Wishlist[] Returns an array of Wishlist objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('w')
// ->andWhere('w.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('w.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Wishlist
// {
// return $this->createQueryBuilder('w')
// ->andWhere('w.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment