Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / ImportBatch.pm
blobc2fd81c79a412ed4c3238e53dcd882432f5827d8
1 use utf8;
2 package Koha::Schema::Result::ImportBatch;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ImportBatch
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<import_batches>
20 =cut
22 __PACKAGE__->table("import_batches");
24 =head1 ACCESSORS
26 =head2 import_batch_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 matcher_id
34 data_type: 'integer'
35 is_nullable: 1
37 =head2 template_id
39 data_type: 'integer'
40 is_nullable: 1
42 =head2 branchcode
44 data_type: 'varchar'
45 is_nullable: 1
46 size: 10
48 =head2 num_records
50 data_type: 'integer'
51 default_value: 0
52 is_nullable: 0
54 =head2 num_items
56 data_type: 'integer'
57 default_value: 0
58 is_nullable: 0
60 =head2 upload_timestamp
62 data_type: 'timestamp'
63 datetime_undef_if_invalid: 1
64 default_value: current_timestamp
65 is_nullable: 0
67 =head2 overlay_action
69 data_type: 'enum'
70 default_value: 'create_new'
71 extra: {list => ["replace","create_new","use_template","ignore"]}
72 is_nullable: 0
74 =head2 nomatch_action
76 data_type: 'enum'
77 default_value: 'create_new'
78 extra: {list => ["create_new","ignore"]}
79 is_nullable: 0
81 =head2 item_action
83 data_type: 'enum'
84 default_value: 'always_add'
85 extra: {list => ["always_add","add_only_for_matches","add_only_for_new","ignore","replace"]}
86 is_nullable: 0
88 =head2 import_status
90 data_type: 'enum'
91 default_value: 'staging'
92 extra: {list => ["staging","staged","importing","imported","reverting","reverted","cleaned"]}
93 is_nullable: 0
95 =head2 batch_type
97 data_type: 'enum'
98 default_value: 'batch'
99 extra: {list => ["batch","z3950","webservice"]}
100 is_nullable: 0
102 =head2 record_type
104 data_type: 'enum'
105 default_value: 'biblio'
106 extra: {list => ["biblio","auth","holdings"]}
107 is_nullable: 0
109 =head2 file_name
111 data_type: 'varchar'
112 is_nullable: 1
113 size: 100
115 =head2 comments
117 data_type: 'longtext'
118 is_nullable: 1
120 =cut
122 __PACKAGE__->add_columns(
123 "import_batch_id",
124 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
125 "matcher_id",
126 { data_type => "integer", is_nullable => 1 },
127 "template_id",
128 { data_type => "integer", is_nullable => 1 },
129 "branchcode",
130 { data_type => "varchar", is_nullable => 1, size => 10 },
131 "num_records",
132 { data_type => "integer", default_value => 0, is_nullable => 0 },
133 "num_items",
134 { data_type => "integer", default_value => 0, is_nullable => 0 },
135 "upload_timestamp",
137 data_type => "timestamp",
138 datetime_undef_if_invalid => 1,
139 default_value => \"current_timestamp",
140 is_nullable => 0,
142 "overlay_action",
144 data_type => "enum",
145 default_value => "create_new",
146 extra => { list => ["replace", "create_new", "use_template", "ignore"] },
147 is_nullable => 0,
149 "nomatch_action",
151 data_type => "enum",
152 default_value => "create_new",
153 extra => { list => ["create_new", "ignore"] },
154 is_nullable => 0,
156 "item_action",
158 data_type => "enum",
159 default_value => "always_add",
160 extra => {
161 list => [
162 "always_add",
163 "add_only_for_matches",
164 "add_only_for_new",
165 "ignore",
166 "replace",
169 is_nullable => 0,
171 "import_status",
173 data_type => "enum",
174 default_value => "staging",
175 extra => {
176 list => [
177 "staging",
178 "staged",
179 "importing",
180 "imported",
181 "reverting",
182 "reverted",
183 "cleaned",
186 is_nullable => 0,
188 "batch_type",
190 data_type => "enum",
191 default_value => "batch",
192 extra => { list => ["batch", "z3950", "webservice"] },
193 is_nullable => 0,
195 "record_type",
197 data_type => "enum",
198 default_value => "biblio",
199 extra => { list => ["biblio", "auth", "holdings"] },
200 is_nullable => 0,
202 "file_name",
203 { data_type => "varchar", is_nullable => 1, size => 100 },
204 "comments",
205 { data_type => "longtext", is_nullable => 1 },
208 =head1 PRIMARY KEY
210 =over 4
212 =item * L</import_batch_id>
214 =back
216 =cut
218 __PACKAGE__->set_primary_key("import_batch_id");
220 =head1 RELATIONS
222 =head2 import_records
224 Type: has_many
226 Related object: L<Koha::Schema::Result::ImportRecord>
228 =cut
230 __PACKAGE__->has_many(
231 "import_records",
232 "Koha::Schema::Result::ImportRecord",
233 { "foreign.import_batch_id" => "self.import_batch_id" },
234 { cascade_copy => 0, cascade_delete => 0 },
238 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
239 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:41giNJCRD9WXC4IGO/1D3A
242 # You can replace this text with custom content, and it will be preserved on regeneration