|
Lines 1-130
Link Here
|
| 1 |
use utf8; |
|
|
| 2 |
package Koha::Schema::Result::BranchItemRule; |
| 3 |
|
| 4 |
# Created by DBIx::Class::Schema::Loader |
| 5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
| 6 |
|
| 7 |
=head1 NAME |
| 8 |
|
| 9 |
Koha::Schema::Result::BranchItemRule |
| 10 |
|
| 11 |
=cut |
| 12 |
|
| 13 |
use strict; |
| 14 |
use warnings; |
| 15 |
|
| 16 |
use base 'DBIx::Class::Core'; |
| 17 |
|
| 18 |
=head1 TABLE: C<branch_item_rules> |
| 19 |
|
| 20 |
=cut |
| 21 |
|
| 22 |
__PACKAGE__->table("branch_item_rules"); |
| 23 |
|
| 24 |
=head1 ACCESSORS |
| 25 |
|
| 26 |
=head2 branchcode |
| 27 |
|
| 28 |
data_type: 'varchar' |
| 29 |
is_foreign_key: 1 |
| 30 |
is_nullable: 0 |
| 31 |
size: 10 |
| 32 |
|
| 33 |
=head2 itemtype |
| 34 |
|
| 35 |
data_type: 'varchar' |
| 36 |
is_foreign_key: 1 |
| 37 |
is_nullable: 0 |
| 38 |
size: 10 |
| 39 |
|
| 40 |
=head2 holdallowed |
| 41 |
|
| 42 |
data_type: 'tinyint' |
| 43 |
is_nullable: 1 |
| 44 |
|
| 45 |
=head2 hold_fulfillment_policy |
| 46 |
|
| 47 |
data_type: 'enum' |
| 48 |
default_value: 'any' |
| 49 |
extra: {list => ["any","homebranch","holdingbranch"]} |
| 50 |
is_nullable: 0 |
| 51 |
|
| 52 |
=head2 returnbranch |
| 53 |
|
| 54 |
data_type: 'varchar' |
| 55 |
is_nullable: 1 |
| 56 |
size: 15 |
| 57 |
|
| 58 |
=cut |
| 59 |
|
| 60 |
__PACKAGE__->add_columns( |
| 61 |
"branchcode", |
| 62 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, |
| 63 |
"itemtype", |
| 64 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, |
| 65 |
"holdallowed", |
| 66 |
{ data_type => "tinyint", is_nullable => 1 }, |
| 67 |
"hold_fulfillment_policy", |
| 68 |
{ |
| 69 |
data_type => "enum", |
| 70 |
default_value => "any", |
| 71 |
extra => { list => ["any", "homebranch", "holdingbranch"] }, |
| 72 |
is_nullable => 0, |
| 73 |
}, |
| 74 |
"returnbranch", |
| 75 |
{ data_type => "varchar", is_nullable => 1, size => 15 }, |
| 76 |
); |
| 77 |
|
| 78 |
=head1 PRIMARY KEY |
| 79 |
|
| 80 |
=over 4 |
| 81 |
|
| 82 |
=item * L</itemtype> |
| 83 |
|
| 84 |
=item * L</branchcode> |
| 85 |
|
| 86 |
=back |
| 87 |
|
| 88 |
=cut |
| 89 |
|
| 90 |
__PACKAGE__->set_primary_key("itemtype", "branchcode"); |
| 91 |
|
| 92 |
=head1 RELATIONS |
| 93 |
|
| 94 |
=head2 branchcode |
| 95 |
|
| 96 |
Type: belongs_to |
| 97 |
|
| 98 |
Related object: L<Koha::Schema::Result::Branch> |
| 99 |
|
| 100 |
=cut |
| 101 |
|
| 102 |
__PACKAGE__->belongs_to( |
| 103 |
"branchcode", |
| 104 |
"Koha::Schema::Result::Branch", |
| 105 |
{ branchcode => "branchcode" }, |
| 106 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
| 107 |
); |
| 108 |
|
| 109 |
=head2 itemtype |
| 110 |
|
| 111 |
Type: belongs_to |
| 112 |
|
| 113 |
Related object: L<Koha::Schema::Result::Itemtype> |
| 114 |
|
| 115 |
=cut |
| 116 |
|
| 117 |
__PACKAGE__->belongs_to( |
| 118 |
"itemtype", |
| 119 |
"Koha::Schema::Result::Itemtype", |
| 120 |
{ itemtype => "itemtype" }, |
| 121 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
| 122 |
); |
| 123 |
|
| 124 |
|
| 125 |
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 |
| 126 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yMmvhDqtrKcNeDU9ZJCQZw |
| 127 |
|
| 128 |
|
| 129 |
# You can replace this text with custom content, and it will be preserved on regeneration |
| 130 |
1; |