Lines 1-21
Link Here
|
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::Issue; |
1 |
package Koha::Schema::Result::Issue; |
3 |
|
2 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
3 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
4 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
5 |
|
7 |
=head1 NAME |
|
|
8 |
|
9 |
Koha::Schema::Result::Issue |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
6 |
use strict; |
14 |
use warnings; |
7 |
use warnings; |
15 |
|
8 |
|
16 |
use base 'DBIx::Class::Core'; |
9 |
use base 'DBIx::Class::Core'; |
17 |
|
10 |
|
18 |
=head1 TABLE: C<issues> |
11 |
|
|
|
12 |
=head1 NAME |
13 |
|
14 |
Koha::Schema::Result::Issue |
19 |
|
15 |
|
20 |
=cut |
16 |
=cut |
21 |
|
17 |
|
Lines 23-28
__PACKAGE__->table("issues");
Link Here
|
23 |
|
19 |
|
24 |
=head1 ACCESSORS |
20 |
=head1 ACCESSORS |
25 |
|
21 |
|
|
|
22 |
=head2 issue_id |
23 |
|
24 |
data_type: 'integer' |
25 |
is_auto_increment: 1 |
26 |
is_nullable: 0 |
27 |
|
26 |
=head2 borrowernumber |
28 |
=head2 borrowernumber |
27 |
|
29 |
|
28 |
data_type: 'integer' |
30 |
data_type: 'integer' |
Lines 38-44
__PACKAGE__->table("issues");
Link Here
|
38 |
=head2 date_due |
40 |
=head2 date_due |
39 |
|
41 |
|
40 |
data_type: 'datetime' |
42 |
data_type: 'datetime' |
41 |
datetime_undef_if_invalid: 1 |
|
|
42 |
is_nullable: 1 |
43 |
is_nullable: 1 |
43 |
|
44 |
|
44 |
=head2 branchcode |
45 |
=head2 branchcode |
Lines 56-68
__PACKAGE__->table("issues");
Link Here
|
56 |
=head2 returndate |
57 |
=head2 returndate |
57 |
|
58 |
|
58 |
data_type: 'datetime' |
59 |
data_type: 'datetime' |
59 |
datetime_undef_if_invalid: 1 |
|
|
60 |
is_nullable: 1 |
60 |
is_nullable: 1 |
61 |
|
61 |
|
62 |
=head2 lastreneweddate |
62 |
=head2 lastreneweddate |
63 |
|
63 |
|
64 |
data_type: 'datetime' |
64 |
data_type: 'datetime' |
65 |
datetime_undef_if_invalid: 1 |
|
|
66 |
is_nullable: 1 |
65 |
is_nullable: 1 |
67 |
|
66 |
|
68 |
=head2 return |
67 |
=head2 return |
Lines 79-141
__PACKAGE__->table("issues");
Link Here
|
79 |
=head2 timestamp |
78 |
=head2 timestamp |
80 |
|
79 |
|
81 |
data_type: 'timestamp' |
80 |
data_type: 'timestamp' |
82 |
datetime_undef_if_invalid: 1 |
|
|
83 |
default_value: current_timestamp |
81 |
default_value: current_timestamp |
84 |
is_nullable: 0 |
82 |
is_nullable: 0 |
85 |
|
83 |
|
86 |
=head2 issuedate |
84 |
=head2 issuedate |
87 |
|
85 |
|
88 |
data_type: 'datetime' |
86 |
data_type: 'datetime' |
89 |
datetime_undef_if_invalid: 1 |
|
|
90 |
is_nullable: 1 |
87 |
is_nullable: 1 |
91 |
|
88 |
|
92 |
=cut |
89 |
=cut |
93 |
|
90 |
|
94 |
__PACKAGE__->add_columns( |
91 |
__PACKAGE__->add_columns( |
|
|
92 |
"issue_id", |
93 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
95 |
"borrowernumber", |
94 |
"borrowernumber", |
96 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
95 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
97 |
"itemnumber", |
96 |
"itemnumber", |
98 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
97 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
99 |
"date_due", |
98 |
"date_due", |
100 |
{ |
99 |
{ data_type => "datetime", is_nullable => 1 }, |
101 |
data_type => "datetime", |
|
|
102 |
datetime_undef_if_invalid => 1, |
103 |
is_nullable => 1, |
104 |
}, |
105 |
"branchcode", |
100 |
"branchcode", |
106 |
{ data_type => "varchar", is_nullable => 1, size => 10 }, |
101 |
{ data_type => "varchar", is_nullable => 1, size => 10 }, |
107 |
"issuingbranch", |
102 |
"issuingbranch", |
108 |
{ data_type => "varchar", is_nullable => 1, size => 18 }, |
103 |
{ data_type => "varchar", is_nullable => 1, size => 18 }, |
109 |
"returndate", |
104 |
"returndate", |
110 |
{ |
105 |
{ data_type => "datetime", is_nullable => 1 }, |
111 |
data_type => "datetime", |
|
|
112 |
datetime_undef_if_invalid => 1, |
113 |
is_nullable => 1, |
114 |
}, |
115 |
"lastreneweddate", |
106 |
"lastreneweddate", |
116 |
{ |
107 |
{ data_type => "datetime", is_nullable => 1 }, |
117 |
data_type => "datetime", |
|
|
118 |
datetime_undef_if_invalid => 1, |
119 |
is_nullable => 1, |
120 |
}, |
121 |
"return", |
108 |
"return", |
122 |
{ data_type => "varchar", is_nullable => 1, size => 4 }, |
109 |
{ data_type => "varchar", is_nullable => 1, size => 4 }, |
123 |
"renewals", |
110 |
"renewals", |
124 |
{ data_type => "tinyint", is_nullable => 1 }, |
111 |
{ data_type => "tinyint", is_nullable => 1 }, |
125 |
"timestamp", |
112 |
"timestamp", |
126 |
{ |
113 |
{ |
127 |
data_type => "timestamp", |
114 |
data_type => "timestamp", |
128 |
datetime_undef_if_invalid => 1, |
|
|
129 |
default_value => \"current_timestamp", |
115 |
default_value => \"current_timestamp", |
130 |
is_nullable => 0, |
116 |
is_nullable => 0, |
131 |
}, |
117 |
}, |
132 |
"issuedate", |
118 |
"issuedate", |
133 |
{ |
119 |
{ data_type => "datetime", is_nullable => 1 }, |
134 |
data_type => "datetime", |
|
|
135 |
datetime_undef_if_invalid => 1, |
136 |
is_nullable => 1, |
137 |
}, |
138 |
); |
120 |
); |
|
|
121 |
__PACKAGE__->set_primary_key("issue_id"); |
139 |
|
122 |
|
140 |
=head1 RELATIONS |
123 |
=head1 RELATIONS |
141 |
|
124 |
|
Lines 151-162
__PACKAGE__->belongs_to(
Link Here
|
151 |
"borrowernumber", |
134 |
"borrowernumber", |
152 |
"Koha::Schema::Result::Borrower", |
135 |
"Koha::Schema::Result::Borrower", |
153 |
{ borrowernumber => "borrowernumber" }, |
136 |
{ borrowernumber => "borrowernumber" }, |
154 |
{ |
137 |
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, |
155 |
is_deferrable => 1, |
|
|
156 |
join_type => "LEFT", |
157 |
on_delete => "CASCADE", |
158 |
on_update => "CASCADE", |
159 |
}, |
160 |
); |
138 |
); |
161 |
|
139 |
|
162 |
=head2 itemnumber |
140 |
=head2 itemnumber |
Lines 171-187
__PACKAGE__->belongs_to(
Link Here
|
171 |
"itemnumber", |
149 |
"itemnumber", |
172 |
"Koha::Schema::Result::Item", |
150 |
"Koha::Schema::Result::Item", |
173 |
{ itemnumber => "itemnumber" }, |
151 |
{ itemnumber => "itemnumber" }, |
174 |
{ |
152 |
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, |
175 |
is_deferrable => 1, |
|
|
176 |
join_type => "LEFT", |
177 |
on_delete => "CASCADE", |
178 |
on_update => "CASCADE", |
179 |
}, |
180 |
); |
153 |
); |
181 |
|
154 |
|
182 |
|
155 |
|
183 |
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 |
156 |
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-06 14:03:30 |
184 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA |
157 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x90AnyA32VcLbXMb7hfA9g |
185 |
|
158 |
|
186 |
__PACKAGE__->belongs_to( |
159 |
__PACKAGE__->belongs_to( |
187 |
"borrower", |
160 |
"borrower", |
Lines 190-193
__PACKAGE__->belongs_to(
Link Here
|
190 |
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, |
163 |
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, |
191 |
); |
164 |
); |
192 |
|
165 |
|
|
|
166 |
__PACKAGE__->belongs_to( |
167 |
"item", |
168 |
"Koha::Schema::Result::Item", |
169 |
{ itemnumber => "itemnumber" }, |
170 |
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, |
171 |
); |
172 |
|
193 |
1; |
173 |
1; |