Bug 17047: Schema changes
[koha.git] / Koha / Schema / Result / HoldFillTarget.pm
1 use utf8;
2 package Koha::Schema::Result::HoldFillTarget;
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::HoldFillTarget
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<hold_fill_targets>
19
20 =cut
21
22 __PACKAGE__->table("hold_fill_targets");
23
24 =head1 ACCESSORS
25
26 =head2 borrowernumber
27
28   data_type: 'integer'
29   is_foreign_key: 1
30   is_nullable: 0
31
32 =head2 biblionumber
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 itemnumber
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 =head2 source_branchcode
45
46   data_type: 'varchar'
47   is_foreign_key: 1
48   is_nullable: 1
49   size: 10
50
51 =head2 item_level_request
52
53   data_type: 'tinyint'
54   default_value: 0
55   is_nullable: 0
56
57 =cut
58
59 __PACKAGE__->add_columns(
60   "borrowernumber",
61   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
62   "biblionumber",
63   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
64   "itemnumber",
65   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
66   "source_branchcode",
67   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
68   "item_level_request",
69   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
70 );
71
72 =head1 PRIMARY KEY
73
74 =over 4
75
76 =item * L</itemnumber>
77
78 =back
79
80 =cut
81
82 __PACKAGE__->set_primary_key("itemnumber");
83
84 =head1 RELATIONS
85
86 =head2 biblionumber
87
88 Type: belongs_to
89
90 Related object: L<Koha::Schema::Result::Biblio>
91
92 =cut
93
94 __PACKAGE__->belongs_to(
95   "biblionumber",
96   "Koha::Schema::Result::Biblio",
97   { biblionumber => "biblionumber" },
98   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
99 );
100
101 =head2 borrowernumber
102
103 Type: belongs_to
104
105 Related object: L<Koha::Schema::Result::Borrower>
106
107 =cut
108
109 __PACKAGE__->belongs_to(
110   "borrowernumber",
111   "Koha::Schema::Result::Borrower",
112   { borrowernumber => "borrowernumber" },
113   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
114 );
115
116 =head2 itemnumber
117
118 Type: belongs_to
119
120 Related object: L<Koha::Schema::Result::Item>
121
122 =cut
123
124 __PACKAGE__->belongs_to(
125   "itemnumber",
126   "Koha::Schema::Result::Item",
127   { itemnumber => "itemnumber" },
128   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
129 );
130
131 =head2 source_branchcode
132
133 Type: belongs_to
134
135 Related object: L<Koha::Schema::Result::Branch>
136
137 =cut
138
139 __PACKAGE__->belongs_to(
140   "source_branchcode",
141   "Koha::Schema::Result::Branch",
142   { branchcode => "source_branchcode" },
143   {
144     is_deferrable => 1,
145     join_type     => "LEFT",
146     on_delete     => "CASCADE",
147     on_update     => "CASCADE",
148   },
149 );
150
151
152 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
153 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uSU9PBMr4e6XKuDgBV583A
154
155
156 # You can replace this text with custom content, and it will be preserved on regeneration
157 1;