1 package FS::part_svc_column;
5 use FS::Record qw( fields );
11 FS::part_svc_column - Object methods for part_svc_column objects
15 use FS::part_svc_column;
17 $record = new FS::part_svc_column \%hash
18 $record = new FS::part_svc_column { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::part_svc_column record represents a service definition column
31 constraint. FS::part_svc_column inherits from FS::Record. The following
32 fields are currently supported:
36 =item columnnum - primary key (assigned automatcially for new records)
38 =item svcpart - service definition (see L<FS::part_svc>)
40 =item columnname - column name in part_svc.svcdb table
42 =item columnvalue - default or fixed value for the column
44 =item columnflag - null, D, F, X (virtual fields)
54 Creates a new column constraint. To add the column constraint to the database, see L<"insert">.
58 sub table { 'part_svc_column'; }
62 Adds this service definition to the database. If there is an error, returns
63 the error, otherwise returns false.
67 Deletes this record from the database. If there is an error, returns the
68 error, otherwise returns false.
70 =item replace OLD_RECORD
72 Replaces OLD_RECORD with this one in the database. If there is an error,
73 returns the error, otherwise returns false.
77 Checks all fields to make sure this is a valid record. If there is an error,
78 returns the error, otherwise returns false. Called by the insert and replace
87 $self->ut_numbern('columnnum')
88 || $self->ut_number('svcpart')
89 || $self->ut_alpha('columnname')
90 || $self->ut_anything('columnvalue')
92 return $error if $error;
94 $self->columnflag =~ /^([DFX])$/
95 or return "illegal columnflag ". $self->columnflag;
96 $self->columnflag(uc($1));
107 L<FS::Record>, L<FS::part_svc>, L<FS::part_pkg>, L<FS::pkg_svc>,
108 L<FS::cust_svc>, L<FS::svc_acct>, L<FS::svc_forward>, L<FS::svc_domain>,
109 schema.html from the base documentation.