2 package Koha::Schema::Result::OldIssue;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::OldIssue
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<old_issues>
22 __PACKAGE__->table("old_issues");
31 primary key for issues table
39 foreign key, linking this to the borrowers table for the patron this item was checked out to
47 foreign key, linking this to the borrowers table for the user who checked out this item
55 foreign key, linking this to the items table for the item that was checked out
60 datetime_undef_if_invalid: 1
63 date the item is due (yyyy-mm-dd)
71 foreign key, linking to the branches table for the location the item was checked out
76 datetime_undef_if_invalid: 1
79 date the item was returned
81 =head2 lastreneweddate
84 datetime_undef_if_invalid: 1
87 date the item was last renewed
95 lists the number of times the item was renewed
97 =head2 unseen_renewals
103 lists the number of consecutive times the item was renewed without being seen
113 =head2 auto_renew_error
119 automatic renewal error
123 data_type: 'timestamp'
124 datetime_undef_if_invalid: 1
125 default_value: current_timestamp
128 the date and time this record was last touched
132 data_type: 'datetime'
133 datetime_undef_if_invalid: 1
136 date the item was checked out or issued
138 =head2 onsite_checkout
148 data_type: 'longtext'
155 data_type: 'datetime'
156 datetime_undef_if_invalid: 1
159 datetime of issue note (yyyy-mm-dd hh:mm::ss)
166 describes whether checkout note has been seen 1, not been seen 0 or doesn't exist null
170 __PACKAGE__->add_columns(
172 { data_type => "integer", is_nullable => 0 },
174 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
176 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
178 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
181 data_type => "datetime",
182 datetime_undef_if_invalid => 1,
186 { data_type => "varchar", is_nullable => 1, size => 10 },
189 data_type => "datetime",
190 datetime_undef_if_invalid => 1,
195 data_type => "datetime",
196 datetime_undef_if_invalid => 1,
200 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
202 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
204 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
206 { data_type => "varchar", is_nullable => 1, size => 32 },
209 data_type => "timestamp",
210 datetime_undef_if_invalid => 1,
211 default_value => \"current_timestamp",
216 data_type => "datetime",
217 datetime_undef_if_invalid => 1,
221 { data_type => "integer", default_value => 0, is_nullable => 0 },
223 { data_type => "longtext", is_nullable => 1 },
226 data_type => "datetime",
227 datetime_undef_if_invalid => 1,
231 { data_type => "integer", is_nullable => 1 },
244 __PACKAGE__->set_primary_key("issue_id");
248 =head2 borrowernumber
252 Related object: L<Koha::Schema::Result::Borrower>
256 __PACKAGE__->belongs_to(
258 "Koha::Schema::Result::Borrower",
259 { borrowernumber => "borrowernumber" },
263 on_delete => "SET NULL",
264 on_update => "SET NULL",
272 Related object: L<Koha::Schema::Result::Borrower>
276 __PACKAGE__->belongs_to(
278 "Koha::Schema::Result::Borrower",
279 { borrowernumber => "issuer_id" },
283 on_delete => "SET NULL",
284 on_update => "CASCADE",
292 Related object: L<Koha::Schema::Result::Item>
296 __PACKAGE__->belongs_to(
298 "Koha::Schema::Result::Item",
299 { itemnumber => "itemnumber" },
303 on_delete => "SET NULL",
304 on_update => "SET NULL",
309 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
310 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BWwXBAuls9a0HhscR0WlGQ
312 __PACKAGE__->add_columns(
313 '+auto_renew' => { is_boolean => 1 },
314 '+onsite_checkout' => { is_boolean => 1 }
317 __PACKAGE__->belongs_to(
319 "Koha::Schema::Result::Borrower",
320 { borrowernumber => "borrowernumber" },
321 { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
324 __PACKAGE__->belongs_to(
326 "Koha::Schema::Result::Item",
327 { itemnumber => "itemnumber" },
331 on_delete => "CASCADE",
332 on_update => "CASCADE",
336 __PACKAGE__->belongs_to(
338 "Koha::Schema::Result::Branch",
339 { "foreign.branchcode" => "self.branchcode" },
346 sub koha_object_class {
347 'Koha::Old::Checkout';
349 sub koha_objects_class {
350 'Koha::Old::Checkouts';