Bug 22273: DBRev 19.12.00.031
[koha.git] / Koha / Schema / Result / ReturnClaim.pm
1 use utf8;
2 package Koha::Schema::Result::ReturnClaim;
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::ReturnClaim
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<return_claims>
19
20 =cut
21
22 __PACKAGE__->table("return_claims");
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 itemnumber
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 issue_id
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 1
43
44 =head2 borrowernumber
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 0
49
50 =head2 notes
51
52   data_type: 'mediumtext'
53   is_nullable: 1
54
55 =head2 created_on
56
57   data_type: 'timestamp'
58   datetime_undef_if_invalid: 1
59   is_nullable: 1
60
61 =head2 created_by
62
63   data_type: 'integer'
64   is_foreign_key: 1
65   is_nullable: 1
66
67 =head2 updated_on
68
69   data_type: 'timestamp'
70   datetime_undef_if_invalid: 1
71   is_nullable: 1
72
73 =head2 updated_by
74
75   data_type: 'integer'
76   is_foreign_key: 1
77   is_nullable: 1
78
79 =head2 resolution
80
81   data_type: 'varchar'
82   is_nullable: 1
83   size: 80
84
85 =head2 resolved_on
86
87   data_type: 'timestamp'
88   datetime_undef_if_invalid: 1
89   is_nullable: 1
90
91 =head2 resolved_by
92
93   data_type: 'integer'
94   is_foreign_key: 1
95   is_nullable: 1
96
97 =cut
98
99 __PACKAGE__->add_columns(
100   "id",
101   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
102   "itemnumber",
103   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
104   "issue_id",
105   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
106   "borrowernumber",
107   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
108   "notes",
109   { data_type => "mediumtext", is_nullable => 1 },
110   "created_on",
111   {
112     data_type => "timestamp",
113     datetime_undef_if_invalid => 1,
114     is_nullable => 1,
115   },
116   "created_by",
117   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
118   "updated_on",
119   {
120     data_type => "timestamp",
121     datetime_undef_if_invalid => 1,
122     is_nullable => 1,
123   },
124   "updated_by",
125   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
126   "resolution",
127   { data_type => "varchar", is_nullable => 1, size => 80 },
128   "resolved_on",
129   {
130     data_type => "timestamp",
131     datetime_undef_if_invalid => 1,
132     is_nullable => 1,
133   },
134   "resolved_by",
135   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
136 );
137
138 =head1 PRIMARY KEY
139
140 =over 4
141
142 =item * L</id>
143
144 =back
145
146 =cut
147
148 __PACKAGE__->set_primary_key("id");
149
150 =head1 UNIQUE CONSTRAINTS
151
152 =head2 C<issue_id>
153
154 =over 4
155
156 =item * L</issue_id>
157
158 =back
159
160 =cut
161
162 __PACKAGE__->add_unique_constraint("issue_id", ["issue_id"]);
163
164 =head1 RELATIONS
165
166 =head2 borrowernumber
167
168 Type: belongs_to
169
170 Related object: L<Koha::Schema::Result::Borrower>
171
172 =cut
173
174 __PACKAGE__->belongs_to(
175   "borrowernumber",
176   "Koha::Schema::Result::Borrower",
177   { borrowernumber => "borrowernumber" },
178   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
179 );
180
181 =head2 created_by
182
183 Type: belongs_to
184
185 Related object: L<Koha::Schema::Result::Borrower>
186
187 =cut
188
189 __PACKAGE__->belongs_to(
190   "created_by",
191   "Koha::Schema::Result::Borrower",
192   { borrowernumber => "created_by" },
193   {
194     is_deferrable => 1,
195     join_type     => "LEFT",
196     on_delete     => "SET NULL",
197     on_update     => "CASCADE",
198   },
199 );
200
201 =head2 issue
202
203 Type: belongs_to
204
205 Related object: L<Koha::Schema::Result::Issue>
206
207 =cut
208
209 __PACKAGE__->belongs_to(
210   "issue",
211   "Koha::Schema::Result::Issue",
212   { issue_id => "issue_id" },
213   {
214     is_deferrable => 1,
215     join_type     => "LEFT",
216     on_delete     => "SET NULL",
217     on_update     => "CASCADE",
218   },
219 );
220
221 =head2 itemnumber
222
223 Type: belongs_to
224
225 Related object: L<Koha::Schema::Result::Item>
226
227 =cut
228
229 __PACKAGE__->belongs_to(
230   "itemnumber",
231   "Koha::Schema::Result::Item",
232   { itemnumber => "itemnumber" },
233   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
234 );
235
236 =head2 resolved_by
237
238 Type: belongs_to
239
240 Related object: L<Koha::Schema::Result::Borrower>
241
242 =cut
243
244 __PACKAGE__->belongs_to(
245   "resolved_by",
246   "Koha::Schema::Result::Borrower",
247   { borrowernumber => "resolved_by" },
248   {
249     is_deferrable => 1,
250     join_type     => "LEFT",
251     on_delete     => "SET NULL",
252     on_update     => "CASCADE",
253   },
254 );
255
256 =head2 updated_by
257
258 Type: belongs_to
259
260 Related object: L<Koha::Schema::Result::Borrower>
261
262 =cut
263
264 __PACKAGE__->belongs_to(
265   "updated_by",
266   "Koha::Schema::Result::Borrower",
267   { borrowernumber => "updated_by" },
268   {
269     is_deferrable => 1,
270     join_type     => "LEFT",
271     on_delete     => "SET NULL",
272     on_update     => "CASCADE",
273   },
274 );
275
276
277 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-31 12:18:39
278 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a1MJxAPCP8yuYvzkXp5q8w
279
280 sub koha_objects_class {
281     'Koha::Checkouts::ReturnClaims';
282 }
283 sub koha_object_class {
284     'Koha::Checkouts::ReturnClaim';
285 }
286
287 1;