src/Entity/TransaccionAfiliado.php line 21

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\TransaccionAfiliado;
  4. use App\Entity\Transaccion;
  5. use App\Entity\User;
  6. use App\Entity\UserStats;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use JMS\Serializer\Annotation as JMS;
  11. /**
  12.  * TransaccionAfiliado
  13.  *
  14.  * @ORM\Table()
  15.  * @ORM\Entity
  16.  * @ORM\HasLifecycleCallbacks()
  17.  */
  18. class TransaccionAfiliado
  19. {
  20.   /**
  21.    * @var integer
  22.    *
  23.    * @ORM\Column(name="id", type="integer")
  24.    * @ORM\Id
  25.    * @ORM\GeneratedValue(strategy="AUTO")
  26.    * @JMS\Groups({"api-order"})
  27.    */
  28.   protected $id;
  29.   /**
  30.   * @ORM\ManyToOne(targetEntity="User", inversedBy="transaccionesDelAfiliado")
  31.   * @ORM\JoinColumn(name="afiliado", referencedColumnName="id")
  32.   * @JMS\Groups({"api-order"})
  33.   */
  34.   protected $afiliado;
  35.   /**
  36.   * @ORM\ManyToOne(targetEntity="Transaccion")
  37.   * @ORM\JoinColumn(name="transaccion", referencedColumnName="id")
  38.   * @JMS\Groups({"api-order"})
  39.   */
  40.   protected $transaccion;
  41.   /**
  42.    * Sumatorio de los gastos de todas las divisisas SIN gastos de envio
  43.    * @var integer
  44.    *
  45.    * @ORM\Column(name="total_transaccion", type="float" , nullable=true)
  46.    */
  47.   protected $totalTransaccion;
  48.   /**
  49.    * Sumatorio de los gastos de todas las divisisas SIN gastos de envio
  50.    * @var integer
  51.    *
  52.    * @ORM\Column(name="parte_afiliado", type="float", nullable=true)
  53.    */
  54.   protected $parteAfiliado;
  55.   /**
  56.    * Sumatorio de los gastos de todas las divisisas SIN gastos de envio
  57.    * @var integer
  58.    *
  59.    * @ORM\Column(name="tipo_transaccion", type="string")
  60.    */
  61.   protected $tipo_transaccion;
  62.   /**
  63.    * @var string
  64.    *
  65.    * @ORM\Column(name="fechaEntrega", type="datetime", nullable=true)
  66.    * @JMS\Groups({"api-order"})
  67.    */
  68.   protected $fechaEntrega;
  69.   public function __construct() {
  70.     $this->fechaEntrega = new \DateTime();
  71.   }
  72.   public function getId(){
  73.     return $this->id;
  74.   }
  75.   /**
  76.    * Set fechaEntrega
  77.    *
  78.    * @param string $fechaEntrega
  79.    * @return Transaccion
  80.    */
  81.   public function setFechaEntrega($fechaEntrega)
  82.   {
  83.       $this->fechaEntrega $fechaEntrega;
  84.       return $this;
  85.   }
  86.   /**
  87.    * Get fechaEntrega
  88.    *
  89.    * @return \DateTime
  90.    */
  91.   public function getFechaEntrega()
  92.   {
  93.       return $this->fechaEntrega;
  94.   }
  95.   public function getTipo(){
  96.     return $this->tipo_transaccion;
  97.   }
  98.   public function setTipo($tipo){
  99.     $this->tipo_transaccion $tipo;
  100.     return $this;
  101.   }
  102.   /**
  103.    * Set afiliado
  104.    *
  105.    * @param string afiliado
  106.    * @return User
  107.    */
  108.   public function setAfiliado($idAfiliado){
  109.     $this->afiliado =$idAfiliado;
  110.     return $this;
  111.   }
  112.   public function getAfiliado(){
  113.     return $this->afiliado;
  114.   }
  115.   /**
  116.    * Set transaccion
  117.    *
  118.    * @param string $transaccion
  119.    * @return Transaccion
  120.    */
  121.   public function setTransaccion($idTransaccion){
  122.     $this->transaccion $idTransaccion;
  123.     return $this;
  124.   }
  125.   public function getTransaccion(){
  126.     return $this->transaccion;
  127.   }
  128.   /**
  129.    * Set totalTransaccion
  130.    *
  131.    * @param string $totalTransaccion
  132.    * @return Transaccion
  133.    */
  134.   public function setTotalTransaccion($totalTransaccion){
  135.     $this->totalTransaccion $totalTransaccion;
  136.     return $this;
  137.   }
  138.   public function getTotalTransaccion(){
  139.     return $this->totalTransaccion;
  140.   }
  141.   /**
  142.    * Set parteAfiliado
  143.    *
  144.    * @param string $parteAfiliado
  145.    * @return Transaccion
  146.    */
  147.   public function setParteAfiliado($parteAfiliado){
  148.     $this->parteAfiliado $parteAfiliado;
  149.     return $this;
  150.   }
  151.   public function getParteAfiliado(){
  152.     return $this->parteAfiliado;
  153.   }
  154. }