1 package FS::access_usergroup;
2 use base qw(FS::Record);
8 FS::access_usergroup - Object methods for access_usergroup records
12 use FS::access_usergroup;
14 $record = new FS::access_usergroup \%hash;
15 $record = new FS::access_usergroup { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::access_usergroup object represents an internal access user's membership
28 in a group. FS::access_usergroup inherits from FS::Record. The following
29 fields are currently supported:
33 =item usergroupnum - primary key
48 Creates a new record. To add the record to the database, see L<"insert">.
50 Note that this stores the hash reference, not a distinct copy of the hash it
51 points to. You can ask the object for a copy with the I<hash> method.
55 # the new method can be inherited from FS::Record, if a table method is defined
57 sub table { 'access_usergroup'; }
61 Adds this record to the database. If there is an error, returns the error,
62 otherwise returns false.
66 # the insert method can be inherited from FS::Record
70 Delete this record from the database.
74 # the delete method can be inherited from FS::Record
76 =item replace OLD_RECORD
78 Replaces the OLD_RECORD with this one in the database. If there is an error,
79 returns the error, otherwise returns false.
83 # the replace method can be inherited from FS::Record
87 Checks all fields to make sure this is a valid record. If there is
88 an error, returns the error, otherwise returns false. Called by the insert
93 # the check method should currently be supplied - FS::Record contains some
94 # data checking routines
100 $self->ut_numbern('usergroupnum')
101 || $self->ut_number('usernum')
102 || $self->ut_number('groupnum')
104 return $error if $error;
119 L<FS::Record>, schema.html from the base documentation.