2 package Koha::Schema::Result::ImportRecord;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::ImportRecord
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<import_records>
22 __PACKAGE__->table("import_records");
26 =head2 import_record_id
32 =head2 import_batch_id
44 =head2 record_sequence
50 =head2 upload_timestamp
52 data_type: 'timestamp'
53 datetime_undef_if_invalid: 1
54 default_value: current_timestamp
60 datetime_undef_if_invalid: 1
81 default_value: 'biblio'
82 extra: {list => ["biblio","auth","holdings"]}
88 default_value: 'no_match'
89 extra: {list => ["no_match","auto_match","manual_match","match_applied"]}
95 default_value: 'staged'
96 extra: {list => ["error","staged","imported","reverted","items_reverted","ignored"]}
101 data_type: 'mediumtext'
107 default_value: (empty string)
119 __PACKAGE__->add_columns(
121 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
123 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
125 { data_type => "varchar", is_nullable => 1, size => 10 },
127 { data_type => "integer", default_value => 0, is_nullable => 0 },
130 data_type => "timestamp",
131 datetime_undef_if_invalid => 1,
132 default_value => \"current_timestamp",
136 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
138 { data_type => "longblob", is_nullable => 0 },
140 { data_type => "longtext", is_nullable => 0 },
142 { data_type => "longtext", is_nullable => 0 },
146 default_value => "biblio",
147 extra => { list => ["biblio", "auth", "holdings"] },
153 default_value => "no_match",
155 list => ["no_match", "auto_match", "manual_match", "match_applied"],
162 default_value => "staged",
176 { data_type => "mediumtext", is_nullable => 1 },
178 { data_type => "varchar", default_value => "", is_nullable => 0, size => 40 },
180 { data_type => "varchar", is_nullable => 1, size => 40 },
187 =item * L</import_record_id>
193 __PACKAGE__->set_primary_key("import_record_id");
201 Related object: L<Koha::Schema::Result::ImportAuth>
205 __PACKAGE__->has_many(
207 "Koha::Schema::Result::ImportAuth",
208 { "foreign.import_record_id" => "self.import_record_id" },
209 { cascade_copy => 0, cascade_delete => 0 },
216 Related object: L<Koha::Schema::Result::ImportBatch>
220 __PACKAGE__->belongs_to(
222 "Koha::Schema::Result::ImportBatch",
223 { import_batch_id => "import_batch_id" },
224 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
227 =head2 import_biblios
231 Related object: L<Koha::Schema::Result::ImportBiblio>
235 __PACKAGE__->has_many(
237 "Koha::Schema::Result::ImportBiblio",
238 { "foreign.import_record_id" => "self.import_record_id" },
239 { cascade_copy => 0, cascade_delete => 0 },
246 Related object: L<Koha::Schema::Result::ImportItem>
250 __PACKAGE__->has_many(
252 "Koha::Schema::Result::ImportItem",
253 { "foreign.import_record_id" => "self.import_record_id" },
254 { cascade_copy => 0, cascade_delete => 0 },
257 =head2 import_record_matches
261 Related object: L<Koha::Schema::Result::ImportRecordMatch>
265 __PACKAGE__->has_many(
266 "import_record_matches",
267 "Koha::Schema::Result::ImportRecordMatch",
268 { "foreign.import_record_id" => "self.import_record_id" },
269 { cascade_copy => 0, cascade_delete => 0 },
273 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
274 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jhzXlqw5mA1lGsI9SZEv/Q
277 # You can replace this text with custom content, and it will be preserved on regeneration