source: trunk/Modules/Network/NetworkModels.php@ 911

Last change on this file since 911 was 911, checked in by chronos, 3 years ago
  • Modified: Record also remote signal for wireless clients.
File size: 9.1 KB
Line 
1<?php
2
3class NetworkDomainAlias extends Model
4{
5 static function GetModelDesc(): ModelDesc
6 {
7 $Desc = new ModelDesc(self::GetClassName());
8 $Desc->AddString('Name');
9 $Desc->AddString('Target');
10 $Desc->AddString('Comment');
11 $Desc->AddReference('Domain', 'NetworkDomain');
12 return $Desc;
13 }
14}
15
16class NetworkDevice extends Model
17{
18 static function GetModelDesc(): ModelDesc
19 {
20 $Desc = new ModelDesc(self::GetClassName());
21 $Desc->AddString('Name');
22 $Desc->AddReference('Type', NetworkDeviceType::GetClassName());
23 $Desc->AddReference('Location', Member::GetClassName());
24 $Desc->AddReference('Service', ServiceCustomerRel::GetClassName());
25 $Desc->AddBoolean('Used');
26 $Desc->AddBoolean('Online');
27 $Desc->AddDateTime('LastOnline');
28 $Desc->AddBoolean('PermanentOnline');
29 $Desc->AddReference('MapPosition', MapPosition::GetClassName());
30 $Desc->AddReference('Product', Product::GetClassName());
31 $Desc->AddString('LoginName');
32 $Desc->AddString('LoginPassword');
33 $Desc->AddReference('API', DeviceAPIType::GetClassName());
34 $Desc->AddInteger('InboundNATPriority');
35 return $Desc;
36 }
37}
38
39class NetworkDeviceType extends Model
40{
41 static function GetModelDesc(): ModelDesc
42 {
43 $Desc = new ModelDesc(self::GetClassName());
44 $Desc->AddString('Name');
45 $Desc->AddBoolean('ShowOnline');
46 $Desc->AddString('IconName');
47 return $Desc;
48 }
49}
50
51class NetworkDeviceLog extends Model
52{
53 static function GetModelDesc(): ModelDesc
54 {
55 $Desc = new ModelDesc(self::GetClassName());
56 $Desc->AddDateTime('Time');
57 $Desc->AddReference('Device', NetworkDevice::GetClassName());
58 $Desc->AddString('Message');
59 $Desc->AddString('Tags');
60 return $Desc;
61 }
62}
63
64class NetworkInterface extends Model
65{
66 static function GetModelDesc(): ModelDesc
67 {
68 $Desc = new ModelDesc(self::GetClassName());
69 $Desc->AddString('Name');
70 $Desc->AddReference('Type', NetworkInterfaceType::GetClassName());
71 $Desc->AddString('MAC');
72 $Desc->AddString('LocalIP');
73 $Desc->AddString('IPv6');
74 $Desc->AddString('ExternalIP');
75 $Desc->AddReference('Device', NetworkDevice::GetClassName());
76 $Desc->AddBoolean('Enabled');
77 $Desc->AddBoolean('Online');
78 $Desc->AddDateTime('LastOnline');
79 return $Desc;
80 }
81}
82
83class NetworkInterfaceType extends Model
84{
85 static function GetModelDesc(): ModelDesc
86 {
87 $Desc = new ModelDesc(self::GetClassName());
88 $Desc->AddString('Name');
89 $Desc->AddInteger('MaxSpeed');
90 $Desc->AddBoolean('FullDuplex');
91 $Desc->AddString('Color');
92 return $Desc;
93 }
94}
95
96class NetworkSubnet extends Model
97{
98 static function GetModelDesc(): ModelDesc
99 {
100 $Desc = new ModelDesc(self::GetClassName());
101 $Desc->AddString('Name');
102 $Desc->AddString('AddressRange');
103 $Desc->AddInteger('Mask');
104 $Desc->AddString('DHCP');
105 $Desc->AddString('Gateway');
106 $Desc->AddString('WINS');
107 $Desc->AddString('DNS');
108 $Desc->AddString('Domain');
109 $Desc->AddString('NTP');
110 $Desc->AddReference('Member', Member::GetClassName());
111 $Desc->AddReference('Service', ServiceCustomerRel::GetClassName());
112 $Desc->AddString('ExtAddressRange');
113 $Desc->AddString('ExtMask');
114 $Desc->AddString('AddressRangeIPv6');
115 $Desc->AddInteger('MaskIPv6');
116 $Desc->AddInteger('Configure');
117 return $Desc;
118 }
119}
120
121class NetworkPort extends Model
122{
123 static function GetModelDesc(): ModelDesc
124 {
125 $Desc = new ModelDesc(self::GetClassName());
126 $Desc->AddString('Name');
127 $Desc->AddInteger('Protocol');
128 $Desc->AddInteger('Number');
129 $Desc->AddReference('Interface', NetworkInterface::GetClassName());
130 $Desc->AddBoolean('Enabled');
131 $Desc->AddBoolean('Online');
132 $Desc->AddDateTime('LastOnline');
133 return $Desc;
134 }
135}
136
137class NetworkSpeedLimit extends Model
138{
139 static function GetModelDesc(): ModelDesc
140 {
141 $Desc = new ModelDesc(self::GetClassName());
142 $Desc->AddString('Name');
143 $Desc->AddInteger('SpeedMaxOut');
144 $Desc->AddInteger('SpeedMaxIn');
145 $Desc->AddReference('Parent', NetworkSpeedLimit::GetClassName());
146 return $Desc;
147 }
148}
149
150class NetworkInterfaceLatency extends Model
151{
152 static function GetModelDesc(): ModelDesc
153 {
154 $Desc = new ModelDesc(self::GetClassName());
155 $Desc->AddDateTime('Time');
156 $Desc->AddReference('Interface', NetworkInterface::GetClassName());
157 $Desc->AddFloat('Value');
158 return $Desc;
159 }
160}
161
162class NetworkLink extends Model
163{
164 static function GetModelDesc(): ModelDesc
165 {
166 $Desc = new ModelDesc(self::GetClassName());
167 $Desc->AddReference('Type', NetworkLinkType::GetClassName());
168 $Desc->AddReference('Interface1', NetworkInterface::GetClassName());
169 $Desc->AddReference('Interface2', NetworkInterface::GetClassName());
170 return $Desc;
171 }
172}
173
174class NetworkLinkType extends Model
175{
176 static function GetModelDesc(): ModelDesc
177 {
178 $Desc = new ModelDesc(self::GetClassName());
179 $Desc->AddString('Name');
180 $Desc->AddInteger('MaxLinkSpeed');
181 $Desc->AddInteger('MaxRealSpeed');
182 $Desc->AddBoolean('FullDuplex');
183 $Desc->AddString('Color');
184 return $Desc;
185 }
186}
187
188class NetworkSignal extends Model
189{
190 static function GetModelDesc(): ModelDesc
191 {
192 $Desc = new ModelDesc(self::GetClassName());
193 $Desc->AddDateTime('Time');
194 $Desc->AddString('MAC');
195 $Desc->AddReference('Interface', NetworkInterface::GetClassName());
196 $Desc->AddInteger('Value');
197 $Desc->AddInteger('Remote');
198 $Desc->AddInteger('RateRx');
199 $Desc->AddInteger('RateTx');
200 $Desc->AddReference('Device', NetworkDevice::GetClassName());
201 return $Desc;
202 }
203}
204
205class NetworkAddressCategory extends Model
206{
207 static function GetModelDesc(): ModelDesc
208 {
209 $Desc = new ModelDesc(self::GetClassName());
210 $Desc->AddString('Name');
211 return $Desc;
212 }
213}
214
215class NetworkDomain extends Model
216{
217 static function GetModelDesc(): ModelDesc
218 {
219 $Desc = new ModelDesc(self::GetClassName());
220 $Desc->AddString('Name');
221 $Desc->AddReference('Parent', NetworkDomain::GetClassName());
222 $Desc->AddString('Description');
223 $Desc->AddInteger('Serial');
224 $Desc->AddInteger('Minimum');
225 $Desc->AddInteger('Retry');
226 $Desc->AddInteger('Expire');
227 $Desc->AddInteger('Refresh');
228 $Desc->AddInteger('TTL');
229 return $Desc;
230 }
231}
232
233class NetworkDomainServer extends Model
234{
235 static function GetModelDesc(): ModelDesc
236 {
237 $Desc = new ModelDesc(self::GetClassName());
238 $Desc->AddString('Address');
239 $Desc->AddReference('Domain', NetworkDomain::GetClassName());
240 $Desc->AddInteger('Sequence');
241 return $Desc;
242 }
243}
244
245class NetworkDomainView extends Model
246{
247 static function GetModelDesc(): ModelDesc
248 {
249 $Desc = new ModelDesc(self::GetClassName());
250 $Desc->AddString('Name');
251 $Desc->AddString('SysName');
252 $Desc->AddReference('Device', NetworkDevice::GetClassName());
253 $Desc->AddString('AddressRange');
254 return $Desc;
255 }
256}
257
258class NetworkDomainItemFilter extends Model
259{
260 static function GetModelDesc(): ModelDesc
261 {
262 $Desc = new ModelDesc(self::GetClassName());
263 $Desc->AddString('Name');
264 $Desc->AddReference('Device', NetworkDevice::GetClassName());
265 $Desc->AddReference('AddressCategory', NetworkAddressCategory::GetClassName());
266 $Desc->AddString('Suffix');
267 $Desc->AddReference('View', NetworkDomainView::GetClassName());
268 $Desc->AddString('AddressRange');
269 return $Desc;
270 }
271}
272
273class DeviceAPIType extends Model
274{
275 static function GetModelDesc(): ModelDesc
276 {
277 $Desc = new ModelDesc(self::GetClassName());
278 $Desc->AddString('Name');
279 return $Desc;
280 }
281}
282
283class NetworkInterfaceWireless extends Model
284{
285 static function GetModelDesc(): ModelDesc
286 {
287 $Desc = new ModelDesc(self::GetClassName());
288 $Desc->AddString('SSID');
289 $Desc->AddString('MAC');
290 $Desc->AddReference('NetworkInterface', NetworkInterface::GetClassName());
291 $Desc->AddInteger('TxPower');
292 $Desc->AddInteger('CableAttenuation');
293 $Desc->AddReference('Antenna', Product::GetClassName());
294 $Desc->AddInteger('AntennaGain');
295 $Desc->AddInteger('AntennaPolarity');
296 $Desc->AddFloat('Frequency');
297 $Desc->AddInteger('ChannelWidthLower');
298 $Desc->AddInteger('ChannelWidth');
299 $Desc->AddInteger('ChannelWidthUpper');
300 $Desc->AddInteger('Mode');
301 $Desc->AddString('Description');
302 return $Desc;
303 }
304}
305
306class NetworkDeviceConfig extends Model
307{
308 static function GetModelDesc(): ModelDesc
309 {
310 $Desc = new ModelDesc(self::GetClassName());
311 $Desc->AddReference('Device', NetworkDevice::GetClassName());
312 $Desc->AddDate('Time');
313 $Desc->AddText('ConfigFull');
314 $Desc->AddText('ConfigCompact');
315 return $Desc;
316 }
317}
318
319class NetworkInterfaceUpDown extends Model
320{
321 static function GetModelDesc(): ModelDesc
322 {
323 $Desc = new ModelDesc(self::GetClassName());
324 $Desc->AddDateTime('Time');
325 $Desc->AddReference('Interface', NetworkInterface::GetClassName());
326 $Desc->AddInteger('State');
327 $Desc->AddInteger('Duration');
328 return $Desc;
329 }
330}
331
332class NetworkPortUpDown extends Model
333{
334 static function GetModelDesc(): ModelDesc
335 {
336 $Desc = new ModelDesc(self::GetClassName());
337 $Desc->AddDateTime('Time');
338 $Desc->AddReference('Port', NetworkPort::GetClassName());
339 $Desc->AddInteger('State');
340 $Desc->AddInteger('Duration');
341 return $Desc;
342 }
343}
Note: See TracBrowser for help on using the repository browser.