2 package Koha::Schema::Result::CheckoutRenewal;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CheckoutRenewal
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<checkout_renewals>
22 __PACKAGE__->table("checkout_renewals");
37 the id of the checkout this renewal pertains to
45 the id of the user who processed the renewal
53 boolean denoting whether the item was present or not
61 the interface this renewal took place on
65 data_type: 'timestamp'
66 datetime_undef_if_invalid: 1
67 default_value: current_timestamp
70 the date and time the renewal took place
75 default_value: 'Manual'
76 extra: {list => ["Automatic","Manual"]}
79 whether the renewal was an automatic or manual renewal
83 __PACKAGE__->add_columns(
85 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
87 { data_type => "integer", is_nullable => 1 },
89 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
91 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
93 { data_type => "varchar", is_nullable => 0, size => 16 },
96 data_type => "timestamp",
97 datetime_undef_if_invalid => 1,
98 default_value => \"current_timestamp",
104 default_value => "Manual",
105 extra => { list => ["Automatic", "Manual"] },
114 =item * L</renewal_id>
120 __PACKAGE__->set_primary_key("renewal_id");
128 Related object: L<Koha::Schema::Result::Borrower>
132 __PACKAGE__->belongs_to(
134 "Koha::Schema::Result::Borrower",
135 { borrowernumber => "renewer_id" },
139 on_delete => "SET NULL",
140 on_update => "CASCADE",
145 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-12-08 10:49:16
146 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Si1gkXWqpvt98YN0dO7vgw
152 Related object: L<Koha::Schema::Result::Issue>
156 __PACKAGE__->belongs_to(
158 "Koha::Schema::Result::Issue",
159 { "foreign.issue_id" => "self.checkout_id" },
170 Related object: L<Koha::Schema::Result::OldIssue>
174 __PACKAGE__->belongs_to(
176 "Koha::Schema::Result::OldIssue",
177 { "foreign.issue_id" => "self.checkout_id" },
184 __PACKAGE__->add_columns(
185 '+seen' => { is_boolean => 1 }
188 sub koha_objects_class {
189 'Koha::Checkouts::Renewals';
191 sub koha_object_class {
192 'Koha::Checkouts::Renewal';