2 package Koha::Schema::Result::CirculationRule;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CirculationRule
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<circulation_rules>
22 __PACKAGE__->table("circulation_rules");
67 __PACKAGE__->add_columns(
69 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
71 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
73 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
75 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
77 { data_type => "varchar", is_nullable => 0, size => 32 },
79 { data_type => "varchar", is_nullable => 0, size => 32 },
92 __PACKAGE__->set_primary_key("id");
94 =head1 UNIQUE CONSTRAINTS
100 =item * L</branchcode>
102 =item * L</categorycode>
106 =item * L</rule_name>
112 __PACKAGE__->add_unique_constraint(
114 ["branchcode", "categorycode", "itemtype", "rule_name"],
123 Related object: L<Koha::Schema::Result::Branch>
127 __PACKAGE__->belongs_to(
129 "Koha::Schema::Result::Branch",
130 { branchcode => "branchcode" },
134 on_delete => "CASCADE",
135 on_update => "CASCADE",
143 Related object: L<Koha::Schema::Result::Category>
147 __PACKAGE__->belongs_to(
149 "Koha::Schema::Result::Category",
150 { categorycode => "categorycode" },
154 on_delete => "CASCADE",
155 on_update => "CASCADE",
163 Related object: L<Koha::Schema::Result::Itemtype>
167 __PACKAGE__->belongs_to(
169 "Koha::Schema::Result::Itemtype",
170 { itemtype => "itemtype" },
174 on_delete => "CASCADE",
175 on_update => "CASCADE",
180 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-05 14:29:17
181 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QHMqvrtX0ohJe70PHUYZ0Q
183 sub koha_objects_class {
184 'Koha::CirculationRules';
187 sub koha_object_class {
188 'Koha::CirculationRule';
191 # You can replace this text with custom code or comments, and it will be preserved on regeneration