Bug 26922: Regression tests
[koha.git] / Koha / Schema / Result / Serial.pm
blobe3bcadbf6fb7be452449e413ddd5a3598bb96f10
1 use utf8;
2 package Koha::Schema::Result::Serial;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Serial
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<serial>
20 =cut
22 __PACKAGE__->table("serial");
24 =head1 ACCESSORS
26 =head2 serialid
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 biblionumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 subscriptionid
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 serialseq
46 data_type: 'varchar'
47 default_value: (empty string)
48 is_nullable: 0
49 size: 100
51 =head2 serialseq_x
53 data_type: 'varchar'
54 is_nullable: 1
55 size: 100
57 =head2 serialseq_y
59 data_type: 'varchar'
60 is_nullable: 1
61 size: 100
63 =head2 serialseq_z
65 data_type: 'varchar'
66 is_nullable: 1
67 size: 100
69 =head2 status
71 data_type: 'tinyint'
72 default_value: 0
73 is_nullable: 0
75 =head2 planneddate
77 data_type: 'date'
78 datetime_undef_if_invalid: 1
79 is_nullable: 1
81 =head2 notes
83 data_type: 'mediumtext'
84 is_nullable: 1
86 =head2 publisheddate
88 data_type: 'date'
89 datetime_undef_if_invalid: 1
90 is_nullable: 1
92 =head2 publisheddatetext
94 data_type: 'varchar'
95 is_nullable: 1
96 size: 100
98 =head2 claimdate
100 data_type: 'date'
101 datetime_undef_if_invalid: 1
102 is_nullable: 1
104 =head2 claims_count
106 data_type: 'integer'
107 default_value: 0
108 is_nullable: 1
110 =head2 routingnotes
112 data_type: 'mediumtext'
113 is_nullable: 1
115 =cut
117 __PACKAGE__->add_columns(
118 "serialid",
119 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
120 "biblionumber",
121 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
122 "subscriptionid",
123 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
124 "serialseq",
125 { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
126 "serialseq_x",
127 { data_type => "varchar", is_nullable => 1, size => 100 },
128 "serialseq_y",
129 { data_type => "varchar", is_nullable => 1, size => 100 },
130 "serialseq_z",
131 { data_type => "varchar", is_nullable => 1, size => 100 },
132 "status",
133 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
134 "planneddate",
135 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
136 "notes",
137 { data_type => "mediumtext", is_nullable => 1 },
138 "publisheddate",
139 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
140 "publisheddatetext",
141 { data_type => "varchar", is_nullable => 1, size => 100 },
142 "claimdate",
143 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
144 "claims_count",
145 { data_type => "integer", default_value => 0, is_nullable => 1 },
146 "routingnotes",
147 { data_type => "mediumtext", is_nullable => 1 },
150 =head1 PRIMARY KEY
152 =over 4
154 =item * L</serialid>
156 =back
158 =cut
160 __PACKAGE__->set_primary_key("serialid");
162 =head1 RELATIONS
164 =head2 biblionumber
166 Type: belongs_to
168 Related object: L<Koha::Schema::Result::Biblio>
170 =cut
172 __PACKAGE__->belongs_to(
173 "biblionumber",
174 "Koha::Schema::Result::Biblio",
175 { biblionumber => "biblionumber" },
176 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
179 =head2 serialitems
181 Type: has_many
183 Related object: L<Koha::Schema::Result::Serialitem>
185 =cut
187 __PACKAGE__->has_many(
188 "serialitems",
189 "Koha::Schema::Result::Serialitem",
190 { "foreign.serialid" => "self.serialid" },
191 { cascade_copy => 0, cascade_delete => 0 },
194 =head2 subscriptionid
196 Type: belongs_to
198 Related object: L<Koha::Schema::Result::Subscription>
200 =cut
202 __PACKAGE__->belongs_to(
203 "subscriptionid",
204 "Koha::Schema::Result::Subscription",
205 { subscriptionid => "subscriptionid" },
206 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
210 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51
211 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ktCCJzkgRUFpYu857WQONA
214 # You can replace this text with custom code or comments, and it will be preserved on regeneration