Git Repository Public Repository

namibia

URLs

Copy to Clipboard
 
d75656fdd5ef8208fd3f1e23f8627917529275c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?php
namespace Config\Entity;

use Doctrine\ORM\Mapping as ORM;



/**
 * Dynamic application configuration data.
 * @ORM\Entity
 * @ORM\Table(name="app_config")
 */
class Config
{

	/**
	 * Can archive records.
	 */
	const ARCHIVE = false;
	/**
	 * Pull Synchronization Strategy for this table.
	 */
	const PULL_SYNCH_STRATEGY = false;
	/**
	 * Push Synchronization Strategy for this table.
	 */
	const PUSH_SYNCH_STRATEGY = false;


	/**
	 * @ORM\Id
	 * @ORM\Column(type="integer");
	 * @ORM\GeneratedValue(strategy="AUTO")
	 */
	protected $id;

	/**
	 * @ORM\Column(type="string", length=25, nullable=true, name="date_format")
	 */
	protected $dateFormat;

	/**
	 * @ORM\Column(type="string", length=25, nullable=true, name="datetime_format")
	 */
	protected $dateTimeFormat;

	/**
	 * @ORM\Column(type="string", length=25, nullable=true, name="time_format")
	 */
	protected $timeFormat;

	/**
	 * @ORM\Column(type="string", length=50, nullable=true, name="excel_currency_format")
	 */
	protected $excelCurrencyFormat;

	/**
	 * @ORM\Column(type="string", length=5, nullable=true, name="currency_prefix")
	 */
	protected $currencyPrefix;

	/**
	 * @ORM\Column(type="decimal", scale=2, precision=5, nullable=false, name="vat_percentage", options={"unsigned"=true});
	 */
	protected $vatPercentage = 0.0;

	/**
	 * @ORM\Column(type="string", length=250, nullable=true, name="source_email_address")
	 */
	protected $sourceEmailAddress;

	/**
	 * @ORM\Column(type="string", length=20, nullable=true, name="source_mobile_address")
	 */
	protected $sourceMobileAddress;

	/**
	 * @ORM\Column(type="string", length=250, nullable=true, name="admin_email_address")
	 */
	protected $adminEmailAddress;

	/**
	 * @ORM\Column(type="boolean", name="sms_new_pin");
	 */
	protected $smsNewPin = true;

	/**
	 * @ORM\Column(type="boolean", name="sms_customer_valuation");
	 */
	protected $smsCustomerValuation = false;

	/**
	 * @ORM\Column(type="smallint", nullable=true, name="price_guide_open_days")
	 */
	protected $priceGuideOpenDays;

	/**
	 * @ORM\Column(type="smallint", nullable=true, name="price_guide_completion_days")
	 */
	protected $priceGuideCompletionDays;

	/**
	 * @ORM\Column(type="smallint", nullable=true, name="auction_max_days")
	 */
	protected $auctionMaxDays;

	/**
	 * @ORM\ManyToOne(targetEntity="\User\Entity\Permissions")
	 * @ORM\JoinColumn(nullable=false, name="profile_permissions_id")
	 **/
	protected $defaultPermissions;

	/**
	 * @ORM\Column(type="decimal", scale=2, precision=5, nullable=false, name="app_version", options={"unsigned"=true});
	 */
	protected $appVersion = 1.0;



	/**
	 * Magic getter to expose protected properties.
	 * @param string $property
	 * @return mixed
	 */
	public function __get($property)
	{
		if ('jobState' == $property)
		{
			return 'Active';
		}
		return $this->$property;
	}

	/**
	 * Magic setter to save protected properties.
	 * @param string $property
	 * @param mixed $value
	 */
	public function __set($property, $value)
	{
		$this->$property = $value;
	}

	/**
	 * Convert the object to an array.
	 * @param array $expand
	 * @param array $intersect
	 * @return array
	 */
	public function toArray()
	{
		return array(
				'dateFormat'               => $this->dateFormat,
				'dateTimeFormat'           => $this->dateTimeFormat,
				'timeFormat'               => $this->timeFormat,
				'excelCurrencyFormat'      => $this->excelCurrencyFormat,
				'currencyPrefix'           => $this->currencyPrefix,
				'vatPercentage'            => $this->vatPercentage,
				'sourceEmailAddress'       => $this->sourceEmailAddress,
				'sourceMobileAddress'      => $this->sourceMobileAddress,
				'adminEmailAddress'        => $this->adminEmailAddress,
				'smsNewPin'                => $this->smsNewPin,
				'smsCustomerValuation'     => $this->smsCustomerValuation,
				'priceGuideOpenDays'       => $this->priceGuideOpenDays,
				'priceGuideCompletionDays' => $this->priceGuideCompletionDays,
				'auctionMaxDays'           => $this->auctionMaxDays,
				'appVersion'               => $this->appVersion,
				'defaultPermissions'       => !is_null($this->defaultPermissions)
					? $this->defaultPermissions->toArray()
					: array()
		);
	}

	/**
	 * Populate from an array.
	 * @param array $data
	 */
	public function fromArray($data = array())
	{
		isset($data['id'])
			&& $this->id = $data['id'];
		isset($data['dateFormat'])
			&& $this->dateFormat  = $data['dateFormat'];
		isset($data['dateTimeFormat'])
			&& $this->dateTimeFormat  = $data['dateTimeFormat'];
		isset($data['timeFormat'])
			&& $this->timeFormat  = $data['timeFormat'];
		isset($data['excelCurrencyFormat'])
			&& $this->excelCurrencyFormat  = $data['excelCurrencyFormat'];
		isset($data['currencyPrefix'])
			&& $this->currencyPrefix  = $data['currencyPrefix'];
		isset($data['vatPercentage'])
			&& $this->vatPercentage  = $data['vatPercentage'];
		isset($data['sourceEmailAddress'])
			&& $this->sourceEmailAddress  = $data['sourceEmailAddress'];
		isset($data['sourceMobileAddress'])
			&& $this->sourceMobileAddress  = $data['sourceMobileAddress'];
		isset($data['adminEmailAddress'])
			&& $this->adminEmailAddress  = $data['adminEmailAddress'];
		isset($data['smsNewPin'])
			&& $this->smsNewPin  = $data['smsNewPin'];
		isset($data['smsCustomerValuation'])
			&& $this->smsCustomerValuation  = $data['smsCustomerValuation'];
		isset($data['priceGuideOpenDays'])
			&& $this->priceGuideOpenDays  = $data['priceGuideOpenDays'];
		isset($data['priceGuideCompletionDays'])
			&& $this->priceGuideCompletionDays  = $data['priceGuideCompletionDays'];
		isset($data['auctionMaxDays'])
			&& $this->auctionMaxDays  = $data['auctionMaxDays'];
		isset($data['appVersion'])
			&& $this->appVersion  = $data['appVersion'];
		isset($data['defaultPermissions'])
			&& $this->defaultPermissions  = $data['defaultPermissions'];
	}

}

Commits for namibiamodule/Config/src/Config/Entity/Config.php

Diff revisions: vs.
Revision Author Commited Message
d75656 ... Diff Diff Mark Fri 23 Dec, 2016 12:57:45 +0000

sms erros on pin reset

df0489 ... Mark Fri 14 Oct, 2016 10:01:00 +0000

initial commit