TransactionAdherentPrestataire.php 897 Bytes
Newer Older
1 2 3 4
<?php

namespace App\Entity;

5
use Doctrine\ORM\Event\LifecycleEventArgs;
6
use Doctrine\ORM\Mapping as ORM;
7
use Symfony\Component\Validator\Constraints as Assert;
8 9 10 11 12 13

/**
 * TRANSACTION
 *   - ADHERENTS        =>    PRESTATAIRES      (Paiement numérique)
 *
 * @ORM\Entity
14
 * @ORM\HasLifecycleCallbacks
15 16 17 18
 */
class TransactionAdherentPrestataire extends Transaction
{
    /**
19
     * @ORM\OneToOne(targetEntity="Adherent")
20
     * @ORM\JoinColumn(name="adherent_id", referencedColumnName="id", nullable=true)
21
     * @Assert\NotBlank
22 23 24 25
     */
    protected $expediteur;

    /**
26
     * @ORM\OneToOne(targetEntity="Prestataire")
27
     * @ORM\JoinColumn(name="prestataire_id", referencedColumnName="id", nullable=true)
28
     * @Assert\NotBlank
29 30 31 32 33 34 35 36 37 38 39
     */
    protected $destinataire;

    /**
     * @return string
     */
    public function getType(): string
    {
        return 'adherent_prestataire';
    }
}