summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-10-23 01:53:03 -0700
committerIvan Kohler <ivan@freeside.biz>2013-10-23 01:53:03 -0700
commit822d38841a1620b8b8e8c5ac4102ad64de9ae17f (patch)
tree54242a812e185d34b2382ada10522eba827cef34 /FS/FS
parentcc58d576f8c2da6d01751ca3234b6a1ec11db358 (diff)
add more fields to towers and sectors, RT#16372
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/Schema.pm25
-rw-r--r--FS/FS/tower.pm7
-rw-r--r--FS/FS/tower_sector.pm5
3 files changed, 29 insertions, 8 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 3029ab5..cbb50e0 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -3103,14 +3103,17 @@ sub tables_hashref {
'tower' => {
'columns' => [
- 'towernum', 'serial', '', '', '', '',
- #'agentnum', 'int', 'NULL', '', '', '',
- 'towername', 'varchar', '', $char_d, '', '',
- 'disabled', 'char', 'NULL', 1, '', '',
- 'latitude', 'decimal', 'NULL', '10,7', '', '',
- 'longitude','decimal', 'NULL', '10,7', '', '',
- 'altitude', 'decimal', 'NULL', '', '', '',
- 'coord_auto', 'char', 'NULL', 1, '', '',
+ 'towernum', 'serial', '', '', '', '',
+ #'agentnum', 'int', 'NULL', '', '', '',
+ 'towername', 'varchar', '', $char_d, '', '',
+ 'disabled', 'char', 'NULL', 1, '', '',
+ 'latitude', 'decimal', 'NULL', '10,7', '', '',
+ 'longitude', 'decimal', 'NULL', '10,7', '', '',
+ 'coord_auto', 'char', 'NULL', 1, '', '',
+ 'altitude', 'decimal', 'NULL', '', '', '',
+ 'height', 'decimal', 'NULL', '', '', '',
+ 'veg_height', 'decimal', 'NULL', '', '', '',
+ 'color', 'varchar', 'NULL', 6, '', '',
],
'primary_key' => 'towernum',
'unique' => [ [ 'towername' ] ], # , 'agentnum' ] ],
@@ -3123,6 +3126,12 @@ sub tables_hashref {
'towernum', 'int', '', '', '', '',
'sectorname', 'varchar', '', $char_d, '', '',
'ip_addr', 'varchar', 'NULL', 15, '', '',
+ 'height', 'decimal', 'NULL', '', '', '',
+ 'freq_mhz', 'int', 'NULL', '', '', '',
+ 'direction', 'int', 'NULL', '', '', '',
+ 'width', 'int', 'NULL', '', '', '',
+ #downtilt etc? rfpath has profile files for devices/antennas you upload?
+ 'range', 'decimal', 'NULL', '', '', '', #?
],
'primary_key' => 'sectornum',
'unique' => [ [ 'towernum', 'sectorname' ], [ 'ip_addr' ], ],
diff --git a/FS/FS/tower.pm b/FS/FS/tower.pm
index 052836e..5497c72 100644
--- a/FS/FS/tower.pm
+++ b/FS/FS/tower.pm
@@ -90,6 +90,13 @@ sub check {
$self->ut_numbern('towernum')
|| $self->ut_text('towername')
|| $self->ut_enum('disabled', [ '', 'Y' ])
+ || $self->ut_coordn('latitude')
+ || $self->ut_coordn('longitude')
+ || $self->ut_enum('coord_auto', [ '', 'Y' ])
+ || $self->ut_floatn('altitude')
+ || $self->ut_floatn('height')
+ || $self->ut_floatn('veg_height')
+ || $self->ut_alphan('color')
;
return $error if $error;
diff --git a/FS/FS/tower_sector.pm b/FS/FS/tower_sector.pm
index 3605190..70642fb 100644
--- a/FS/FS/tower_sector.pm
+++ b/FS/FS/tower_sector.pm
@@ -108,6 +108,11 @@ sub check {
|| $self->ut_number('towernum', 'tower', 'towernum')
|| $self->ut_text('sectorname')
|| $self->ut_textn('ip_addr')
+ || $self->ut_floatn('height')
+ || $self->ut_numbern('freq_mhz')
+ || $self->ut_numbern('direction')
+ || $self->ut_numbern('width')
+ || $self->ut_floatn('range')
;
return $error if $error;