use FS::Record qw( qsearchs qsearch );
use FS::addr_block;
-@ISA = qw( FS::Record );
+@ISA = qw( FS::Record FS::m2m_Common );
=head1 NAME
my $error =
$self->ut_numbern('routernum')
- || $self->ut_text('routername');
+ || $self->ut_text('routername')
+ || $self->ut_agentnum_acl('agentnum', 'Engineering global configuration')
+ ;
return $error if $error;
- '';
+ $self->SUPER::check;
}
=item addr_block
return qsearch('addr_block', { routernum => $self->routernum });
}
-=item router_field
-
-Returns a list of FS::router_field objects assigned to this object.
-
-=cut
-
-sub router_field {
- my $self = shift;
-
- return qsearch('router_field', { routernum => $self->routernum });
-}
-
=item part_svc_router
Returns a list of FS::part_svc_router objects associated with this
$self->part_svc_router;
}
-=back
+=item agent
-=head1 VERSION
+Returns the agent associated with this router, if any.
+
+=cut
-$Id:
+sub agent {
+ qsearchs('agent', { 'agentnum' => shift->agentnum });
+}
+
+=back
=head1 BUGS
=head1 SEE ALSO
-FS::svc_broadband, FS::router, FS::addr_block, FS::router_field, FS::part_svc,
+FS::svc_broadband, FS::router, FS::addr_block, FS::part_svc,
schema.html from the base documentation.
=cut