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 Export definition, see L<FS::part_export>
49 Customer service, see L<FS::cust_svc>
53 Export hostname, see L<FS::part_export_machine>
63 Creates a new record. To add the record to the database, see L<"insert">.
65 Note that this stores the hash reference, not a distinct copy of the hash it
66 points to. You can ask the object for a copy with the I<hash> method.
70 sub table { 'svc_export_machine'; }
74 Adds this record to the database. If there is an error, returns the error,
75 otherwise returns false.
79 Delete this record from the database.
81 =item replace OLD_RECORD
83 Replaces the OLD_RECORD with this one in the database. If there is an error,
84 returns the error, otherwise returns false.
88 Checks all fields to make sure this is a valid record. If there is
89 an error, returns the error, otherwise returns false. Called by the insert
98 $self->ut_numbern('svcexportmachinenum')
99 || $self->ut_foreign_key('svcnum', 'cust_svc', 'svcnum' )
100 || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum' )
101 || $self->ut_foreign_key('machinenum', 'part_export_machine', 'machinenum')
103 return $error if $error;
108 =item part_export_machine
112 sub part_export_machine {
114 qsearchs('part_export_machine', { 'machinenum' => $self->machinenum } );
123 L<FS::cust_svc>, L<FS::part_export_machine>, L<FS::Record>