backup the schema for tables we don't need the data from. RT#85959
[freeside.git] / FS / FS / conferencing_type.pm
1 package FS::conferencing_type;
2 use base qw( FS::Record );
3
4 use strict;
5
6 =head1 NAME
7
8 FS::conferencing_type - Object methods for conferencing_type records
9
10 =head1 SYNOPSIS
11
12   use FS::conferencing_type;
13
14   $record = new FS::conferencing_type \%hash;
15   $record = new FS::conferencing_type { 'column' => 'value' };
16
17   $error = $record->insert;
18
19   $error = $new_record->replace($old_record);
20
21   $error = $record->delete;
22
23   $error = $record->check;
24
25 =head1 DESCRIPTION
26
27 An FS::conferencing_type object represents a conferencing type.
28 FS::conferencing_type inherits from FS::Record.  The following fields are
29 currently supported:
30
31 =over 4
32
33 =item conftypenum
34
35 primary key
36
37 =item typeid
38
39 Numeric (vendor) ID for type type
40
41 =item typename
42
43 Name for this type
44
45 =item disabled
46
47 Empty or 'Y'
48
49 =back
50
51 =head1 METHODS
52
53 =over 4
54
55 =item new HASHREF
56
57 Creates a new record.  To add the record to the database, see L<"insert">.
58
59 Note that this stores the hash reference, not a distinct copy of the hash it
60 points to.  You can ask the object for a copy with the I<hash> method.
61
62 =cut
63
64 sub table { 'conferencing_type'; }
65
66 =item insert
67
68 Adds this record to the database.  If there is an error, returns the error,
69 otherwise returns false.
70
71 =item delete
72
73 Delete this record from the database.
74
75 =item replace OLD_RECORD
76
77 Replaces the OLD_RECORD with this one in the database.  If there is an error,
78 returns the error, otherwise returns false.
79
80 =item check
81
82 Checks all fields to make sure this is a valid record.  If there is
83 an error, returns the error, otherwise returns false.  Called by the insert
84 and replace methods.
85
86 =cut
87
88 sub check {
89   my $self = shift;
90
91   my $error = 
92     $self->ut_numbern('conftypenum')
93     || $self->ut_number('typeid')
94     || $self->ut_text('typename')
95     || $self->ut_enum('disabled', [ '', 'Y' ] )
96   ;
97   return $error if $error;
98
99   $self->SUPER::check;
100 }
101
102 =back
103
104 =head1 BUGS
105
106 =head1 SEE ALSO
107
108 L<FS::svc_conferencing>, L<FS::Record>
109
110 =cut
111
112 1;
113