138 lines
2.6 KiB
PHP
138 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
use DateTime;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="warranty_serial_upload_log")
|
|
*/
|
|
class WarrantySerialUploadLog
|
|
{
|
|
// unique id
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
// date created
|
|
/**
|
|
* @ORM\Column(type="datetime")
|
|
*/
|
|
protected $date_create;
|
|
|
|
// user that uploaded the file
|
|
/**
|
|
* @ORM\Column(type="string", length=32)
|
|
*/
|
|
protected $api_user;
|
|
|
|
// original filename of warranty serial
|
|
/**
|
|
* @ORM\Column(type="string", length=80, nullable=true)
|
|
*/
|
|
protected $orig_file_serial;
|
|
|
|
// uploaded file name
|
|
/**
|
|
* @ORM\Column(type="string", length=80, nullable=true)
|
|
*/
|
|
protected $uploaded_file_serial;
|
|
|
|
// flag if uploaded
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
protected $flag_uploaded;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=60, nullable=true)
|
|
*/
|
|
protected $error;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->date_create = new DateTime();
|
|
$this->api_user = '';
|
|
$this->orig_file_serial = '';
|
|
$this->orig_file_serial = '';
|
|
$this->flag_uploaded = false;
|
|
$this->error = null;
|
|
}
|
|
|
|
public function getID()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setDateCreate(DateTime $date_create)
|
|
{
|
|
$this->date_create = $date_create;
|
|
return $this;
|
|
}
|
|
|
|
public function getDateCreate()
|
|
{
|
|
return $this->date_create;
|
|
}
|
|
|
|
public function setApiUser($api_user)
|
|
{
|
|
$this->api_user = $api_user;
|
|
return $this;
|
|
}
|
|
|
|
public function getApiUser()
|
|
{
|
|
return $this->api_user;
|
|
}
|
|
|
|
public function setOrigFileSerial($file = null)
|
|
{
|
|
$this->orig_file_serial = $file;
|
|
return $this;
|
|
}
|
|
|
|
public function getOrigFileSerial()
|
|
{
|
|
return $this->orig_file_serial;
|
|
}
|
|
|
|
public function setUploadedFileSerial($file = null)
|
|
{
|
|
$this->uploaded_file_serial = $file;
|
|
return $this;
|
|
}
|
|
|
|
public function getUploadedFileSerial()
|
|
{
|
|
return $this->uploaded_file_serial;
|
|
}
|
|
|
|
public function setUploaded($flag_uploaded = true)
|
|
{
|
|
$this->flag_uploaded = $flag_uploaded;
|
|
return $this;
|
|
}
|
|
|
|
public function isUploaded()
|
|
{
|
|
return $this->flag_uploaded;
|
|
}
|
|
|
|
public function setError($error)
|
|
{
|
|
$this->error = $error;
|
|
return $this;
|
|
}
|
|
|
|
public function getError()
|
|
{
|
|
return $this->error;
|
|
}
|
|
}
|