<?php
namespace App\Entity;
use App\Classes\linkRequestStatus;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* Class SupplierCustomer
*
* @ORM\Entity
* @ORM\Entity(repositoryClass="App\Repository\SupplierCustomerLinkRequestRepository")
* @ORM\Table(name="malys_supplier_customer_link_request")
* @ORM\HasLifecycleCallbacks()
* @package App\Entity
*/
class SupplierCustomerLinkRequest
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var Customer
* @ORM\ManyToOne(targetEntity="Customer")
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
*/
protected $customer;
/**
* @var Supplier
*
* @ORM\ManyToOne(targetEntity="Supplier")
* @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
*/
protected $supplier;
/**
* @var string
*
* @ORM\Column(name="comment", type="string", length=255, nullable=true)
*/
protected $comment;
/**
* @var DateTime
*
* @ORM\Column(name="createdAt", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var DateTime
*
* @ORM\Column(name="updatedAt", type="datetime", nullable=true)
*/
protected $updatedAt;
/**
* @var string
*
* @ORM\Column(name="status", type="string", length=255, nullable=false)
*/
protected $status;
/**
* SupplierCustomer constructor.
*/
public function __construct()
{
$this->status = linkRequestStatus::WAITING;
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return Customer
*/
public function getCustomer()
{
return $this->customer;
}
/**
* @param Customer $customer
*/
public function setCustomer($customer)
{
$this->customer = $customer;
}
/**
* @return Supplier
*/
public function getSupplier()
{
return $this->supplier;
}
/**
* @param Supplier $supplier
*/
public function setSupplier($supplier)
{
$this->supplier = $supplier;
}
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set createdAt
*
* @return SupplierCustomer
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new DateTime();
$this->updatedAt = new DateTime();
return $this;
}
/**
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updatedAt
*
* @return SupplierCustomer
* @ORM\PreUpdate
*/
public function setUpdatedAt()
{
$this->updatedAt = new DateTime();
return $this;
}
/**
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* @param string $status
*/
public function setStatus($status)
{
$this->status = $status;
}
/**
* @return string
*/
public function getComment()
{
return $this->comment;
}
/**
* @param string $comment
*/
public function setComment($comment)
{
$this->comment = $comment;
}
}