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