<?php

namespace Lc\ShopBundle\Model;

use App\Entity\OrderShop;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\MappedSuperclass()
 */
abstract class CreditHistory extends AbstractEntity
{
        /**
         * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface")
         * @ORM\JoinColumn(nullable=false)
         */
        protected $merchant;

        /**
         * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="creditHistories")
         * @ORM\JoinColumn(nullable=false)
         */
        protected $user;

        /**
         * @ORM\Column(type="float")
         */
        protected $amount;

        /**
         * @ORM\Column(type="string", length=31)
         */
        protected $type;

        /**
         * @ORM\Column(type="string", length=31)
         */
        protected $meanPayment;

        /**
         * @ORM\Column(type="text", nullable=true)
         */
        protected $comment;

        /**
         * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="creditHistories")
         * @ORM\JoinColumn(nullable=false)
         */
        protected $orderShop;

        public function getMerchant(): ?Merchant
        {
                return $this->merchant;
        }

        public function setMerchant(?Merchant $merchant): self
        {
                $this->merchant = $merchant;

                return $this;
        }

        public function getUser(): ?User
        {
                return $this->user;
        }

        public function setUser(?User $user): self
        {
                $this->user = $user;

                return $this;
        }

        public function getAmount(): ?float
        {
                return $this->amount;
        }

        public function setAmount(float $amount): self
        {
                $this->amount = $amount;

                return $this;
        }

        public function getType(): ?string
        {
                return $this->type;
        }

        public function setType(string $type): self
        {
                $this->type = $type;

                return $this;
        }

        public function getMeanPayment(): ?string
        {
                return $this->meanPayment;
        }

        public function setMeanPayment(string $meanPayment): self
        {
                $this->meanPayment = $meanPayment;

                return $this;
        }

        public function getComment(): ?string
        {
                return $this->comment;
        }

        public function setComment(string $comment): self
        {
                $this->comment = $comment;

                return $this;
        }

        public function getOrderShop(): ?OrderShop
        {
                return $this->orderShop;
        }

        public function setOrderShop(?OrderShop $orderShop): self
        {
                $this->orderShop = $orderShop;

                return $this;
        }
}
