Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / ReturnClaim.pm
blobf088a80fd6896621d762cd6c69a08628c67f8c46
1 use utf8;
2 package Koha::Schema::Result::ReturnClaim;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ReturnClaim
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<return_claims>
20 =cut
22 __PACKAGE__->table("return_claims");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 itemnumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 issue_id
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
44 =head2 borrowernumber
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 0
50 =head2 notes
52 data_type: 'mediumtext'
53 is_nullable: 1
55 =head2 created_on
57 data_type: 'timestamp'
58 datetime_undef_if_invalid: 1
59 is_nullable: 1
61 =head2 created_by
63 data_type: 'integer'
64 is_foreign_key: 1
65 is_nullable: 1
67 =head2 updated_on
69 data_type: 'timestamp'
70 datetime_undef_if_invalid: 1
71 is_nullable: 1
73 =head2 updated_by
75 data_type: 'integer'
76 is_foreign_key: 1
77 is_nullable: 1
79 =head2 resolution
81 data_type: 'varchar'
82 is_nullable: 1
83 size: 80
85 =head2 resolved_on
87 data_type: 'timestamp'
88 datetime_undef_if_invalid: 1
89 is_nullable: 1
91 =head2 resolved_by
93 data_type: 'integer'
94 is_foreign_key: 1
95 is_nullable: 1
97 =cut
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",
112 data_type => "timestamp",
113 datetime_undef_if_invalid => 1,
114 is_nullable => 1,
116 "created_by",
117 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
118 "updated_on",
120 data_type => "timestamp",
121 datetime_undef_if_invalid => 1,
122 is_nullable => 1,
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",
130 data_type => "timestamp",
131 datetime_undef_if_invalid => 1,
132 is_nullable => 1,
134 "resolved_by",
135 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
138 =head1 PRIMARY KEY
140 =over 4
142 =item * L</id>
144 =back
146 =cut
148 __PACKAGE__->set_primary_key("id");
150 =head1 UNIQUE CONSTRAINTS
152 =head2 C<issue_id>
154 =over 4
156 =item * L</issue_id>
158 =back
160 =cut
162 __PACKAGE__->add_unique_constraint("issue_id", ["issue_id"]);
164 =head1 RELATIONS
166 =head2 borrowernumber
168 Type: belongs_to
170 Related object: L<Koha::Schema::Result::Borrower>
172 =cut
174 __PACKAGE__->belongs_to(
175 "borrowernumber",
176 "Koha::Schema::Result::Borrower",
177 { borrowernumber => "borrowernumber" },
178 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
181 =head2 created_by
183 Type: belongs_to
185 Related object: L<Koha::Schema::Result::Borrower>
187 =cut
189 __PACKAGE__->belongs_to(
190 "created_by",
191 "Koha::Schema::Result::Borrower",
192 { borrowernumber => "created_by" },
194 is_deferrable => 1,
195 join_type => "LEFT",
196 on_delete => "SET NULL",
197 on_update => "CASCADE",
201 =head2 issue
203 Type: belongs_to
205 Related object: L<Koha::Schema::Result::Issue>
207 =cut
209 __PACKAGE__->belongs_to(
210 "issue",
211 "Koha::Schema::Result::Issue",
212 { issue_id => "issue_id" },
214 is_deferrable => 1,
215 join_type => "LEFT",
216 on_delete => "SET NULL",
217 on_update => "CASCADE",
221 =head2 itemnumber
223 Type: belongs_to
225 Related object: L<Koha::Schema::Result::Item>
227 =cut
229 __PACKAGE__->belongs_to(
230 "itemnumber",
231 "Koha::Schema::Result::Item",
232 { itemnumber => "itemnumber" },
233 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
236 =head2 resolved_by
238 Type: belongs_to
240 Related object: L<Koha::Schema::Result::Borrower>
242 =cut
244 __PACKAGE__->belongs_to(
245 "resolved_by",
246 "Koha::Schema::Result::Borrower",
247 { borrowernumber => "resolved_by" },
249 is_deferrable => 1,
250 join_type => "LEFT",
251 on_delete => "SET NULL",
252 on_update => "CASCADE",
256 =head2 updated_by
258 Type: belongs_to
260 Related object: L<Koha::Schema::Result::Borrower>
262 =cut
264 __PACKAGE__->belongs_to(
265 "updated_by",
266 "Koha::Schema::Result::Borrower",
267 { borrowernumber => "updated_by" },
269 is_deferrable => 1,
270 join_type => "LEFT",
271 on_delete => "SET NULL",
272 on_update => "CASCADE",
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
280 sub koha_objects_class {
281 'Koha::Checkouts::ReturnClaims';
283 sub koha_object_class {
284 'Koha::Checkouts::ReturnClaim';