Commit 08596c0a authored by Anthony Gautreau's avatar Anthony Gautreau
Browse files

Base du backend

parent 62210733
Loading
Loading
Loading
Loading

.php-cs-fixer.dist.php

0 → 100644
+14 −0
Changes for .php-cs-fixer.dist.php: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

$finder = (new PhpCsFixer\Finder())
    ->in(__DIR__. '/src')
    ->exclude('var')
    ->exclude('vendor'); 
;

return (new PhpCsFixer\Config())
    ->setRules([
        '@Symfony' => true,
    ])
    ->setFinder($finder)
;
+19 −2
Changes for composer.json: 19 added lines, 2 removed lines.
Original line number Diff line number Diff line
{
    "name": "unicaen-modern/parametre",
    "type": "symfony-bundle",
    "description": "Bundle API Platform pour Unicaen Parametre",
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "UnicaenModern\\Parametre\\": "src/"
            "Unicaen\\Parametre\\": "src/"
        }
    },
    "require": {}
    "require": {
        "php": "^8.2",
        "doctrine/orm": "^3.3",
        "api-platform/core": "^4.1"
    },
    "require-dev": {
        "friendsofphp/php-cs-fixer": "^3.75",
        "symfony/maker-bundle": "^1.62"
    },
    "extra": {
        "symfony": {
            "bundle": {
                "Unicaen\\Parametre\\UnicaenParametreBundle": "all"
            }
        }
    }
}

config/services.yaml

0 → 100644
+7 −0
Changes for config/services.yaml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
services:
  _defaults:
    autowire: true
    autoconfigure: true

  Unicaen\Parametre\:
    resource: '../src/*'
 No newline at end of file
+142 −0
Changes for src/Entity/Parametre.php: 142 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Unicaen\Parametre\Entity;

use ApiPlatform\Metadata\ApiResource;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(name: 'unicaen_parametre')]
#[ApiResource]
class Parametre
{
    #[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(length: 255)]
    private ?string $valeur;

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

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

    #[ORM\Column(type: 'boolean')]
    private bool $modifiable = true;

    #[ORM\Column(type: 'boolean')]
    private bool $affichable = true;

    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 getValeur(): ?string
    {
        return $this->valeur;
    }

    public function setValeur(?string $valeur): static
    {
        $this->valeur = $valeur;

        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 getValeursPossibles(): ?string
    {
        return $this->valeurs_possibles;
    }

    public function setValeursPossibles(?string $valeurs_possibles): static
    {
        $this->valeurs_possibles = $valeurs_possibles;

        return $this;
    }

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

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

        return $this;
    }

    public function isModifiable(): bool
    {
        return $this->modifiable;
    }

    public function setModifiable(bool $modifiable): static
    {
        $this->modifiable = $modifiable;

        return $this;
    }

    public function isAffichable(): bool
    {
        return $this->affichable;
    }

    public function setAffichable(bool $affichable): static
    {
        $this->affichable = $affichable;

        return $this;
    }
}
+9 −0
Changes for src/UnicaenParametreBundle.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Unicaen\Parametre;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class UnicaenParametreBundle extends Bundle
{
}
Loading