2 package Koha::Schema::Result::ReturnClaim;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::ReturnClaim
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<return_claims>
22 __PACKAGE__->table("return_claims");
32 Unique ID of the return claim
47 ID of the checkout that triggered the claim
59 data_type: 'mediumtext'
66 data_type: 'timestamp'
67 datetime_undef_if_invalid: 1
70 Time and date the claim was created
78 ID of the staff member that registered the claim
82 data_type: 'timestamp'
83 datetime_undef_if_invalid: 1
86 Time and date of the latest change on the claim (notes)
94 ID of the staff member that updated the claim
102 Resolution code (RETURN_CLAIM_RESOLUTION AVs)
106 data_type: 'timestamp'
107 datetime_undef_if_invalid: 1
110 Time and date the claim was resolved
118 ID of the staff member that resolved the claim
122 __PACKAGE__->add_columns(
124 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
126 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
128 { data_type => "integer", is_nullable => 1 },
130 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
132 { data_type => "mediumtext", is_nullable => 1 },
135 data_type => "timestamp",
136 datetime_undef_if_invalid => 1,
140 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
143 data_type => "timestamp",
144 datetime_undef_if_invalid => 1,
148 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
150 { data_type => "varchar", is_nullable => 1, size => 80 },
153 data_type => "timestamp",
154 datetime_undef_if_invalid => 1,
158 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
171 __PACKAGE__->set_primary_key("id");
173 =head1 UNIQUE CONSTRAINTS
185 __PACKAGE__->add_unique_constraint("issue_id", ["issue_id"]);
189 =head2 borrowernumber
193 Related object: L<Koha::Schema::Result::Borrower>
197 __PACKAGE__->belongs_to(
199 "Koha::Schema::Result::Borrower",
200 { borrowernumber => "borrowernumber" },
201 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
208 Related object: L<Koha::Schema::Result::Borrower>
212 __PACKAGE__->belongs_to(
214 "Koha::Schema::Result::Borrower",
215 { borrowernumber => "created_by" },
219 on_delete => "SET NULL",
220 on_update => "CASCADE",
228 Related object: L<Koha::Schema::Result::Item>
232 __PACKAGE__->belongs_to(
234 "Koha::Schema::Result::Item",
235 { itemnumber => "itemnumber" },
236 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
243 Related object: L<Koha::Schema::Result::Borrower>
247 __PACKAGE__->belongs_to(
249 "Koha::Schema::Result::Borrower",
250 { borrowernumber => "resolved_by" },
254 on_delete => "SET NULL",
255 on_update => "CASCADE",
263 Related object: L<Koha::Schema::Result::Borrower>
267 __PACKAGE__->belongs_to(
269 "Koha::Schema::Result::Borrower",
270 { borrowernumber => "updated_by" },
274 on_delete => "SET NULL",
275 on_update => "CASCADE",
280 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-17 10:01:24
281 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ik93SD3kLNecIyRgsBVKDQ
287 Related object: L<Koha::Schema::Result::Issue>
291 __PACKAGE__->belongs_to(
293 "Koha::Schema::Result::Issue",
294 { issue_id => "issue_id" },
305 Related object: L<Koha::Schema::Result::OldIssue>
309 __PACKAGE__->belongs_to(
311 "Koha::Schema::Result::OldIssue",
312 { issue_id => "issue_id" },
319 sub koha_objects_class {
320 'Koha::Checkouts::ReturnClaims';
322 sub koha_object_class {
323 'Koha::Checkouts::ReturnClaim';