Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / BiblioMetadata.pm
blob69de376066b76e06cf8b226c62a32fdd4af89df4
1 use utf8;
2 package Koha::Schema::Result::BiblioMetadata;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::BiblioMetadata
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<biblio_metadata>
20 =cut
22 __PACKAGE__->table("biblio_metadata");
24 =head1 ACCESSORS
26 =head2 id
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 format
40 data_type: 'varchar'
41 is_nullable: 0
42 size: 16
44 =head2 schema
46 data_type: 'varchar'
47 is_nullable: 0
48 size: 16
50 =head2 metadata
52 data_type: 'longtext'
53 is_nullable: 0
55 =head2 timestamp
57 data_type: 'timestamp'
58 datetime_undef_if_invalid: 1
59 default_value: current_timestamp
60 is_nullable: 0
62 =cut
64 __PACKAGE__->add_columns(
65 "id",
66 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
67 "biblionumber",
68 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
69 "format",
70 { data_type => "varchar", is_nullable => 0, size => 16 },
71 "schema",
72 { data_type => "varchar", is_nullable => 0, size => 16 },
73 "metadata",
74 { data_type => "longtext", is_nullable => 0 },
75 "timestamp",
77 data_type => "timestamp",
78 datetime_undef_if_invalid => 1,
79 default_value => \"current_timestamp",
80 is_nullable => 0,
84 =head1 PRIMARY KEY
86 =over 4
88 =item * L</id>
90 =back
92 =cut
94 __PACKAGE__->set_primary_key("id");
96 =head1 UNIQUE CONSTRAINTS
98 =head2 C<biblio_metadata_uniq_key>
100 =over 4
102 =item * L</biblionumber>
104 =item * L</format>
106 =item * L</schema>
108 =back
110 =cut
112 __PACKAGE__->add_unique_constraint(
113 "biblio_metadata_uniq_key",
114 ["biblionumber", "format", "schema"],
117 =head1 RELATIONS
119 =head2 biblionumber
121 Type: belongs_to
123 Related object: L<Koha::Schema::Result::Biblio>
125 =cut
127 __PACKAGE__->belongs_to(
128 "biblionumber",
129 "Koha::Schema::Result::Biblio",
130 { biblionumber => "biblionumber" },
131 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
135 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16
136 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ
138 sub koha_object_class {
139 'Koha::Biblio::Metadatas';