4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::olt_site - Object methods for olt_site records
15 $record = new FS::olt_site \%hash;
16 $record = new FS::olt_site { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::olt_site object represents a central office housing Optical Line
29 Terminals (L<FS::fiber_olt>). FS::olt_site inherits from
30 FS::Record. The following fields are currently supported:
34 =item sitenum - primary key
36 =item market - market designator, indicating the general area the site serves
38 =item site - site designator
48 Creates a new record. To add the record to the database, see L<"insert">.
52 sub table { 'olt_site'; }
56 Adds this record to the database. If there is an error, returns the error,
57 otherwise returns false.
61 Delete this record from the database.
63 =item replace OLD_RECORD
65 Replaces the OLD_RECORD with this one in the database. If there is an error,
66 returns the error, otherwise returns false.
70 Checks all fields to make sure this is a valid example. If there is
71 an error, returns the error, otherwise returns false. Called by the insert
76 # the check method should currently be supplied - FS::Record contains some
77 # data checking routines
83 $self->ut_numbern('sitenum')
84 || $self->ut_text('market')
85 || $self->ut_text('site')
87 return $error if $error;
94 return $self->market . '/' . $self->site;
101 L<FS::Record>, L<FS::fiber_olt>