2 package Koha::Schema::Result::AdditionalField;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::AdditionalField
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<additional_fields>
22 __PACKAGE__->table("additional_fields");
32 primary key identifier
37 default_value: (empty string)
41 tablename of the new field
46 default_value: (empty string)
52 =head2 authorised_value_category
55 default_value: (empty string)
59 is an authorised value category
64 default_value: (empty string)
68 contains the marc field to copied into the record
76 is the field searchable?
80 __PACKAGE__->add_columns(
82 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
84 { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
86 { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
87 "authorised_value_category",
88 { data_type => "varchar", default_value => "", is_nullable => 0, size => 32 },
90 { data_type => "varchar", default_value => "", is_nullable => 0, size => 16 },
92 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
105 __PACKAGE__->set_primary_key("id");
107 =head1 UNIQUE CONSTRAINTS
109 =head2 C<fields_uniq>
113 =item * L</tablename>
121 __PACKAGE__->add_unique_constraint("fields_uniq", ["tablename", "name"]);
125 =head2 additional_field_values
129 Related object: L<Koha::Schema::Result::AdditionalFieldValue>
133 __PACKAGE__->has_many(
134 "additional_field_values",
135 "Koha::Schema::Result::AdditionalFieldValue",
136 { "foreign.field_id" => "self.id" },
137 { cascade_copy => 0, cascade_delete => 0 },
141 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-19 06:49:06
142 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4GqBQNlfw8ITsUZH0GidsQ
145 # You can replace this text with custom code or comments, and it will be preserved on regeneration