<?php

namespace AppBundle\Entity\Billing;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;

/**
 * Totaux des lignes BillLine d'une facture BillAccounting, avec calcul de TVA
 *
 * @Iri("http://schema.org/BillTotalDetail")
 */
#[ORM\Entity]
class BillTotalDetail
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['billtotaldetail', 'billaccounting_list', 'bill_list', 'billcredit_list', 'build_bills'])]
    private $id;
    /**
     * @var array
     */
    #[ORM\Column(type: 'json_array', nullable: true)]
    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
    private $vat;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
    private $htNoReduc;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
    private $ht;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['billtotaldetail', 'billaccounting_list_totaldetail', 'bill_list_totaldetail', 'my_bills_show_bills', 'billcredit_list_totaldetail', 'build_bills_totaldetail'])]
    private $ttc;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
    private $totalReduction;
    /**
     * Constructor
     */
    public function __construct()
    {
    }
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set htNoReduc
     *
     * @param float $htNoReduc
     *
     * @return BillTotalDetail
     */
    public function setHtNoReduc($htNoReduc)
    {
        $this->htNoReduc = $htNoReduc;

        return $this;
    }
    /**
     * Get htNoReduc
     *
     * @return float
     */
    public function getHtNoReduc()
    {
        return $this->htNoReduc;
    }
    /**
     * Set ht
     *
     * @param float $ht
     *
     * @return BillTotalDetail
     */
    public function setHt($ht)
    {
        $this->ht = $ht;

        return $this;
    }
    /**
     * Get ht
     *
     * @return float
     */
    public function getHt()
    {
        return $this->ht;
    }
    /**
     * Set ttc
     *
     * @param float $ttc
     *
     * @return BillTotalDetail
     */
    public function setTtc($ttc)
    {
        $this->ttc = $ttc;

        return $this;
    }
    /**
     * Get ttc
     *
     * @return float
     */
    public function getTtc()
    {
        return $this->ttc;
    }
    /**
     * Set totalReduction
     *
     * @param float $totalReduction
     *
     * @return BillTotalDetail
     */
    public function setTotalReduction($totalReduction)
    {
        $this->totalReduction = $totalReduction;

        return $this;
    }
    /**
     * Get totalReduction
     *
     * @return float
     */
    public function getTotalReduction()
    {
        return $this->totalReduction;
    }
    /**
     * Set vat
     *
     * @param array $vat
     *
     * @return BillTotalDetail
     */
    public function setVat($vat)
    {
        $this->vat = $vat;

        return $this;
    }
    /**
     * Get vat
     *
     * @return array
     */
    public function getVat()
    {
        return $this->vat;
    }
}
