Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::CheckoutRenewal; |
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::CheckoutRenewal |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<checkout_renewals> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("checkout_renewals"); |
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 issue_id |
33 |
|
34 |
data_type: 'integer' |
35 |
is_nullable: 1 |
36 |
|
37 |
the id of the issue this renewal pertains to |
38 |
|
39 |
=head2 renewer_id |
40 |
|
41 |
data_type: 'integer' |
42 |
is_foreign_key: 1 |
43 |
is_nullable: 1 |
44 |
|
45 |
the id of the user who processed the renewal |
46 |
|
47 |
=head2 seen |
48 |
|
49 |
data_type: 'tinyint' |
50 |
default_value: 0 |
51 |
is_nullable: 1 |
52 |
|
53 |
boolean denoting whether the item was present or not |
54 |
|
55 |
=head2 interface |
56 |
|
57 |
data_type: 'varchar' |
58 |
is_nullable: 0 |
59 |
size: 16 |
60 |
|
61 |
the interface this renewal took place on |
62 |
|
63 |
=head2 timestamp |
64 |
|
65 |
data_type: 'timestamp' |
66 |
datetime_undef_if_invalid: 1 |
67 |
default_value: current_timestamp |
68 |
is_nullable: 0 |
69 |
|
70 |
the date and time the renewal took place |
71 |
|
72 |
=cut |
73 |
|
74 |
__PACKAGE__->add_columns( |
75 |
"id", |
76 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
77 |
"issue_id", |
78 |
{ data_type => "integer", is_nullable => 1 }, |
79 |
"renewer_id", |
80 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
81 |
"seen", |
82 |
{ data_type => "tinyint", default_value => 0, is_nullable => 1 }, |
83 |
"interface", |
84 |
{ data_type => "varchar", is_nullable => 0, size => 16 }, |
85 |
"timestamp", |
86 |
{ |
87 |
data_type => "timestamp", |
88 |
datetime_undef_if_invalid => 1, |
89 |
default_value => \"current_timestamp", |
90 |
is_nullable => 0, |
91 |
}, |
92 |
); |
93 |
|
94 |
=head1 PRIMARY KEY |
95 |
|
96 |
=over 4 |
97 |
|
98 |
=item * L</id> |
99 |
|
100 |
=back |
101 |
|
102 |
=cut |
103 |
|
104 |
__PACKAGE__->set_primary_key("id"); |
105 |
|
106 |
=head1 RELATIONS |
107 |
|
108 |
=head2 renewer |
109 |
|
110 |
Type: belongs_to |
111 |
|
112 |
Related object: L<Koha::Schema::Result::Borrower> |
113 |
|
114 |
=cut |
115 |
|
116 |
__PACKAGE__->belongs_to( |
117 |
"renewer", |
118 |
"Koha::Schema::Result::Borrower", |
119 |
{ borrowernumber => "renewer_id" }, |
120 |
{ |
121 |
is_deferrable => 1, |
122 |
join_type => "LEFT", |
123 |
on_delete => "SET NULL", |
124 |
on_update => "CASCADE", |
125 |
}, |
126 |
); |
127 |
|
128 |
|
129 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-11 16:33:50 |
130 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:agLgLnVeKYB5wdWS06xD0A |
131 |
|
132 |
|
133 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
134 |
1; |