1 package FS::part_pkg_msgcat;
2 use base qw( FS::Record );
9 FS::part_pkg_msgcat - Object methods for part_pkg_msgcat records
13 use FS::part_pkg_msgcat;
15 $record = new FS::part_pkg_msgcat \%hash;
16 $record = new FS::part_pkg_msgcat { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::part_pkg_msgcat object represents localized labels of a package
29 definition. FS::part_pkg_msgcat inherits from FS::Record. The following
30 fields are currently supported:
48 Localized package name (customer-viewable)
52 Localized package comment (non-customer-viewable), optional
62 Creates a new record. To add the record to the database, see L<"insert">.
64 Note that this stores the hash reference, not a distinct copy of the hash it
65 points to. You can ask the object for a copy with the I<hash> method.
69 # the new method can be inherited from FS::Record, if a table method is defined
71 sub table { 'part_pkg_msgcat'; }
75 Adds this record to the database. If there is an error, returns the error,
76 otherwise returns false.
80 # the insert method can be inherited from FS::Record
84 Delete this record from the database.
88 # the delete method can be inherited from FS::Record
90 =item replace OLD_RECORD
92 Replaces the OLD_RECORD with this one in the database. If there is an error,
93 returns the error, otherwise returns false.
97 # the replace method can be inherited from FS::Record
101 Checks all fields to make sure this is a valid record. If there is
102 an error, returns the error, otherwise returns false. Called by the insert
107 # the check method should currently be supplied - FS::Record contains some
108 # data checking routines
114 $self->ut_numbern('pkgpartmsgnum')
115 || $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart')
116 || $self->ut_enum('locale', [ FS::Locales->locales ] )
117 || $self->ut_text('pkg')
118 || $self->ut_textn('comment')
120 return $error if $error;
131 L<FS::Record>, schema.html from the base documentation.