Update BDD rarity

cleo
Cleo EIRAS 1 week ago
parent a12876480e
commit 7b488dc14c

@ -31,7 +31,7 @@
"symfony/process": "6.1.*",
"symfony/property-access": "6.1.*",
"symfony/property-info": "6.1.*",
"symfony/runtime": "6.1.*",
"symfony/runtime": "^6.3.2",
"symfony/security-bundle": "6.1.*",
"symfony/serializer": "6.1.*",
"symfony/string": "6.1.*",

223
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d0596df364527b4a2e7e00a9d7213e87",
"content-hash": "a904471bc7e1136f2c1810044504fcc9",
"packages": [
{
"name": "doctrine/cache",
@ -2558,78 +2558,6 @@
],
"time": "2023-01-10T18:53:01+00:00"
},
{
"name": "symfony/doctrine-messenger",
"version": "v6.1.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/doctrine-messenger.git",
"reference": "e4b775d2dadcc801d2404c701555c2638690811e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/doctrine-messenger/zipball/e4b775d2dadcc801d2404c701555c2638690811e",
"reference": "e4b775d2dadcc801d2404c701555c2638690811e",
"shasum": ""
},
"require": {
"doctrine/dbal": "^2.13|^3.0",
"php": ">=8.1",
"symfony/messenger": "^5.4|^6.0",
"symfony/service-contracts": "^1.1|^2|^3"
},
"conflict": {
"doctrine/persistence": "<1.3"
},
"require-dev": {
"doctrine/persistence": "^1.3|^2|^3",
"symfony/property-access": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0"
},
"type": "symfony-messenger-bridge",
"autoload": {
"psr-4": {
"Symfony\\Component\\Messenger\\Bridge\\Doctrine\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Doctrine Messenger Bridge",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/doctrine-messenger/tree/v6.1.11"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-01-01T08:36:55+00:00"
},
{
"name": "symfony/dotenv",
"version": "v6.1.11",
@ -3125,16 +3053,16 @@
},
{
"name": "symfony/flex",
"version": "v2.7.0",
"version": "v2.7.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/flex.git",
"reference": "5d743b3b78fabe9f3146586d77b0a1f9292851fc"
"reference": "4ae50d368415a06820739e54d38a4a29d6df9155"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/flex/zipball/5d743b3b78fabe9f3146586d77b0a1f9292851fc",
"reference": "5d743b3b78fabe9f3146586d77b0a1f9292851fc",
"url": "https://api.github.com/repos/symfony/flex/zipball/4ae50d368415a06820739e54d38a4a29d6df9155",
"reference": "4ae50d368415a06820739e54d38a4a29d6df9155",
"shasum": ""
},
"require": {
@ -3173,7 +3101,7 @@
"description": "Composer plugin for Symfony",
"support": {
"issues": "https://github.com/symfony/flex/issues",
"source": "https://github.com/symfony/flex/tree/v2.7.0"
"source": "https://github.com/symfony/flex/tree/v2.7.1"
},
"funding": [
{
@ -3189,7 +3117,7 @@
"type": "tidelift"
}
],
"time": "2025-05-23T11:41:40+00:00"
"time": "2025-05-28T14:22:54+00:00"
},
{
"name": "symfony/form",
@ -3945,92 +3873,6 @@
],
"time": "2023-01-10T18:53:01+00:00"
},
{
"name": "symfony/messenger",
"version": "v6.1.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/messenger.git",
"reference": "e3b7323b1d59fc77f5870735809bf39ce1596aee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/messenger/zipball/e3b7323b1d59fc77f5870735809bf39ce1596aee",
"reference": "e3b7323b1d59fc77f5870735809bf39ce1596aee",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^1|^2|^3"
},
"conflict": {
"symfony/event-dispatcher": "<5.4",
"symfony/event-dispatcher-contracts": "<2",
"symfony/framework-bundle": "<5.4",
"symfony/http-kernel": "<5.4",
"symfony/serializer": "<5.4"
},
"require-dev": {
"psr/cache": "^1.0|^2.0|^3.0",
"symfony/console": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/property-access": "^5.4|^6.0",
"symfony/routing": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0",
"symfony/service-contracts": "^1.1|^2|^3",
"symfony/stopwatch": "^5.4|^6.0",
"symfony/validator": "^5.4|^6.0"
},
"suggest": {
"enqueue/messenger-adapter": "For using the php-enqueue library as a transport."
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Messenger\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Samuel Roze",
"email": "samuel.roze@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Helps applications send and receive messages to/from other applications or via message queues",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/messenger/tree/v6.1.11"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-01-20T17:44:30+00:00"
},
{
"name": "symfony/mime",
"version": "v6.1.11",
@ -5293,16 +5135,16 @@
},
{
"name": "symfony/runtime",
"version": "v6.1.11",
"version": "v6.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/runtime.git",
"reference": "717cb91d66893a27a4607f227e28eb74ff007fde"
"reference": "832c3ce3b810509815050434ccb7ead68d06395b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/runtime/zipball/717cb91d66893a27a4607f227e28eb74ff007fde",
"reference": "717cb91d66893a27a4607f227e28eb74ff007fde",
"url": "https://api.github.com/repos/symfony/runtime/zipball/832c3ce3b810509815050434ccb7ead68d06395b",
"reference": "832c3ce3b810509815050434ccb7ead68d06395b",
"shasum": ""
},
"require": {
@ -5314,10 +5156,10 @@
},
"require-dev": {
"composer/composer": "^1.0.2|^2.0",
"symfony/console": "^5.4|^6.0",
"symfony/dotenv": "^5.4|^6.0",
"symfony/http-foundation": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0"
"symfony/console": "^5.4.9|^6.0.9|^7.0",
"symfony/dotenv": "^5.4|^6.0|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0",
"symfony/http-kernel": "^5.4|^6.0|^7.0"
},
"type": "composer-plugin",
"extra": {
@ -5348,8 +5190,11 @@
],
"description": "Enables decoupling PHP applications from global state",
"homepage": "https://symfony.com",
"keywords": [
"runtime"
],
"support": {
"source": "https://github.com/symfony/runtime/tree/v6.1.11"
"source": "https://github.com/symfony/runtime/tree/v6.4.22"
},
"funding": [
{
@ -5365,7 +5210,7 @@
"type": "tidelift"
}
],
"time": "2023-01-20T17:44:30+00:00"
"time": "2025-05-07T21:15:03+00:00"
},
{
"name": "symfony/security-bundle",
@ -6623,16 +6468,16 @@
},
{
"name": "symfony/var-exporter",
"version": "v6.4.21",
"version": "v6.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
"reference": "717e7544aa99752c54ecba5c0e17459c48317472"
"reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/717e7544aa99752c54ecba5c0e17459c48317472",
"reference": "717e7544aa99752c54ecba5c0e17459c48317472",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/f28cf841f5654955c9f88ceaf4b9dc29571988a9",
"reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9",
"shasum": ""
},
"require": {
@ -6680,7 +6525,7 @@
"serialize"
],
"support": {
"source": "https://github.com/symfony/var-exporter/tree/v6.4.21"
"source": "https://github.com/symfony/var-exporter/tree/v6.4.22"
},
"funding": [
{
@ -6696,7 +6541,7 @@
"type": "tidelift"
}
],
"time": "2025-04-27T21:06:26+00:00"
"time": "2025-05-14T13:00:13+00:00"
},
{
"name": "symfony/web-link",
@ -9145,16 +8990,16 @@
},
{
"name": "symfony/phpunit-bridge",
"version": "v7.2.6",
"version": "v7.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git",
"reference": "6106ae85a0e3ed509d339b7f924788c9cc4e7cfb"
"reference": "2eabda563921f21cbce1d1e3247b3c36568905e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/6106ae85a0e3ed509d339b7f924788c9cc4e7cfb",
"reference": "6106ae85a0e3ed509d339b7f924788c9cc4e7cfb",
"url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2eabda563921f21cbce1d1e3247b3c36568905e6",
"reference": "2eabda563921f21cbce1d1e3247b3c36568905e6",
"shasum": ""
},
"require": {
@ -9207,7 +9052,7 @@
"description": "Provides utilities for PHPUnit, especially user deprecation notices management",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/phpunit-bridge/tree/v7.2.6"
"source": "https://github.com/symfony/phpunit-bridge/tree/v7.3.0"
},
"funding": [
{
@ -9223,7 +9068,7 @@
"type": "tidelift"
}
],
"time": "2025-04-09T08:35:42+00:00"
"time": "2025-05-23T07:26:30+00:00"
},
{
"name": "symfony/web-profiler-bundle",
@ -9356,7 +9201,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": [],
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
@ -9364,6 +9209,6 @@
"ext-ctype": "*",
"ext-iconv": "*"
},
"platform-dev": {},
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

