Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::ItemBundle; |
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::ItemBundle |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<item_bundles> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("item_bundles"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 item |
27 |
|
28 |
data_type: 'integer' |
29 |
is_foreign_key: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 host |
33 |
|
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
37 |
|
38 |
=cut |
39 |
|
40 |
__PACKAGE__->add_columns( |
41 |
"item", |
42 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
43 |
"host", |
44 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
45 |
); |
46 |
|
47 |
=head1 PRIMARY KEY |
48 |
|
49 |
=over 4 |
50 |
|
51 |
=item * L</host> |
52 |
|
53 |
=item * L</item> |
54 |
|
55 |
=back |
56 |
|
57 |
=cut |
58 |
|
59 |
__PACKAGE__->set_primary_key("host", "item"); |
60 |
|
61 |
=head1 UNIQUE CONSTRAINTS |
62 |
|
63 |
=head2 C<item_bundles_uniq_1> |
64 |
|
65 |
=over 4 |
66 |
|
67 |
=item * L</item> |
68 |
|
69 |
=back |
70 |
|
71 |
=cut |
72 |
|
73 |
__PACKAGE__->add_unique_constraint("item_bundles_uniq_1", ["item"]); |
74 |
|
75 |
=head1 RELATIONS |
76 |
|
77 |
=head2 host |
78 |
|
79 |
Type: belongs_to |
80 |
|
81 |
Related object: L<Koha::Schema::Result::Item> |
82 |
|
83 |
=cut |
84 |
|
85 |
__PACKAGE__->belongs_to( |
86 |
"host", |
87 |
"Koha::Schema::Result::Item", |
88 |
{ itemnumber => "host" }, |
89 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
90 |
); |
91 |
|
92 |
=head2 item |
93 |
|
94 |
Type: belongs_to |
95 |
|
96 |
Related object: L<Koha::Schema::Result::Item> |
97 |
|
98 |
=cut |
99 |
|
100 |
__PACKAGE__->belongs_to( |
101 |
"item", |
102 |
"Koha::Schema::Result::Item", |
103 |
{ itemnumber => "item" }, |
104 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
105 |
); |
106 |
|
107 |
|
108 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-10 13:47:56 |
109 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QXlgF8iwZUFSsg+Eo5kNUw |
110 |
|
111 |
|
112 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
113 |
1; |