Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::Illbatch; |
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::Illbatch |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<illbatches> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("illbatches"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
Batch ID |
33 |
|
34 |
=head2 name |
35 |
|
36 |
data_type: 'varchar' |
37 |
is_nullable: 0 |
38 |
size: 100 |
39 |
|
40 |
Unique name of batch |
41 |
|
42 |
=head2 backend |
43 |
|
44 |
data_type: 'varchar' |
45 |
is_nullable: 0 |
46 |
size: 20 |
47 |
|
48 |
Name of batch backend |
49 |
|
50 |
=head2 borrowernumber |
51 |
|
52 |
data_type: 'integer' |
53 |
is_foreign_key: 1 |
54 |
is_nullable: 1 |
55 |
|
56 |
Patron associated with batch |
57 |
|
58 |
=head2 branchcode |
59 |
|
60 |
data_type: 'varchar' |
61 |
is_foreign_key: 1 |
62 |
is_nullable: 1 |
63 |
size: 50 |
64 |
|
65 |
Branch associated with batch |
66 |
|
67 |
=head2 statuscode |
68 |
|
69 |
data_type: 'varchar' |
70 |
is_foreign_key: 1 |
71 |
is_nullable: 1 |
72 |
size: 20 |
73 |
|
74 |
Status of batch |
75 |
|
76 |
=cut |
77 |
|
78 |
__PACKAGE__->add_columns( |
79 |
"id", |
80 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
81 |
"name", |
82 |
{ data_type => "varchar", is_nullable => 0, size => 100 }, |
83 |
"backend", |
84 |
{ data_type => "varchar", is_nullable => 0, size => 20 }, |
85 |
"borrowernumber", |
86 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
87 |
"branchcode", |
88 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 50 }, |
89 |
"statuscode", |
90 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 20 }, |
91 |
); |
92 |
|
93 |
=head1 PRIMARY KEY |
94 |
|
95 |
=over 4 |
96 |
|
97 |
=item * L</id> |
98 |
|
99 |
=back |
100 |
|
101 |
=cut |
102 |
|
103 |
__PACKAGE__->set_primary_key("id"); |
104 |
|
105 |
=head1 UNIQUE CONSTRAINTS |
106 |
|
107 |
=head2 C<u_illbatches__name> |
108 |
|
109 |
=over 4 |
110 |
|
111 |
=item * L</name> |
112 |
|
113 |
=back |
114 |
|
115 |
=cut |
116 |
|
117 |
__PACKAGE__->add_unique_constraint("u_illbatches__name", ["name"]); |
118 |
|
119 |
=head1 RELATIONS |
120 |
|
121 |
=head2 borrowernumber |
122 |
|
123 |
Type: belongs_to |
124 |
|
125 |
Related object: L<Koha::Schema::Result::Borrower> |
126 |
|
127 |
=cut |
128 |
|
129 |
__PACKAGE__->belongs_to( |
130 |
"borrowernumber", |
131 |
"Koha::Schema::Result::Borrower", |
132 |
{ borrowernumber => "borrowernumber" }, |
133 |
{ |
134 |
is_deferrable => 1, |
135 |
join_type => "LEFT", |
136 |
on_delete => "SET NULL", |
137 |
on_update => "CASCADE", |
138 |
}, |
139 |
); |
140 |
|
141 |
=head2 branchcode |
142 |
|
143 |
Type: belongs_to |
144 |
|
145 |
Related object: L<Koha::Schema::Result::Branch> |
146 |
|
147 |
=cut |
148 |
|
149 |
__PACKAGE__->belongs_to( |
150 |
"branchcode", |
151 |
"Koha::Schema::Result::Branch", |
152 |
{ branchcode => "branchcode" }, |
153 |
{ |
154 |
is_deferrable => 1, |
155 |
join_type => "LEFT", |
156 |
on_delete => "SET NULL", |
157 |
on_update => "CASCADE", |
158 |
}, |
159 |
); |
160 |
|
161 |
=head2 illrequests |
162 |
|
163 |
Type: has_many |
164 |
|
165 |
Related object: L<Koha::Schema::Result::Illrequest> |
166 |
|
167 |
=cut |
168 |
|
169 |
__PACKAGE__->has_many( |
170 |
"illrequests", |
171 |
"Koha::Schema::Result::Illrequest", |
172 |
{ "foreign.batch_id" => "self.id" }, |
173 |
{ cascade_copy => 0, cascade_delete => 0 }, |
174 |
); |
175 |
|
176 |
=head2 statuscode |
177 |
|
178 |
Type: belongs_to |
179 |
|
180 |
Related object: L<Koha::Schema::Result::IllbatchStatus> |
181 |
|
182 |
=cut |
183 |
|
184 |
__PACKAGE__->belongs_to( |
185 |
"statuscode", |
186 |
"Koha::Schema::Result::IllbatchStatus", |
187 |
{ code => "statuscode" }, |
188 |
{ |
189 |
is_deferrable => 1, |
190 |
join_type => "LEFT", |
191 |
on_delete => "SET NULL", |
192 |
on_update => "CASCADE", |
193 |
}, |
194 |
); |
195 |
|
196 |
|
197 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-09-08 13:49:29 |
198 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YKxQxJMKxdBP9X4+i0Rfzw |
199 |
|
200 |
1; |