Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / BranchItemRule.pm
1 package Koha::Schema::Result::BranchItemRule;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::BranchItemRule
15
16 =cut
17
18 __PACKAGE__->table("branch_item_rules");
19
20 =head1 ACCESSORS
21
22 =head2 branchcode
23
24   data_type: 'varchar'
25   is_foreign_key: 1
26   is_nullable: 0
27   size: 10
28
29 =head2 itemtype
30
31   data_type: 'varchar'
32   is_foreign_key: 1
33   is_nullable: 0
34   size: 10
35
36 =head2 holdallowed
37
38   data_type: 'tinyint'
39   is_nullable: 1
40
41 =head2 returnbranch
42
43   data_type: 'varchar'
44   is_nullable: 1
45   size: 15
46
47 =cut
48
49 __PACKAGE__->add_columns(
50   "branchcode",
51   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
52   "itemtype",
53   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
54   "holdallowed",
55   { data_type => "tinyint", is_nullable => 1 },
56   "returnbranch",
57   { data_type => "varchar", is_nullable => 1, size => 15 },
58 );
59 __PACKAGE__->set_primary_key("itemtype", "branchcode");
60
61 =head1 RELATIONS
62
63 =head2 itemtype
64
65 Type: belongs_to
66
67 Related object: L<Koha::Schema::Result::Itemtype>
68
69 =cut
70
71 __PACKAGE__->belongs_to(
72   "itemtype",
73   "Koha::Schema::Result::Itemtype",
74   { itemtype => "itemtype" },
75   { on_delete => "CASCADE", on_update => "CASCADE" },
76 );
77
78 =head2 branchcode
79
80 Type: belongs_to
81
82 Related object: L<Koha::Schema::Result::Branch>
83
84 =cut
85
86 __PACKAGE__->belongs_to(
87   "branchcode",
88   "Koha::Schema::Result::Branch",
89   { branchcode => "branchcode" },
90   { on_delete => "CASCADE", on_update => "CASCADE" },
91 );
92
93
94 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
95 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Pbf8S6Y9k2teX1337IGIA
96
97
98 # You can replace this text with custom content, and it will be preserved on regeneration
99 1;