default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / FS / FS / hardware_type.pm
index ba19fcb..844ea13 100644 (file)
@@ -1,8 +1,7 @@
 package FS::hardware_type;
+use base qw( FS::Record );
 
 use strict;
-use base qw( FS::Record );
-use FS::Record qw( qsearch qsearchs );
 
 =head1 NAME
 
@@ -26,7 +25,7 @@ FS::hardware_type - Object methods for hardware_type records
 =head1 DESCRIPTION
 
 An FS::hardware_type object represents a device type (a model name or 
-number) assignable as a hardware service (L<FS::svc_hardware)>).
+number) assignable as a hardware service (L<FS::svc_hardware>).
 FS::hardware_type inherits from FS::Record.  The following fields are 
 currently supported:
 
@@ -39,6 +38,10 @@ to which this device type belongs.
 
 =item model - descriptive model name or number
 
+=item revision - revision name/number, subordinate to model
+
+=item title - external ID
+
 =back
 
 =head1 METHODS
@@ -102,6 +105,8 @@ sub check {
     $self->ut_numbern('typenum')
     || $self->ut_foreign_key('classnum', 'hardware_class', 'classnum')
     || $self->ut_text('model')
+    || $self->ut_textn('revision')
+    || $self->ut_textn('title')
   ;
   return $error if $error;
 
@@ -112,11 +117,15 @@ sub check {
 
 Returns the L<FS::hardware_class> associated with this device.
 
+=item description
+
+Returns the model and revision number.
+
 =cut
 
-sub hardware_class {
+sub description {
   my $self = shift;
-  return qsearchs('hardware_class', { 'classnum' => $self->classnum });
+  $self->model . ($self->revision ? ' '.$self->revision : '');
 }
 
 =back