backup the schema for tables we don't need the data from. RT#85959
[freeside.git] / FS / FS / svc_domain.pm
index 7d527e5..b01d673 100644 (file)
@@ -67,28 +67,54 @@ FS::svc_Common.  The following fields are currently supported:
 
 =over 4
 
-=item svcnum - primary key (assigned automatically for new accounts)
+=item svcnum
+
+primary key (assigned automatically for new accounts)
 
 =item domain
 
-=item catchall - optional svcnum of an svc_acct record, designating an email catchall account.
+=item catchall
+
+optional svcnum of an svc_acct record, designating an email catchall account.
+
+=item suffix
+
+=item parent_svcnum
+
+=item quota
+
+Storage limit
+
+=item registrarnum
 
-=item suffix - 
+Registrar (see L<FS::registrar>)
 
-=item parent_svcnum -
+=item registrarkey
 
-=item registrarnum - Registrar (see L<FS::registrar>)
+Registrar key or password for this domain
 
-=item registrarkey - Registrar key or password for this domain
+=item setup_date
 
-=item setup_date - UNIX timestamp
+UNIX timestamp
 
-=item renewal_interval - Number of days before expiration date to start renewal
+=item renewal_interval
 
-=item expiration_date - UNIX timestamp
+Number of days before expiration date to start renewal
+
+=item expiration_date
+
+UNIX timestamp
 
 =item max_accounts
 
+=item au_eligibility_type
+
+AU-specific field for domain registrations
+
+=item au_registrant_name
+
+AU-specific field for domain registrations
+
 =back
 
 =head1 METHODS
@@ -118,9 +144,24 @@ sub table_info {
                          disable_inventory => 1,
                          disable_select    => 1,
                        },
+      'au_registrant_name' => { label => 'AU Registrant Name',
+                               disable_inventory => 1,
+                               disable_select => 1,
+                             },
+      'au_eligibility_type' => { label => 'AU Eligibility Type',
+                             type  => 'select',
+                             select_list => __PACKAGE__->au_eligibility_type_values,
+                             disable_inventory => 1,
+                             disable_select    => 1,
+                             },
       'max_accounts' => { label => 'Maximum number of accounts',
                           'disable_inventory' => 1,
                         },
+      'quota'     => { 
+                         label => 'Quota', #storage limit
+                         type  => 'text',
+                         disable_inventory => 1,
+                     },
       'cgp_aliases' => { 
                          label => 'Communigate aliases',
                          type  => 'text',
@@ -133,6 +174,13 @@ sub table_info {
                              disable_inventory => 1,
                              disable_select    => 1,
                            },
+      'cgp_certificatetype' => { 
+                             label => 'Communigate PKI services',
+                             type  => 'select',
+                             select_list => __PACKAGE__->cgp_certificatetype_values,
+                             disable_inventory => 1,
+                             disable_select    => 1,
+                           },
 
       'acct_def_cgp_accessmodes' => { 
                              label => 'Acct. default Communigate enabled services',
@@ -280,6 +328,41 @@ sub search_sql {
   $class->search_sql_field('domain', $string);
 }
 
+=item au_eligibility_type_values
+
+=cut
+
+sub au_eligibility_type_values {
+
+ [ '',
+   'Charity',
+   'Child Care Centre',
+   'Citizen/Resident',
+   'Club',
+   'Commercial Statutory Body',
+   'Company',
+   'Government School',
+   'Higher Education Institution',
+   'Incorporated Association',
+   'Industry Body',
+   'National Body',
+   'Non-Government School',
+   'Non-profit Organisation',
+   'Other',
+   'Partnership',
+   'Pending TM Owner',
+   'Political Party',
+   'Pre-school',
+   'Registered Business',
+   'Religious/Church Group',
+   'Research Organisation',
+   'Sole Trader',
+   'Trade Union',
+   'Trademark Owner',
+   'Training Organisation',
+  ];
+
+}
 
 =item label
 
@@ -303,9 +386,6 @@ defined.  An FS::cust_svc record will be created and inserted.
 The additional field I<action> should be set to I<N> for new domains, I<M>
 for transfers, or I<I> for no action (registered elsewhere).
 
-A registration or transfer email will be submitted unless
-$FS::svc_domain::whois_hack is true.
-
 The additional field I<email> can be used to manually set the admin contact
 email address on this email.  Otherwise, the svc_acct records for this package 
 (see L<FS::cust_pkg>) are searched.  If there is exactly one svc_acct record
@@ -519,8 +599,11 @@ sub check {
   #my $part_svc = $x;
 
   my $error = $self->ut_numbern('svcnum')
+              || $self->ut_textn('au_eligibility_type')
+              || $self->ut_textn('au_registrant_name')
               || $self->ut_numbern('catchall')
               || $self->ut_numbern('max_accounts')
+              || $self->ut_alphan('quota')
               || $self->ut_anything('trailer') #well
               || $self->ut_textn('cgp_aliases') #well
               || $self->ut_enum('acct_def_password_selfchange', [ '', 'Y' ])
@@ -565,7 +648,7 @@ sub check {
     $recref->{domain} = "$1.$2";
     $recref->{suffix} ||= $2;
   # hmmmmmmmm.
-  } elsif ( $whois_hack && $recref->{domain} =~ /^([\w\-\.]+)\.(\w+)$/ ) {
+  } elsif ( $whois_hack && $recref->{domain} =~ /^([\w\-\.\/]+)\.(\w+)$/ ) {
     $recref->{domain} = "$1.$2";
     # need to match a list of suffixes - no guarantee they're top-level..
     # http://wiki.mozilla.org/TLD_List
@@ -623,6 +706,7 @@ sub domain_record {
     'A'     => 5,
     'TXT'   => 6,
     'PTR'   => 7,
+    'SRV'   => 8,
   );
 
   my %sort = (