X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=eg%2Ftable_template.pm;h=686bef6a838e9d5b4958e5d2fc102082b156ea3c;hp=7f74ac3423f6fc85fed4d55b53fe1ca3516970b3;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hpb=6981a417a49264fd4e03dc0167e070f7a4c128e1 diff --git a/eg/table_template.pm b/eg/table_template.pm index 7f74ac342..686bef6a8 100644 --- a/eg/table_template.pm +++ b/eg/table_template.pm @@ -1,11 +1,9 @@ package FS::table_name; +use base qw( FS::Record ); use strict; -use vars qw( @ISA ); use FS::Record qw( qsearch qsearchs ); -@ISA = qw(FS::Record); - =head1 NAME FS::table_name - Object methods for table_name records @@ -93,43 +91,24 @@ 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 -=head1 VERSION - -$Id: table_template.pm,v 1.1 1999-08-04 08:03:03 ivan Exp $ - =head1 BUGS The author forgot to customize this manpage. =head1 SEE ALSO -L, schema.html from the base documentation. - -=head1 HISTORY - -ivan@voicenet.com 97-jul-1 - -added hfields -ivan@sisd.com 97-nov-13 - -$Log: table_template.pm,v $ -Revision 1.1 1999-08-04 08:03:03 ivan -move table subclass examples out of production directory - -Revision 1.4 1998/12/29 11:59:57 ivan -mostly properly OO, some work still to be done with svc_ stuff - -Revision 1.3 1998/11/15 04:33:00 ivan -updates for newest versoin - -Revision 1.2 1998/11/15 03:48:49 ivan -update for current version - +L =cut