src/Entity/Notification.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * Notification.php
  4.  * Created by Stéphane Brun
  5.  * Date: 28/06/2018 at 14:20
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity()
  11.  * @ORM\Table(name="notification")
  12.  */
  13. class Notification
  14. {
  15.     const TYPE_IMPORT_FACTURES_FOURNISSEUR 'FACFOURIMP';
  16.     const TYPE_TRANSFERT 'TRANSFERT';
  17.     const TYPE_TRANSFERT_REFUSED 'TRANSFERTREFUSED';
  18.     const TYPE_CS_NEED 'CMDINWAIT';
  19.     const TYPE_CS_CLIENT_NEED 'CMDCLIENTINWAIT';
  20.     const TYPE_CS_CLIENT_READY 'CMDCLIENTINREADY';
  21.     const TYPE_CS_ONLINE_ORDER 'ONLINEORDER';
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     protected $id;
  28.     /**
  29.      * @ORM\Column(name="date", type="datetime")
  30.      */
  31.     protected $date;
  32.     /**
  33.      * @ORM\Column(name="expire", type="datetime")
  34.      */
  35.     protected $expire;
  36.     /**
  37.      * @ORM\Column(name="seen", type="boolean")
  38.      */
  39.     protected $seen;
  40.     /**
  41.      * @ORM\Column(name="message", type="text")
  42.      */
  43.     protected $message;
  44.     /**
  45.      * @ORM\Column(name="type", type="string", length=255)
  46.      */
  47.     protected $type;
  48.     /**
  49.      * has one SysUsers
  50.      *
  51.      * @ORM\ManyToOne(targetEntity="App\Entity\SysUsers")
  52.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  53.      */
  54.     protected $user;
  55.     /**
  56.      * has one SysUsers
  57.      *
  58.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  59.      * @ORM\JoinColumn(name="company", referencedColumnName="id")
  60.      */
  61.     protected $company;
  62.     /**
  63.      * @ORM\Column(name="action", type="string", length=255)
  64.      */
  65.     protected $action;
  66.     /**
  67.      * @ORM\Column(name="icon_class", type="string", length=255)
  68.      */
  69.     protected $iconClass;
  70.     /**
  71.      * @ORM\Column(name="icon_background_class", type="string", length=255)
  72.      */
  73.     protected $iconBackgroundClass;
  74.     public function __construct()
  75.     {
  76.         $this->date = new \DateTime();
  77.         $this->expire = new \DateTime("+1 week");
  78.         $this->seen false;
  79.     }
  80.     /**
  81.      * @return mixed
  82.      */
  83.     public function getId()
  84.     {
  85.         return $this->id;
  86.     }
  87.     /**
  88.      * @return \DateTime
  89.      */
  90.     public function getDate()
  91.     {
  92.         return $this->date;
  93.     }
  94.     /**
  95.      * @param \DateTime $date
  96.      * @return Notification
  97.      */
  98.     public function setDate(\DateTime $date)
  99.     {
  100.         $this->date $date;
  101.         return $this;
  102.     }
  103.     /**
  104.      * @return mixed
  105.      */
  106.     public function getMessage()
  107.     {
  108.         return $this->message;
  109.     }
  110.     /**
  111.      * @param mixed $message
  112.      * @return Notification
  113.      */
  114.     public function setMessage($message)
  115.     {
  116.         $this->message $message;
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return mixed
  121.      */
  122.     public function getType()
  123.     {
  124.         return $this->type;
  125.     }
  126.     /**
  127.      * @param mixed $type
  128.      * @return Notification
  129.      */
  130.     public function setType($type)
  131.     {
  132.         $this->type $type;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return SysUsers
  137.      */
  138.     public function getUser()
  139.     {
  140.         return $this->user;
  141.     }
  142.     /**
  143.      * @param SysUsers $user
  144.      * @return Notification
  145.      */
  146.     public function setUser(SysUsers $user)
  147.     {
  148.         $this->user $user;
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return \DateTime
  153.      */
  154.     public function getExpire()
  155.     {
  156.         return $this->expire;
  157.     }
  158.     /**
  159.      * @param \DateTime $expire
  160.      * @return Notification
  161.      */
  162.     public function setExpire(\DateTime $expire)
  163.     {
  164.         $this->expire $expire;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return mixed
  169.      */
  170.     public function getSeen()
  171.     {
  172.         return $this->seen;
  173.     }
  174.     /**
  175.      * @param mixed $seen
  176.      * @return Notification
  177.      */
  178.     public function setSeen($seen)
  179.     {
  180.         $this->seen $seen;
  181.         return $this;
  182.     }
  183.     /**
  184.      * @return Company
  185.      */
  186.     public function getCompany()
  187.     {
  188.         return $this->company;
  189.     }
  190.     /**
  191.      * @param Company $company
  192.      * @return Notification
  193.      */
  194.     public function setCompany($company)
  195.     {
  196.         $this->company $company;
  197.         return $this;
  198.     }
  199.     /**
  200.      * @return mixed
  201.      */
  202.     public function getAction()
  203.     {
  204.         return $this->action;
  205.     }
  206.     /**
  207.      * @param mixed $action
  208.      */
  209.     public function setAction($action)
  210.     {
  211.         $this->action $action;
  212.     }
  213.     /**
  214.      * @return mixed
  215.      */
  216.     public function getIconClass()
  217.     {
  218.         return $this->iconClass;
  219.     }
  220.     /**
  221.      * @param mixed $iconClass
  222.      */
  223.     public function setIconClass($iconClass)
  224.     {
  225.         $this->iconClass $iconClass;
  226.     }
  227.     /**
  228.      * @return mixed
  229.      */
  230.     public function getIconBackgroundClass()
  231.     {
  232.         return $this->iconBackgroundClass;
  233.     }
  234.     /**
  235.      * @param mixed $iconBackgroundClass
  236.      */
  237.     public function setIconBackgroundClass($iconBackgroundClass)
  238.     {
  239.         $this->iconBackgroundClass $iconBackgroundClass;
  240.     }
  241. }