--- /dev/null
+package FS::part_ac_field;
+
+use strict;
+use vars qw( @ISA );
+use FS::Record qw( qsearchs );
+use FS::ac_field;
+use FS::ac;
+
+
+@ISA = qw( FS::Record );
+
+=head1 NAME
+
+FS::part_ac_field - Object methods for part_ac_field records
+
+=head1 SYNOPSIS
+
+ use FS::part_ac_field;
+
+ $record = new FS::part_ac_field \%hash;
+ $record = new FS::part_ac_field { 'column' => 'value' };
+
+ $error = $record->insert;
+
+ $error = $new_record->replace($old_record);
+
+ $error = $record->delete;
+
+ $error = $record->check;
+
+=head1 DESCRIPTION
+
+
+=over 4
+
+=item blank
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item new HASHREF
+
+Create a new record. To add the record to the database, see L<"insert">.
+
+=cut
+
+sub table { 'part_ac_field'; }
+
+=item insert
+
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+
+=item delete
+
+Deletes this record from the database. If there is an error, returns the
+error, otherwise returns false.
+
+=item replace OLD_RECORD
+
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+
+=item check
+
+Checks all fields to make sure this is a valid record. If there is an error,
+returns the error, otherwise returns false. Called by the insert and replace
+methods.
+
+=cut
+
+sub check {
+ my $self = shift;
+ my $error = '';
+
+ $self->name =~ /^([a-z0-9_\-\.]{1,15})$/i
+ or return "Invalid field name for part_ac_field";
+
+ ''; #no error
+}
+
+
+=back
+
+=head1 VERSION
+
+$Id:
+
+=head1 BUGS
+
+=head1 SEE ALSO
+
+L<FS::svc_broadband>, L<FS::ac>, L<FS::ac_block>, L<FS::ac_field>, schema.html
+from the base documentation.
+
+=cut
+
+1;
+
#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.96 2002-07-06 12:13:49 ivan Exp $
+# $Id: fs-setup,v 1.96.2.1 2002-09-02 22:20:37 khoff Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
'index' => [],
},
+ 'ac_type' => {
+ 'columns' => [
+ 'actypenum', 'int', '', '',
+ 'actypename', 'varchar', '', 15,
+ ],
+ 'primary_key' => 'actypenum',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'ac' => {
+ 'columns' => [
+ 'acnum', 'int', '', '',
+ 'actypenum', 'int', '', '',
+ 'acname', 'varchar', '', 15,
+ ],
+ 'primary_key' => 'acnum',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'part_ac_field' => {
+ 'columns' => [
+ 'acfieldpart', 'int', '', '',
+ 'actypenum', 'int', '', '',
+ 'name', 'varchar', '', 15,
+ 'ut_type', 'varchar', '', 15,
+ ],
+ 'primary_key' => 'acfieldpart',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'ac_field' => {
+ 'columns' => [
+ 'acfieldpart', 'int', '', '',
+ 'acnum', 'int', '', '',
+ 'value', 'varchar', '', 127,
+ ],
+ 'primary_key' => '',
+ 'unique' => [ [ 'acfieldpart', 'acnum' ] ],
+ 'index' => [],
+ },
+
+ 'ac_block' => {
+ 'columns' => [
+ 'acnum', 'int', '', '',
+ 'ip_gateway', 'char', '', 15,
+ 'ip_netmask', 'int', '', '',
+ ],
+ 'primary_key' => '',
+ 'unique' => [],
+ 'index' => [],
+ },
+ 'svc_broadband' => {
+ 'columns' => [
+ 'svcnum', 'int', '', '',
+ 'actypenum', 'int', '', '',
+ 'speed_up', 'int', '', '',
+ 'speed_down', 'int', '', '',
+ 'acnum', 'int', '', '',
+ 'ip_addr', 'char', '', 15,
+ 'ip_netmask', 'int', '', '',
+ 'mac_addr', 'char', '', 17,
+ 'location', 'varchar', '', 127,
+ ],
+ 'primary_key' => 'svcnum',
+ 'unique' => [],
+ 'index' => [],
+ },
);