Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / BranchItemRule.pm
blobdafd57a45decad04f6ffe4d9ddf0ce9216fd1132
1 use utf8;
2 package Koha::Schema::Result::BranchItemRule;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::BranchItemRule
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branch_item_rules>
20 =cut
22 __PACKAGE__->table("branch_item_rules");
24 =head1 ACCESSORS
26 =head2 branchcode
28 data_type: 'varchar'
29 is_foreign_key: 1
30 is_nullable: 0
31 size: 10
33 =head2 itemtype
35 data_type: 'varchar'
36 is_foreign_key: 1
37 is_nullable: 0
38 size: 10
40 =head2 holdallowed
42 data_type: 'tinyint'
43 is_nullable: 1
45 =head2 hold_fulfillment_policy
47 data_type: 'enum'
48 default_value: 'any'
49 extra: {list => ["any","homebranch","holdingbranch"]}
50 is_nullable: 0
52 =head2 returnbranch
54 data_type: 'varchar'
55 is_nullable: 1
56 size: 15
58 =cut
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",
69 data_type => "enum",
70 default_value => "any",
71 extra => { list => ["any", "homebranch", "holdingbranch"] },
72 is_nullable => 0,
74 "returnbranch",
75 { data_type => "varchar", is_nullable => 1, size => 15 },
78 =head1 PRIMARY KEY
80 =over 4
82 =item * L</itemtype>
84 =item * L</branchcode>
86 =back
88 =cut
90 __PACKAGE__->set_primary_key("itemtype", "branchcode");
92 =head1 RELATIONS
94 =head2 branchcode
96 Type: belongs_to
98 Related object: L<Koha::Schema::Result::Branch>
100 =cut
102 __PACKAGE__->belongs_to(
103 "branchcode",
104 "Koha::Schema::Result::Branch",
105 { branchcode => "branchcode" },
106 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
109 =head2 itemtype
111 Type: belongs_to
113 Related object: L<Koha::Schema::Result::Itemtype>
115 =cut
117 __PACKAGE__->belongs_to(
118 "itemtype",
119 "Koha::Schema::Result::Itemtype",
120 { itemtype => "itemtype" },
121 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
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
129 # You can replace this text with custom content, and it will be preserved on regeneration