2 package Koha
::Schema
::Result
::Issue
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Issue
16 use base
'DBIx::Class::Core';
18 =head1 TABLE: C<issues>
22 __PACKAGE__
->table("issues");
47 datetime_undef_if_invalid: 1
59 datetime_undef_if_invalid: 1
62 =head2 lastreneweddate
65 datetime_undef_if_invalid: 1
80 =head2 auto_renew_error
88 data_type: 'timestamp'
89 datetime_undef_if_invalid: 1
90 default_value: current_timestamp
96 datetime_undef_if_invalid: 1
99 =head2 onsite_checkout
107 data_type: 'longtext'
112 data_type: 'datetime'
113 datetime_undef_if_invalid: 1
123 __PACKAGE__
->add_columns(
125 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
127 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
129 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
132 data_type
=> "datetime",
133 datetime_undef_if_invalid
=> 1,
137 { data_type
=> "varchar", is_nullable
=> 1, size
=> 10 },
140 data_type
=> "datetime",
141 datetime_undef_if_invalid
=> 1,
146 data_type
=> "datetime",
147 datetime_undef_if_invalid
=> 1,
151 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
153 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 1 },
155 { data_type
=> "varchar", is_nullable
=> 1, size
=> 32 },
158 data_type
=> "timestamp",
159 datetime_undef_if_invalid
=> 1,
160 default_value
=> \"current_timestamp
",
165 data_type => "datetime
",
166 datetime_undef_if_invalid => 1,
170 { data_type => "integer
", default_value => 0, is_nullable => 0 },
172 { data_type => "longtext
", is_nullable => 1 },
175 data_type => "datetime
",
176 datetime_undef_if_invalid => 1,
180 { data_type => "integer
", is_nullable => 1 },
193 __PACKAGE__->set_primary_key("issue_id
");
195 =head1 UNIQUE CONSTRAINTS
201 =item * L</itemnumber>
207 __PACKAGE__->add_unique_constraint("itemnumber
", ["itemnumber
"]);
211 =head2 borrowernumber
215 Related object: L<Koha::Schema::Result::Borrower>
219 __PACKAGE__->belongs_to(
221 "Koha
::Schema
::Result
::Borrower
",
222 { borrowernumber => "borrowernumber
" },
226 on_delete => "RESTRICT
",
227 on_update => "CASCADE
",
235 Related object: L<Koha::Schema::Result::Item>
239 __PACKAGE__->belongs_to(
241 "Koha
::Schema
::Result
::Item
",
242 { itemnumber => "itemnumber
" },
246 on_delete => "RESTRICT
",
247 on_update => "CASCADE
",
255 Related object: L<Koha::Schema::Result::ReturnClaim>
259 __PACKAGE__->might_have(
261 "Koha
::Schema
::Result
::ReturnClaim
",
262 { "foreign
.issue_id
" => "self
.issue_id
" },
263 { cascade_copy => 0, cascade_delete => 0 },
267 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-31 12:18:38
268 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QVmFa5b0Pe5OhUI92n9kzQ
270 __PACKAGE__->add_columns(
271 '+auto_renew' => { is_boolean => 1 },
272 '+onsite_checkout' => { is_boolean => 1 }
275 __PACKAGE__->belongs_to(
277 "Koha
::Schema
::Result
::Borrower
",
278 { borrowernumber => "borrowernumber
" },
279 { join_type => "LEFT
", on_delete => "CASCADE
", on_update => "CASCADE
" },
282 __PACKAGE__->belongs_to(
284 "Koha
::Schema
::Result
::Item
",
285 { itemnumber => "itemnumber
" },
289 on_delete => "CASCADE
",
290 on_update => "CASCADE
",
294 __PACKAGE__->belongs_to(
296 "Koha
::Schema
::Result
::Branch
",
297 { branchcode => "branchcode
" },
301 on_delete => "CASCADE
",
302 on_update => "CASCADE
",
306 __PACKAGE__->belongs_to(
308 "Koha
::Schema
::Result
::Branch
",
309 { "foreign
.branchcode
" => "self
.branchcode
" },
313 on_delete => "CASCADE
",
314 on_update => "CASCADE
",
318 sub koha_object_class {
321 sub koha_objects_class {