@ -14,42 +14,43 @@ class Emoji
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $nom = null;
private ?string $name = null;
#[ORM\Column(length: 255)]
private ?string $code = null;
#[ORM\Column]
private ?float $force = null;
private ?float $strength = null;
#[ORM\Column]
private ?float $robustesse = null;
private ?float $toughness = null;
#[ORM\Column]
private ?float $intelligence = null;
#[ORM\Column]
private ?float $vitesse = null;
private ?float $speed = null;
#[ORM\Column]
private ?int $nbCombatGagne = null;
private ?int $fightsWon = null;
#[ORM\Column]
private ?int $rarete = null;
#[ORM\ManyToOne(targetEntity: Rarity::class)]
#[ORM\JoinColumn(nullable: false)]
private ?Rarity $rarity = null;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
public function getName(): ?string
{
return $this->nom;
return $this->name;
}
public function setNom(string $nom): self
public function setName(string $name): self
{
$this->nom = $nom;
$this->name = $name;
return $this;
}
@ -64,25 +65,25 @@ class Emoji
return $this;
}
public function getForce(): ?float
public function getStrength(): ?float
{
return $this->force;
return $this->strength;
}
public function setForce(float $force): self
public function setStrength(float $strength): self
{
$this->force = $force;
$this->strength = $strength;
return $this;
}
public function getRobustesse(): ?float
public function getToughness(): ?float
{
return $this->robustesse;
return $this->toughness;
}
public function setRobustesse(float $robustesse): self
public function setToughness(float $toughness): self
{
$this->robustesse = $robustesse;
$this->toughness = $toughness;
return $this;
}
@ -97,36 +98,36 @@ class Emoji
return $this;
}
public function getVitesse(): ?float
public function getSpeed(): ?float
{
return $this->vitesse;
return $this->speed;
}
public function setVitesse(float $vitesse): self
public function setSpeed(float $speed): self
{
$this->vitesse = $vitesse;
$this->speed = $speed;
return $this;
}
public function getNbCombatGagne(): ?int
public function getFightsWon(): ?int
{
return $this->nbCombatGagne;
return $this->fightsWon;
}
public function setNbCombatGagne(int $nbCombatGagne): self
public function setFightsWon(int $fightsWon): self
{
$this->nbCombatGagne = $nbCombatGagne;
$this->fightsWon = $fightsWon;
return $this;
}
public function getRarete(): ?int
public function getRarity(): ?Rarity
{
return $this->rarete;
return $this->rarity;
}
public function setRarete(int $rarete): self
public function setRarity(Rarity $rarity): self
{
$this->rarete = $rarete;
$this->rarity = $rarity;
return $this;
}
}

