Commit 65c0fd14 authored by Anthony Gautreau's avatar Anthony Gautreau
Browse files

Premiere etape de fonctionnement

parent 08596c0a
Loading
Loading
Loading
Loading
+86 −0
Changes for src/Entity/CategorieParametre.php: 86 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Unicaen\Parametre\Entity;

use ApiPlatform\Metadata\ApiResource;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(name: 'unicaen_parametre_categorie')]
#[ApiResource]
class CategorieParametre
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column(type: 'integer')]
    private ?int $id = null;

    #[ORM\Column(length: 255)]
    private ?string $code;

    #[ORM\Column(length: 255)]
    private ?string $libelle;

    #[ORM\Column(nullable: true)]
    private ?string $description = null;

    #[ORM\Column(type: 'integer')]
    private ?int $ordre;

    #[ORM\OneToMany(targetEntity: Parametre::class, mappedBy: 'categorie')]
    private Collection $parametres;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(?string $code): static
    {
        $this->code = $code;

        return $this;
    }

    public function getDescription(): ?string
    {
        return $this->description;
    }

    public function setDescription(?string $description): static
    {
        $this->description = $description;

        return $this;
    }

    public function getLibelle(): ?string
    {
        return $this->libelle;
    }

    public function setLibelle(?string $libelle): static
    {
        $this->libelle = $libelle;

        return $this;
    }

    public function getOrdre(): ?int
    {
        return $this->ordre;
    }

    public function setOrdre(?int $ordre): static
    {
        $this->ordre = $ordre;

        return $this;
    }
}