2 package Koha::Schema::Result::AuthorisedValue;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::AuthorisedValue
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<authorised_values>
22 __PACKAGE__->table("authorised_values");
32 unique key, used to identify the authorized value
37 default_value: (empty string)
42 key used to identify the authorized value category
44 =head2 authorised_value
47 default_value: (empty string)
51 code use to identify the authorized value
59 authorized value description as printed in the staff interface
67 authorized value description as printed in the OPAC
79 __PACKAGE__->add_columns(
81 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
84 data_type => "varchar",
91 { data_type => "varchar", default_value => "", is_nullable => 0, size => 80 },
93 { data_type => "varchar", is_nullable => 1, size => 200 },
95 { data_type => "varchar", is_nullable => 1, size => 200 },
97 { data_type => "varchar", is_nullable => 1, size => 200 },
110 __PACKAGE__->set_primary_key("id");
112 =head1 UNIQUE CONSTRAINTS
120 =item * L</authorised_value>
126 __PACKAGE__->add_unique_constraint("av_uniq", ["category", "authorised_value"]);
130 =head2 authorised_values_branches
134 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
138 __PACKAGE__->has_many(
139 "authorised_values_branches",
140 "Koha::Schema::Result::AuthorisedValuesBranch",
141 { "foreign.av_id" => "self.id" },
142 { cascade_copy => 0, cascade_delete => 0 },
149 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
153 __PACKAGE__->belongs_to(
155 "Koha::Schema::Result::AuthorisedValueCategory",
156 { category_name => "category" },
157 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
164 Related object: L<Koha::Schema::Result::Illrequest>
168 __PACKAGE__->has_many(
170 "Koha::Schema::Result::Illrequest",
171 { "foreign.status_alias" => "self.authorised_value" },
172 { cascade_copy => 0, cascade_delete => 0 },
176 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
177 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LH9dpEEzlVVsjNVv/jnONg
180 # You can replace this text with custom code or comments, and it will be preserved on regeneration