1 package FS::alarm_station;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
10 FS::alarm_station - Object methods for alarm_station records
14 use FS::alarm_station;
16 $record = new FS::alarm_station \%hash;
17 $record = new FS::alarm_station { 'column' => 'value' };
19 $error = $record->insert;
21 $error = $new_record->replace($old_record);
23 $error = $record->delete;
25 $error = $record->check;
29 An FS::alarm_station object represents an alarm system central station.
30 FS::alarm_station inherits from FS::Record. The following fields are currently
60 Creates a new central station. To add the central station to the database, see
63 Note that this stores the hash reference, not a distinct copy of the hash it
64 points to. You can ask the object for a copy with the I<hash> method.
68 sub table { 'alarm_station'; }
72 Adds this record to the database. If there is an error, returns the error,
73 otherwise returns false.
77 Delete this record from the database.
79 =item replace OLD_RECORD
81 Replaces the OLD_RECORD with this one in the database. If there is an error,
82 returns the error, otherwise returns false.
86 Checks all fields to make sure this is a valid central station. If there is
87 an error, returns the error, otherwise returns false. Called by the insert
96 $self->ut_numbern('alarmstationnum')
97 || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
98 || $self->ut_text('stationname')
99 || $self->ut_enum('disabled', ['', 'Y'])
101 return $error if $error;
112 L<FS::svc_alarm>, L<FS::Record>