zend-blog-3-backend
131 строка · 2.2 Кб
1<?php
2
3namespace App\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6
7/**
8* @ORM\Table(name="sys_parameters")
9* @ORM\Entity(repositoryClass="App\Repository\SystemParametersRepository")
10*/
11class SystemParameters
12{
13const DROPBOX_TOKEN = 'dropbox_token';
14const UPDATE_VIEW_COUNTS_FROM = 'upd_view_counts_from';
15const UPDATE_GEOLOCATION_FROM = 'upd_geolocation_from';
16const ERRORS_5XX_CHECK = 'errors_5xx_check';
17const TELEGRAM_UPDATES_CHECK = 'tg_updates_check';
18const UPDATE_VIEW_COUNTS_DATA = 'upd_view_counts_data';
19
20/**
21* @var int
22*
23* @ORM\Id
24* @ORM\Column(type="integer")
25* @ORM\GeneratedValue(strategy="AUTO")
26*/
27protected $id;
28
29/**
30* @var string
31*
32* @ORM\Column(name="optionkey", length=128, unique=true)
33*/
34protected $optionKey;
35
36/**
37* @var string
38*
39* @ORM\Column(type="text")
40*/
41protected $value;
42
43/**
44* @var bool
45*
46* @ORM\Column(type="boolean")
47*/
48protected $encrypted = false;
49
50/**
51* Get id
52*
53* @return int
54*/
55public function getId()
56{
57return $this->id;
58}
59
60/**
61* Set optionKey
62*
63* @param string $optionKey
64*
65* @return SystemParameters
66*/
67public function setOptionKey($optionKey)
68{
69$this->optionKey = $optionKey;
70
71return $this;
72}
73
74/**
75* Get optionKey
76*
77* @return string
78*/
79public function getOptionKey()
80{
81return $this->optionKey;
82}
83
84/**
85* Set value
86*
87* @param string $value
88*
89* @return SystemParameters
90*/
91public function setValue($value)
92{
93$this->value = $value;
94
95return $this;
96}
97
98/**
99* Get value
100*
101* @return string
102*/
103public function getValue()
104{
105return $this->value;
106}
107
108/**
109* Set encrypted
110*
111* @param bool $encrypted
112*
113* @return SystemParameters
114*/
115public function setEncrypted(bool $encrypted)
116{
117$this->encrypted = $encrypted;
118
119return $this;
120}
121
122/**
123* Is encrypted
124*
125* @return bool
126*/
127public function isEncrypted(): bool
128{
129return $this->encrypted;
130}
131}
132