communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / eg / table_template.pm
index d609bd5..9c71b3a 100644 (file)
@@ -1,11 +1,9 @@
 package FS::table_name;
 
 use strict;
-use vars qw( @ISA );
+use base qw( FS::Record );
 use FS::Record qw( qsearch qsearchs );
 
-@ISA = qw(FS::Record);
-
 =head1 NAME
 
 FS::table_name - Object methods for table_name records
@@ -93,7 +91,13 @@ and replace methods.
 sub check {
   my $self = shift;
 
-  ''; #no error
+  my $error = 
+    $self->ut_numbern('primary_key')
+    || $self->ut_number('validate_other_fields')
+  ;
+  return $error if $error;
+
+  $self->SUPER::check;
 }
 
 =back