Bug 10565: (follow-up) refresh DBIC schema class files
[koha.git] / Koha / Schema / Result / ImportBatch.pm
1 use utf8;
2 package Koha::Schema::Result::ImportBatch;
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::ImportBatch
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<import_batches>
19
20 =cut
21
22 __PACKAGE__->table("import_batches");
23
24 =head1 ACCESSORS
25
26 =head2 import_batch_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 matcher_id
33
34   data_type: 'integer'
35   is_nullable: 1
36
37 =head2 template_id
38
39   data_type: 'integer'
40   is_nullable: 1
41
42 =head2 branchcode
43
44   data_type: 'varchar'
45   is_nullable: 1
46   size: 10
47
48 =head2 num_records
49
50   data_type: 'integer'
51   default_value: 0
52   is_nullable: 0
53
54 =head2 num_items
55
56   data_type: 'integer'
57   default_value: 0
58   is_nullable: 0
59
60 =head2 upload_timestamp
61
62   data_type: 'timestamp'
63   datetime_undef_if_invalid: 1
64   default_value: current_timestamp
65   is_nullable: 0
66
67 =head2 overlay_action
68
69   data_type: 'enum'
70   default_value: 'create_new'
71   extra: {list => ["replace","create_new","use_template","ignore"]}
72   is_nullable: 0
73
74 =head2 nomatch_action
75
76   data_type: 'enum'
77   default_value: 'create_new'
78   extra: {list => ["create_new","ignore"]}
79   is_nullable: 0
80
81 =head2 item_action
82
83   data_type: 'enum'
84   default_value: 'always_add'
85   extra: {list => ["always_add","add_only_for_matches","add_only_for_new","ignore"]}
86   is_nullable: 0
87
88 =head2 import_status
89
90   data_type: 'enum'
91   default_value: 'staging'
92   extra: {list => ["staging","staged","importing","imported","reverting","reverted","cleaned"]}
93   is_nullable: 0
94
95 =head2 batch_type
96
97   data_type: 'enum'
98   default_value: 'batch'
99   extra: {list => ["batch","z3950","webservice"]}
100   is_nullable: 0
101
102 =head2 record_type
103
104   data_type: 'enum'
105   default_value: 'biblio'
106   extra: {list => ["biblio","auth","holdings"]}
107   is_nullable: 0
108
109 =head2 file_name
110
111   data_type: 'varchar'
112   is_nullable: 1
113   size: 100
114
115 =head2 comments
116
117   data_type: 'mediumtext'
118   is_nullable: 1
119
120 =cut
121
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",
136   {
137     data_type => "timestamp",
138     datetime_undef_if_invalid => 1,
139     default_value => \"current_timestamp",
140     is_nullable => 0,
141   },
142   "overlay_action",
143   {
144     data_type => "enum",
145     default_value => "create_new",
146     extra => { list => ["replace", "create_new", "use_template", "ignore"] },
147     is_nullable => 0,
148   },
149   "nomatch_action",
150   {
151     data_type => "enum",
152     default_value => "create_new",
153     extra => { list => ["create_new", "ignore"] },
154     is_nullable => 0,
155   },
156   "item_action",
157   {
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       ],
167     },
168     is_nullable => 0,
169   },
170   "import_status",
171   {
172     data_type => "enum",
173     default_value => "staging",
174     extra => {
175       list => [
176         "staging",
177         "staged",
178         "importing",
179         "imported",
180         "reverting",
181         "reverted",
182         "cleaned",
183       ],
184     },
185     is_nullable => 0,
186   },
187   "batch_type",
188   {
189     data_type => "enum",
190     default_value => "batch",
191     extra => { list => ["batch", "z3950", "webservice"] },
192     is_nullable => 0,
193   },
194   "record_type",
195   {
196     data_type => "enum",
197     default_value => "biblio",
198     extra => { list => ["biblio", "auth", "holdings"] },
199     is_nullable => 0,
200   },
201   "file_name",
202   { data_type => "varchar", is_nullable => 1, size => 100 },
203   "comments",
204   { data_type => "mediumtext", is_nullable => 1 },
205 );
206
207 =head1 PRIMARY KEY
208
209 =over 4
210
211 =item * L</import_batch_id>
212
213 =back
214
215 =cut
216
217 __PACKAGE__->set_primary_key("import_batch_id");
218
219 =head1 RELATIONS
220
221 =head2 import_records
222
223 Type: has_many
224
225 Related object: L<Koha::Schema::Result::ImportRecord>
226
227 =cut
228
229 __PACKAGE__->has_many(
230   "import_records",
231   "Koha::Schema::Result::ImportRecord",
232   { "foreign.import_batch_id" => "self.import_batch_id" },
233   { cascade_copy => 0, cascade_delete => 0 },
234 );
235
236
237 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
238 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BJP/3AecpTwJUqkidgha7w
239
240
241 # You can replace this text with custom content, and it will be preserved on regeneration
242 1;