Files
SIRH/src/DataFixtures/ContractFixtures.php
tristan f493ea237b
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Ajout des notification + page employé (#6)
| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: #6
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
2026-03-10 12:35:17 +00:00

56 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\DataFixtures;
use App\Entity\Contract;
use App\Enum\TrackingMode;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
final class ContractFixtures extends Fixture
{
public function load(ObjectManager $manager): void
{
$contract35 = new Contract()
->setName('35h')
->setTrackingMode(TrackingMode::TIME)
->setWeeklyHours(35)
->setIsActive(true)
;
$contract4h = new Contract()
->setName('4h')
->setTrackingMode(TrackingMode::TIME)
->setWeeklyHours(4)
->setIsActive(true)
;
$forfait = new Contract()
->setName('Forfait')
->setTrackingMode(TrackingMode::PRESENCE)
->setWeeklyHours(null)
->setIsActive(true)
;
$interim = new Contract()
->setName('Interim')
->setTrackingMode(TrackingMode::TIME)
->setWeeklyHours(35)
->setIsActive(true)
;
$manager->persist($contract35);
$manager->persist($contract4h);
$manager->persist($forfait);
$manager->persist($interim);
$manager->flush();
$this->addReference(FixtureReferences::CONTRACT_35, $contract35);
$this->addReference(FixtureReferences::CONTRACT_4H, $contract4h);
$this->addReference(FixtureReferences::CONTRACT_FORFAIT, $forfait);
$this->addReference(FixtureReferences::CONTRACT_INTERIM, $interim);
}
}