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 |
=head2 name |
33 |
|
34 |
data_type: 'varchar' |
35 |
is_nullable: 0 |
36 |
size: 100 |
37 |
|
38 |
=head2 backend |
39 |
|
40 |
data_type: 'varchar' |
41 |
is_nullable: 0 |
42 |
size: 20 |
43 |
|
44 |
=head2 borrowernumber |
45 |
|
46 |
data_type: 'integer' |
47 |
is_foreign_key: 1 |
48 |
is_nullable: 1 |
49 |
|
50 |
=head2 branchcode |
51 |
|
52 |
data_type: 'varchar' |
53 |
is_foreign_key: 1 |
54 |
is_nullable: 1 |
55 |
size: 50 |
56 |
|
57 |
=head2 statuscode |
58 |
|
59 |
data_type: 'varchar' |
60 |
is_foreign_key: 1 |
61 |
is_nullable: 1 |
62 |
size: 20 |
63 |
|
64 |
=cut |
65 |
|
66 |
__PACKAGE__->add_columns( |
67 |
"id", |
68 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
69 |
"name", |
70 |
{ data_type => "varchar", is_nullable => 0, size => 100 }, |
71 |
"backend", |
72 |
{ data_type => "varchar", is_nullable => 0, size => 20 }, |
73 |
"borrowernumber", |
74 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
75 |
"branchcode", |
76 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 50 }, |
77 |
"statuscode", |
78 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 20 }, |
79 |
); |
80 |
|
81 |
=head1 PRIMARY KEY |
82 |
|
83 |
=over 4 |
84 |
|
85 |
=item * L</id> |
86 |
|
87 |
=back |
88 |
|
89 |
=cut |
90 |
|
91 |
__PACKAGE__->set_primary_key("id"); |
92 |
|
93 |
=head1 UNIQUE CONSTRAINTS |
94 |
|
95 |
=head2 C<u_illbatches__name> |
96 |
|
97 |
=over 4 |
98 |
|
99 |
=item * L</name> |
100 |
|
101 |
=back |
102 |
|
103 |
=cut |
104 |
|
105 |
__PACKAGE__->add_unique_constraint("u_illbatches__name", ["name"]); |
106 |
|
107 |
=head1 RELATIONS |
108 |
|
109 |
=head2 borrowernumber |
110 |
|
111 |
Type: belongs_to |
112 |
|
113 |
Related object: L<Koha::Schema::Result::Borrower> |
114 |
|
115 |
=cut |
116 |
|
117 |
__PACKAGE__->belongs_to( |
118 |
"borrowernumber", |
119 |
"Koha::Schema::Result::Borrower", |
120 |
{ borrowernumber => "borrowernumber" }, |
121 |
{ |
122 |
is_deferrable => 1, |
123 |
join_type => "LEFT", |
124 |
on_delete => "SET NULL", |
125 |
on_update => "CASCADE", |
126 |
}, |
127 |
); |
128 |
|
129 |
=head2 branchcode |
130 |
|
131 |
Type: belongs_to |
132 |
|
133 |
Related object: L<Koha::Schema::Result::Branch> |
134 |
|
135 |
=cut |
136 |
|
137 |
__PACKAGE__->belongs_to( |
138 |
"branchcode", |
139 |
"Koha::Schema::Result::Branch", |
140 |
{ branchcode => "branchcode" }, |
141 |
{ |
142 |
is_deferrable => 1, |
143 |
join_type => "LEFT", |
144 |
on_delete => "SET NULL", |
145 |
on_update => "CASCADE", |
146 |
}, |
147 |
); |
148 |
|
149 |
=head2 illrequests |
150 |
|
151 |
Type: has_many |
152 |
|
153 |
Related object: L<Koha::Schema::Result::Illrequest> |
154 |
|
155 |
=cut |
156 |
|
157 |
__PACKAGE__->has_many( |
158 |
"illrequests", |
159 |
"Koha::Schema::Result::Illrequest", |
160 |
{ "foreign.batch_id" => "self.id" }, |
161 |
{ cascade_copy => 0, cascade_delete => 0 }, |
162 |
); |
163 |
|
164 |
=head2 statuscode |
165 |
|
166 |
Type: belongs_to |
167 |
|
168 |
Related object: L<Koha::Schema::Result::IllbatchStatus> |
169 |
|
170 |
=cut |
171 |
|
172 |
__PACKAGE__->belongs_to( |
173 |
"statuscode", |
174 |
"Koha::Schema::Result::IllbatchStatus", |
175 |
{ code => "statuscode" }, |
176 |
{ |
177 |
is_deferrable => 1, |
178 |
join_type => "LEFT", |
179 |
on_delete => "SET NULL", |
180 |
on_update => "CASCADE", |
181 |
}, |
182 |
); |
183 |
|
184 |
|
185 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-28 11:24:22 |
186 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j4UhTuwaQnwWhjSd9j35tg |
187 |
|
188 |
|
189 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
190 |
1; |