2 package Koha::Schema::Result::Subscription;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Subscription
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<subscription>
22 __PACKAGE__->table("subscription");
41 default_value: (empty string)
48 datetime_undef_if_invalid: 1
93 =head2 countissuesperunit
101 data_type: 'longtext'
107 default_value: (empty string)
144 =head2 firstacquidate
147 datetime_undef_if_invalid: 1
158 data_type: 'mediumtext'
161 =head2 skip_serialseq
187 data_type: 'mediumtext'
192 data_type: 'longtext'
197 data_type: 'mediumtext'
203 default_value: (empty string)
210 default_value: (empty string)
220 =head2 serialsadditems
226 =head2 staffdisplaycount
232 =head2 opacdisplaycount
247 datetime_undef_if_invalid: 1
259 datetime_undef_if_invalid: 1
268 =head2 previousitemtype
281 __PACKAGE__->add_columns(
283 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
285 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
287 { data_type => "varchar", default_value => "", is_nullable => 1, size => 100 },
289 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
291 { data_type => "integer", default_value => 0, is_nullable => 1 },
293 { data_type => "integer", default_value => 0, is_nullable => 1 },
295 { data_type => "integer", default_value => 0, is_nullable => 1 },
297 { data_type => "integer", default_value => 0, is_nullable => 1 },
299 { data_type => "integer", default_value => 0, is_nullable => 1 },
301 { data_type => "integer", default_value => 0, is_nullable => 1 },
303 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
304 "countissuesperunit",
305 { data_type => "integer", default_value => 1, is_nullable => 0 },
307 { data_type => "longtext", is_nullable => 1 },
309 { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
311 { data_type => "integer", is_nullable => 1 },
313 { data_type => "integer", default_value => 0, is_nullable => 1 },
315 { data_type => "integer", is_nullable => 1 },
317 { data_type => "integer", default_value => 0, is_nullable => 1 },
319 { data_type => "integer", is_nullable => 1 },
321 { data_type => "integer", default_value => 0, is_nullable => 1 },
323 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
325 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
327 { data_type => "mediumtext", is_nullable => 1 },
329 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
331 { data_type => "varchar", is_nullable => 1, size => 20 },
333 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
335 { data_type => "varchar", is_nullable => 1, size => 80 },
337 { data_type => "mediumtext", is_nullable => 1 },
339 { data_type => "longtext", is_nullable => 1 },
341 { data_type => "mediumtext", is_nullable => 1 },
343 { data_type => "varchar", default_value => "", is_nullable => 1, size => 80 },
345 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
347 { data_type => "varchar", is_nullable => 1, size => 10 },
349 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
351 { data_type => "varchar", is_nullable => 1, size => 10 },
353 { data_type => "varchar", is_nullable => 1, size => 10 },
355 { data_type => "integer", default_value => 0, is_nullable => 0 },
357 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
359 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
361 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
363 { data_type => "varchar", is_nullable => 1, size => 10 },
365 { data_type => "varchar", is_nullable => 1, size => 10 },
367 { data_type => "integer", is_nullable => 1 },
374 =item * L</subscriptionid>
380 __PACKAGE__->set_primary_key("subscriptionid");
388 Related object: L<Koha::Schema::Result::Aqorder>
392 __PACKAGE__->has_many(
394 "Koha::Schema::Result::Aqorder",
395 { "foreign.subscriptionid" => "self.subscriptionid" },
396 { cascade_copy => 0, cascade_delete => 0 },
403 Related object: L<Koha::Schema::Result::Biblio>
407 __PACKAGE__->belongs_to(
409 "Koha::Schema::Result::Biblio",
410 { biblionumber => "biblionumber" },
411 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
418 Related object: L<Koha::Schema::Result::SubscriptionNumberpattern>
422 __PACKAGE__->belongs_to(
424 "Koha::Schema::Result::SubscriptionNumberpattern",
425 { id => "numberpattern" },
429 on_delete => "SET NULL",
430 on_update => "CASCADE",
438 Related object: L<Koha::Schema::Result::SubscriptionFrequency>
442 __PACKAGE__->belongs_to(
444 "Koha::Schema::Result::SubscriptionFrequency",
445 { id => "periodicity" },
449 on_delete => "SET NULL",
450 on_update => "CASCADE",
458 Related object: L<Koha::Schema::Result::Serial>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::Serial",
465 { "foreign.subscriptionid" => "self.subscriptionid" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 subscriptionhistory
473 Related object: L<Koha::Schema::Result::Subscriptionhistory>
477 __PACKAGE__->might_have(
478 "subscriptionhistory",
479 "Koha::Schema::Result::Subscriptionhistory",
480 { "foreign.subscriptionid" => "self.subscriptionid" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 subscriptionroutinglists
488 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
492 __PACKAGE__->has_many(
493 "subscriptionroutinglists",
494 "Koha::Schema::Result::Subscriptionroutinglist",
495 { "foreign.subscriptionid" => "self.subscriptionid" },
496 { cascade_copy => 0, cascade_delete => 0 },
500 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51
501 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bw7XzPSvv9fjc9F6+uIBUw
503 __PACKAGE__->has_many(
504 "additional_field_values",
505 "Koha::Schema::Result::AdditionalFieldValue",
510 "$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.subscriptionid" },
512 "$args->{foreign_alias}.field_id" =>
513 { -in => \'(SELECT id FROM additional_fields WHERE tablename = "subscription")' },
516 { cascade_copy => 0, cascade_delete => 0 },
519 __PACKAGE__->add_columns(
520 '+closed' => { is_boolean => 1 },
521 '+skip_serialseq' => { is_boolean => 1 },
524 # You can replace this text with custom content, and it will be preserved on regeneration