@ -0,0 +1,48 @@
<?php
namespace App\Entity;
use App\Repository\RarityRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RarityRepository::class)]
class Rarity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 50, unique: true)]
private string $name;
#[ORM\Column(type: 'float')]
private float $dropRate;
public function getId(): ?int
{
return $this->id;
}
public function getName(): string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDropRate(): float
{
return $this->dropRate;
}
public function setDropRate(float $dropRate): self
{
$this->dropRate = $dropRate;
return $this;
}
}

@ -0,0 +1,48 @@
<?php
namespace App\Repository;
use App\Entity\Rarity;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Rarity>
*
* @method Rarity|null find($id, $lockMode = null, $lockVersion = null)
* @method Rarity|null findOneBy(array $criteria, array $orderBy = null)
* @method Rarity[] findAll()
* @method Rarity[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class RarityRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Rarity::class);
}
// /**
// * @return Rarity[] Returns an array of Rarity objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('r.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Rarity
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

@ -1,4 +1,13 @@
{
"doctrine/deprecations": {
"version": "1.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "87424683adc81d7dc305eefec1fced883084aab9"
}
},
"doctrine/doctrine-bundle": {
"version": "2.13",
"recipe": {
@ -117,18 +126,6 @@
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
}
},
"symfony/messenger": {
"version": "6.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.0",
"ref": "ba1ac4e919baba5644d31b57a3284d6ba12d52ee"
},
"files": [
"./config/packages/messenger.yaml"
]
},
"symfony/monolog-bundle": {
"version": "3.10",
"recipe": {

Loading…
Cancel
Save