Bug 12446: (QA follow-up) Minor kohastructure.sql fix
[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 =head2 reserve_id
58
59   data_type: 'integer'
60   is_nullable: 1
61
62 =cut
63
64 __PACKAGE__->add_columns(
65   "borrowernumber",
66   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67   "biblionumber",
68   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
69   "itemnumber",
70   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
71   "source_branchcode",
72   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
73   "item_level_request",
74   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
75   "reserve_id",
76   { data_type => "integer", is_nullable => 1 },
77 );
78
79 =head1 PRIMARY KEY
80
81 =over 4
82
83 =item * L</itemnumber>
84
85 =back
86
87 =cut
88
89 __PACKAGE__->set_primary_key("itemnumber");
90
91 =head1 RELATIONS
92
93 =head2 biblionumber
94
95 Type: belongs_to
96
97 Related object: L<Koha::Schema::Result::Biblio>
98
99 =cut
100
101 __PACKAGE__->belongs_to(
102   "biblionumber",
103   "Koha::Schema::Result::Biblio",
104   { biblionumber => "biblionumber" },
105   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106 );
107
108 =head2 borrowernumber
109
110 Type: belongs_to
111
112 Related object: L<Koha::Schema::Result::Borrower>
113
114 =cut
115
116 __PACKAGE__->belongs_to(
117   "borrowernumber",
118   "Koha::Schema::Result::Borrower",
119   { borrowernumber => "borrowernumber" },
120   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
121 );
122
123 =head2 itemnumber
124
125 Type: belongs_to
126
127 Related object: L<Koha::Schema::Result::Item>
128
129 =cut
130
131 __PACKAGE__->belongs_to(
132   "itemnumber",
133   "Koha::Schema::Result::Item",
134   { itemnumber => "itemnumber" },
135   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
136 );
137
138 =head2 source_branchcode
139
140 Type: belongs_to
141
142 Related object: L<Koha::Schema::Result::Branch>
143
144 =cut
145
146 __PACKAGE__->belongs_to(
147   "source_branchcode",
148   "Koha::Schema::Result::Branch",
149   { branchcode => "source_branchcode" },
150   {
151     is_deferrable => 1,
152     join_type     => "LEFT",
153     on_delete     => "CASCADE",
154     on_update     => "CASCADE",
155   },
156 );
157
158
159 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-08-25 09:54:59
160 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SAi7lh09AVqlzXMLvLgkQg
161
162
163 # You can replace this text with custom content, and it will be preserved on regeneration
164 1;