<?php
/**
* Notification.php
* Created by Stéphane Brun
* Date: 28/06/2018 at 14:20
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
* @ORM\Table(name="notification")
*/
class Notification
{
const TYPE_IMPORT_FACTURES_FOURNISSEUR = 'FACFOURIMP';
const TYPE_TRANSFERT = 'TRANSFERT';
const TYPE_TRANSFERT_REFUSED = 'TRANSFERTREFUSED';
const TYPE_CS_NEED = 'CMDINWAIT';
const TYPE_CS_CLIENT_NEED = 'CMDCLIENTINWAIT';
const TYPE_CS_CLIENT_READY = 'CMDCLIENTINREADY';
const TYPE_CS_ONLINE_ORDER = 'ONLINEORDER';
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="date", type="datetime")
*/
protected $date;
/**
* @ORM\Column(name="expire", type="datetime")
*/
protected $expire;
/**
* @ORM\Column(name="seen", type="boolean")
*/
protected $seen;
/**
* @ORM\Column(name="message", type="text")
*/
protected $message;
/**
* @ORM\Column(name="type", type="string", length=255)
*/
protected $type;
/**
* has one SysUsers
*
* @ORM\ManyToOne(targetEntity="App\Entity\SysUsers")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
protected $user;
/**
* has one SysUsers
*
* @ORM\ManyToOne(targetEntity="App\Entity\Company")
* @ORM\JoinColumn(name="company", referencedColumnName="id")
*/
protected $company;
/**
* @ORM\Column(name="action", type="string", length=255)
*/
protected $action;
/**
* @ORM\Column(name="icon_class", type="string", length=255)
*/
protected $iconClass;
/**
* @ORM\Column(name="icon_background_class", type="string", length=255)
*/
protected $iconBackgroundClass;
public function __construct()
{
$this->date = new \DateTime();
$this->expire = new \DateTime("+1 week");
$this->seen = false;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return \DateTime
*/
public function getDate()
{
return $this->date;
}
/**
* @param \DateTime $date
* @return Notification
*/
public function setDate(\DateTime $date)
{
$this->date = $date;
return $this;
}
/**
* @return mixed
*/
public function getMessage()
{
return $this->message;
}
/**
* @param mixed $message
* @return Notification
*/
public function setMessage($message)
{
$this->message = $message;
return $this;
}
/**
* @return mixed
*/
public function getType()
{
return $this->type;
}
/**
* @param mixed $type
* @return Notification
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* @return SysUsers
*/
public function getUser()
{
return $this->user;
}
/**
* @param SysUsers $user
* @return Notification
*/
public function setUser(SysUsers $user)
{
$this->user = $user;
return $this;
}
/**
* @return \DateTime
*/
public function getExpire()
{
return $this->expire;
}
/**
* @param \DateTime $expire
* @return Notification
*/
public function setExpire(\DateTime $expire)
{
$this->expire = $expire;
return $this;
}
/**
* @return mixed
*/
public function getSeen()
{
return $this->seen;
}
/**
* @param mixed $seen
* @return Notification
*/
public function setSeen($seen)
{
$this->seen = $seen;
return $this;
}
/**
* @return Company
*/
public function getCompany()
{
return $this->company;
}
/**
* @param Company $company
* @return Notification
*/
public function setCompany($company)
{
$this->company = $company;
return $this;
}
/**
* @return mixed
*/
public function getAction()
{
return $this->action;
}
/**
* @param mixed $action
*/
public function setAction($action)
{
$this->action = $action;
}
/**
* @return mixed
*/
public function getIconClass()
{
return $this->iconClass;
}
/**
* @param mixed $iconClass
*/
public function setIconClass($iconClass)
{
$this->iconClass = $iconClass;
}
/**
* @return mixed
*/
public function getIconBackgroundClass()
{
return $this->iconBackgroundClass;
}
/**
* @param mixed $iconBackgroundClass
*/
public function setIconBackgroundClass($iconBackgroundClass)
{
$this->iconBackgroundClass = $iconBackgroundClass;
}
}