1 package FS::svc_export_machine;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearchs ); #qsearch );
8 use FS::part_export_machine;
10 sub _svc_child_partfields { ('exportnum') };
14 FS::svc_export_machine - Object methods for svc_export_machine records
18 use FS::svc_export_machine;
20 $record = new FS::svc_export_machine \%hash;
21 $record = new FS::svc_export_machine { 'column' => 'value' };
23 $error = $record->insert;
25 $error = $new_record->replace($old_record);
27 $error = $record->delete;
29 $error = $record->check;
33 An FS::svc_export_machine object represents a customer service export
34 hostname. FS::svc_export_machine inherits from FS::Record. The following
35 fields are currently supported:
39 =item svcexportmachinenum
45 Customer service, see L<FS::cust_svc>
49 Export hostname, see L<FS::part_export_machine>
59 Creates a new record. To add the record to the database, see L<"insert">.
61 Note that this stores the hash reference, not a distinct copy of the hash it
62 points to. You can ask the object for a copy with the I<hash> method.
66 sub table { 'svc_export_machine'; }
70 Adds this record to the database. If there is an error, returns the error,
71 otherwise returns false.
75 Delete this record from the database.
77 =item replace OLD_RECORD
79 Replaces the OLD_RECORD with this one in the database. If there is an error,
80 returns the error, otherwise returns false.
84 Checks all fields to make sure this is a valid record. If there is
85 an error, returns the error, otherwise returns false. Called by the insert
94 $self->ut_numbern('svcexportmachinenum')
95 || $self->ut_foreign_key('svcnum', 'cust_svc', 'svcnum' )
96 || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum' )
97 || $self->ut_foreign_key('machinenum', 'part_export_machine', 'machinenum')
99 return $error if $error;
104 =item part_export_machine
108 sub part_export_machine {
110 qsearchs('part_export_machine', { 'machinenum' => $self->machinenum } );
119 L<FS::cust_svc>, L<FS::part_export_machine>, L<FS::Record>