2 namespace Config\Entity;
4 use Doctrine\ORM\Mapping as ORM;
9 * Dynamic application configuration data.
11 * @ORM\Table(name="app_config")
17 * Can archive records.
19 const ARCHIVE = false;
21 * Pull Synchronization Strategy for this table.
23 const PULL_SYNCH_STRATEGY = false;
25 * Push Synchronization Strategy for this table.
27 const PUSH_SYNCH_STRATEGY = false;
32 * @ORM\Column(type="integer");
33 * @ORM\GeneratedValue(strategy="AUTO")
38 * @ORM\Column(type="string", length=25, nullable=true, name="date_format")
40 protected $dateFormat;
43 * @ORM\Column(type="string", length=25, nullable=true, name="datetime_format")
45 protected $dateTimeFormat;
48 * @ORM\Column(type="string", length=25, nullable=true, name="time_format")
50 protected $timeFormat;
53 * @ORM\Column(type="string", length=50, nullable=true, name="excel_currency_format")
55 protected $excelCurrencyFormat;
58 * @ORM\Column(type="string", length=5, nullable=true, name="currency_prefix")
60 protected $currencyPrefix;
63 * @ORM\Column(type="decimal", scale=2, precision=5, nullable=false, name="vat_percentage", options={"unsigned"=true});
65 protected $vatPercentage = 0.0;
68 * @ORM\Column(type="string", length=250, nullable=true, name="source_email_address")
70 protected $sourceEmailAddress;
73 * @ORM\Column(type="string", length=20, nullable=true, name="source_mobile_address")
75 protected $sourceMobileAddress;
78 * @ORM\Column(type="string", length=250, nullable=true, name="admin_email_address")
80 protected $adminEmailAddress;
83 * @ORM\Column(type="boolean", name="sms_new_pin");
85 protected $smsNewPin = false;
88 * @ORM\Column(type="boolean", name="sms_customer_valuation");
90 protected $smsCustomerValuation = false;
93 * @ORM\Column(type="smallint", nullable=true, name="price_guide_open_days")
95 protected $priceGuideOpenDays;
98 * @ORM\Column(type="smallint", nullable=true, name="price_guide_completion_days")
100 protected $priceGuideCompletionDays;
103 * @ORM\Column(type="smallint", nullable=true, name="auction_max_days")
105 protected $auctionMaxDays;
108 * @ORM\ManyToOne(targetEntity="\User\Entity\Permissions")
109 * @ORM\JoinColumn(nullable=false, name="profile_permissions_id")
111 protected $defaultPermissions;
114 * @ORM\Column(type="decimal", scale=2, precision=5, nullable=false, name="app_version", options={"unsigned"=true});
116 protected $appVersion = 1.0;
121 * Magic getter to expose protected properties.
122 * @param string $property
125 public function __get($property)
127 if ('jobState' == $property)
131 return $this->$property;
135 * Magic setter to save protected properties.
136 * @param string $property
137 * @param mixed $value
139 public function __set($property, $value)
141 $this->$property = $value;
145 * Convert the object to an array.
146 * @param array $expand
147 * @param array $intersect
150 public function toArray()
153 'dateFormat' => $this->dateFormat,
154 'dateTimeFormat' => $this->dateTimeFormat,
155 'timeFormat' => $this->timeFormat,
156 'excelCurrencyFormat' => $this->excelCurrencyFormat,
157 'currencyPrefix' => $this->currencyPrefix,
158 'vatPercentage' => $this->vatPercentage,
159 'sourceEmailAddress' => $this->sourceEmailAddress,
160 'sourceMobileAddress' => $this->sourceMobileAddress,
161 'adminEmailAddress' => $this->adminEmailAddress,
162 'smsNewPin' => $this->smsNewPin,
163 'smsCustomerValuation' => $this->smsCustomerValuation,
164 'priceGuideOpenDays' => $this->priceGuideOpenDays,
165 'priceGuideCompletionDays' => $this->priceGuideCompletionDays,
166 'auctionMaxDays' => $this->auctionMaxDays,
167 'appVersion' => $this->appVersion,
168 'defaultPermissions' => !is_null($this->defaultPermissions)
169 ? $this->defaultPermissions->toArray()
175 * Populate from an array.
178 public function fromArray($data = array())
181 && $this->id = $data['id'];
182 isset($data['dateFormat'])
183 && $this->dateFormat = $data['dateFormat'];
184 isset($data['dateTimeFormat'])
185 && $this->dateTimeFormat = $data['dateTimeFormat'];
186 isset($data['timeFormat'])
187 && $this->timeFormat = $data['timeFormat'];
188 isset($data['excelCurrencyFormat'])
189 && $this->excelCurrencyFormat = $data['excelCurrencyFormat'];
190 isset($data['currencyPrefix'])
191 && $this->currencyPrefix = $data['currencyPrefix'];
192 isset($data['vatPercentage'])
193 && $this->vatPercentage = $data['vatPercentage'];
194 isset($data['sourceEmailAddress'])
195 && $this->sourceEmailAddress = $data['sourceEmailAddress'];
196 isset($data['sourceMobileAddress'])
197 && $this->sourceMobileAddress = $data['sourceMobileAddress'];
198 isset($data['adminEmailAddress'])
199 && $this->adminEmailAddress = $data['adminEmailAddress'];
200 isset($data['smsNewPin'])
201 && $this->smsNewPin = $data['smsNewPin'];
202 isset($data['smsCustomerValuation'])
203 && $this->smsCustomerValuation = $data['smsCustomerValuation'];
204 isset($data['priceGuideOpenDays'])
205 && $this->priceGuideOpenDays = $data['priceGuideOpenDays'];
206 isset($data['priceGuideCompletionDays'])
207 && $this->priceGuideCompletionDays = $data['priceGuideCompletionDays'];
208 isset($data['auctionMaxDays'])
209 && $this->auctionMaxDays = $data['auctionMaxDays'];
210 isset($data['appVersion'])
211 && $this->appVersion = $data['appVersion'];
212 isset($data['defaultPermissions'])
213 && $this->defaultPermissions = $data['defaultPermissions'];