94 lines
1.6 KiB
PHP
94 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
|
use DateTime;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="cv_warranty_history")
|
|
*/
|
|
class CVWarrantyHistory
|
|
{
|
|
// unique id
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
// customer vehicle id, loose coupling
|
|
/**
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
protected $cv_id;
|
|
|
|
/**
|
|
* @ORM\Column(type="datetime")
|
|
*/
|
|
protected $date_create;
|
|
|
|
// warranty code
|
|
/**
|
|
* @ORM\Column(type="string", length=20)
|
|
*/
|
|
protected $warranty_code;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="User")
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
|
*/
|
|
protected $user;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->date_create = new DateTime();
|
|
}
|
|
|
|
public function getID()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getDateCreate()
|
|
{
|
|
return $this->date_create;
|
|
}
|
|
|
|
public function setWarrantyCode($warranty_code)
|
|
{
|
|
$this->warranty_code = $warranty_code;
|
|
return $this;
|
|
}
|
|
|
|
public function getWarrantyCode()
|
|
{
|
|
return $this->warranty_code;
|
|
}
|
|
|
|
public function setCVID($cv_id)
|
|
{
|
|
$this->cv_id = $cv_id;
|
|
return $this;
|
|
}
|
|
|
|
public function getCVID()
|
|
{
|
|
return $this->cv_id;
|
|
}
|
|
|
|
public function setUser($user)
|
|
{
|
|
$this->user = $user;
|
|
return $this;
|
|
}
|
|
|
|
public function getUser()
|
|
{
|
|
return $this->user;
|
|
}
|
|
}
|