Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::Volume; |
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::Volume |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<volumes> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("volumes"); |
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 biblionumber |
33 |
|
34 |
data_type: 'integer' |
35 |
default_value: 0 |
36 |
is_foreign_key: 1 |
37 |
is_nullable: 0 |
38 |
|
39 |
=head2 description |
40 |
|
41 |
data_type: 'mediumtext' |
42 |
is_nullable: 1 |
43 |
|
44 |
=head2 created_on |
45 |
|
46 |
data_type: 'timestamp' |
47 |
datetime_undef_if_invalid: 1 |
48 |
default_value: '0000-00-00 00:00:00' |
49 |
is_nullable: 0 |
50 |
|
51 |
=head2 updated_on |
52 |
|
53 |
data_type: 'timestamp' |
54 |
datetime_undef_if_invalid: 1 |
55 |
default_value: current_timestamp |
56 |
is_nullable: 0 |
57 |
|
58 |
=cut |
59 |
|
60 |
__PACKAGE__->add_columns( |
61 |
"id", |
62 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
63 |
"biblionumber", |
64 |
{ |
65 |
data_type => "integer", |
66 |
default_value => 0, |
67 |
is_foreign_key => 1, |
68 |
is_nullable => 0, |
69 |
}, |
70 |
"description", |
71 |
{ data_type => "mediumtext", is_nullable => 1 }, |
72 |
"created_on", |
73 |
{ |
74 |
data_type => "timestamp", |
75 |
datetime_undef_if_invalid => 1, |
76 |
default_value => "0000-00-00 00:00:00", |
77 |
is_nullable => 0, |
78 |
}, |
79 |
"updated_on", |
80 |
{ |
81 |
data_type => "timestamp", |
82 |
datetime_undef_if_invalid => 1, |
83 |
default_value => \"current_timestamp", |
84 |
is_nullable => 0, |
85 |
}, |
86 |
); |
87 |
|
88 |
=head1 PRIMARY KEY |
89 |
|
90 |
=over 4 |
91 |
|
92 |
=item * L</id> |
93 |
|
94 |
=back |
95 |
|
96 |
=cut |
97 |
|
98 |
__PACKAGE__->set_primary_key("id"); |
99 |
|
100 |
=head1 RELATIONS |
101 |
|
102 |
=head2 biblionumber |
103 |
|
104 |
Type: belongs_to |
105 |
|
106 |
Related object: L<Koha::Schema::Result::Biblio> |
107 |
|
108 |
=cut |
109 |
|
110 |
__PACKAGE__->belongs_to( |
111 |
"biblionumber", |
112 |
"Koha::Schema::Result::Biblio", |
113 |
{ biblionumber => "biblionumber" }, |
114 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
115 |
); |
116 |
|
117 |
=head2 volume_items |
118 |
|
119 |
Type: has_many |
120 |
|
121 |
Related object: L<Koha::Schema::Result::VolumeItem> |
122 |
|
123 |
=cut |
124 |
|
125 |
__PACKAGE__->has_many( |
126 |
"volume_items", |
127 |
"Koha::Schema::Result::VolumeItem", |
128 |
{ "foreign.volume_id" => "self.id" }, |
129 |
{ cascade_copy => 0, cascade_delete => 0 }, |
130 |
); |
131 |
|
132 |
|
133 |
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-04 15:22:18 |
134 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cXvLM2TgY18pxE2ZJBMouw |
135 |
|
136 |
sub koha_objects_class { |
137 |
'Koha::Biblio::Volumes'; |
138 |
} |
139 |
|
140 |
sub koha_object_class { |
141 |
'Koha::Biblio::Volume'; |
142 |
} |
143 |
|
144 |
1; |