<?php
namespace App\Entity\Reference;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Entity\Property;
use App\Repository\Reference\PropertyDiffusionModeReferenceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Controller\PropertyDiffusionModeReferenceController;
/**
* @ApiResource(
* security= "is_granted('ROLE_AGENT') or is_granted('ROLE_MANAGER') or is_granted('ROLE_IT') ",
* normalizationContext={"groups"={"reference-property-diffusion-mode:read"}, "swagger_definition_name"="Read"},
* denormalizationContext={"groups"={"reference-property-diffusion-mode:write"}, "swagger_definition_name"="Write"},
* itemOperations={
* "get" = { "path"="/reference_property_diffusion_modes/{id}" }
* },
* collectionOperations={
* "get" = {"path"="/reference_property_diffusion_modes",
* "controller" = PropertyDiffusionModeReferenceController::class},
*
* },
* attributes={
* "pagination_items_per_page"=10,
* "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"} }
* }
* )
* @ORM\Entity(repositoryClass=PropertyDiffusionModeReferenceRepository::class)
*/
class PropertyDiffusionModeReference
{
public const TRANSLATION_DOMAIN = 'reference_property';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_MULTILIST = 'reference.property.diffusion.mode.MULTILIST';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_SAROUTY = 'reference.property.diffusion.mode.SAROUTY';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_AVITO = 'reference.property.diffusion.mode.AVITO';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_MUBAWAB = 'reference.property.diffusion.mode.MUBAWAB';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_AGENZ = 'reference.property.diffusion.mode.AGENZ';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_OTHER = 'reference.property.diffusion.mode.OTHER';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_NONE = 'reference.property.diffusion.mode.NONE';
public const REFERENCE_PROPERTY_DIFFUSION_MODE_YIELDIS = 'reference.property.diffusion.mode.YIELDIS';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_SAROUTY = 'SAROUTY';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_AVITO = 'AVITO';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_MUBAWAB = 'MUBAWAB';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_AGENZ = 'AGENZ';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_NONE = 'NONE';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_MULTILIST = 'MULTILIST';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_OTHER = 'OTHEER';
public const REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_YIELDIS = 'YIELDIS';
public const ALL_REFERENCE_DIFFUSION_MODE = [
self::REFERENCE_PROPERTY_DIFFUSION_MODE_NONE,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_AVITO,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_SAROUTY,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_MUBAWAB,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_AGENZ,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_OTHER,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_MULTILIST,
self::REFERENCE_PROPERTY_DIFFUSION_MODE_YIELDIS
];
public const ALL_REFERENCE_CODE_DIFFUSION_MODE = [
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_NONE,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_AVITO,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_SAROUTY,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_MUBAWAB,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_AGENZ,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_OTHER,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_MULTILIST,
self::REFERENCE_CODE_PROPERTY_DIFFUSION_MODE_YIELDIS
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*
* @Groups({
* "property:read",
* "mandate:read",
* "transaction-item:read",
* "reference-property-diffusion-mode:read"
* })
*/
private $id;
public function getId(): ?int
{
return $this->id;
}
/**
* @ORM\Column(type="string", length=255)
*
* @Groups({
* "property:read",
* "mandate:read",
* "transaction-item:read",
* "reference-property-diffusion-mode:read"
* })
*
*/
private ?string $name;
/**
* @ORM\Column(type="string", length=255)
*
* @Groups({
* "property:read",
* "mandate:read",
* "transaction-item:read",
* "reference-property-diffusion-mode:read"
* })
*
*/
private ?string $code;
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
}