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
79 =head2 auto_renew_error
87 data_type: 'timestamp'
88 datetime_undef_if_invalid: 1
89 default_value: current_timestamp
95 datetime_undef_if_invalid: 1
98 =head2 onsite_checkout
106 data_type: 'mediumtext'
111 data_type: 'datetime'
112 datetime_undef_if_invalid: 1
117 __PACKAGE__->add_columns(
119 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
121 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
123 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
126 data_type => "datetime",
127 datetime_undef_if_invalid => 1,
131 { data_type => "varchar", is_nullable => 1, size => 10 },
134 data_type => "datetime",
135 datetime_undef_if_invalid => 1,
140 data_type => "datetime",
141 datetime_undef_if_invalid => 1,
145 { data_type => "tinyint", is_nullable => 1 },
147 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
149 { data_type => "varchar", is_nullable => 1, size => 32 },
152 data_type => "timestamp",
153 datetime_undef_if_invalid => 1,
154 default_value => \"current_timestamp",
159 data_type => "datetime",
160 datetime_undef_if_invalid => 1,
164 { data_type => "integer", default_value => 0, is_nullable => 0 },
166 { data_type => "mediumtext", is_nullable => 1 },
169 data_type => "datetime",
170 datetime_undef_if_invalid => 1,
185 __PACKAGE__->set_primary_key("issue_id");
187 =head1 UNIQUE CONSTRAINTS
193 =item * L</itemnumber>
199 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
203 =head2 borrowernumber
207 Related object: L<Koha::Schema::Result::Borrower>
211 __PACKAGE__->belongs_to(
213 "Koha::Schema::Result::Borrower",
214 { borrowernumber => "borrowernumber" },
218 on_delete => "RESTRICT",
219 on_update => "CASCADE",
227 Related object: L<Koha::Schema::Result::Item>
231 __PACKAGE__->belongs_to(
233 "Koha::Schema::Result::Item",
234 { itemnumber => "itemnumber" },
238 on_delete => "RESTRICT",
239 on_update => "CASCADE",
244 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-05-03 04:12:22
245 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozRQZiF1LlOJy4KI53OpFw
247 __PACKAGE__->belongs_to(
249 "Koha::Schema::Result::Borrower",
250 { borrowernumber => "borrowernumber" },
251 { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
254 __PACKAGE__->belongs_to(
256 "Koha::Schema::Result::Item",
257 { itemnumber => "itemnumber" },
261 on_delete => "CASCADE",
262 on_update => "CASCADE",
266 __PACKAGE__->belongs_to(
268 "Koha::Schema::Result::Branch",
269 { branchcode => "branchcode" },
273 on_delete => "CASCADE",
274 on_update => "CASCADE",