View | Details | Raw Unified | Return to bug 35659
Collapse All | Expand All

(-)a/Koha/Schema/Result/ImportOaipmhAuthority.pm (+152 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::ImportOaipmhAuthority;
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::ImportOaipmhAuthority
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<import_oaipmh_authorities>
19
20
=cut
21
22
__PACKAGE__->table("import_oaipmh_authorities");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
unique identifier assigned by Koha
33
34
=head2 authid
35
36
  data_type: 'bigint'
37
  extra: {unsigned => 1}
38
  is_foreign_key: 1
39
  is_nullable: 0
40
41
unique identifier assigned to each koha record
42
43
=head2 identifier
44
45
  data_type: 'varchar'
46
  is_nullable: 0
47
  size: 255
48
49
OAI record identifier
50
51
=head2 repository
52
53
  data_type: 'varchar'
54
  is_nullable: 0
55
  size: 255
56
57
OAI repository
58
59
=head2 recordtype
60
61
  data_type: 'enum'
62
  default_value: 'biblio'
63
  extra: {list => ["authority","biblio"]}
64
  is_nullable: 0
65
66
is the record bibliographic or authority
67
68
=head2 datestamp
69
70
  data_type: 'varchar'
71
  is_nullable: 1
72
  size: 255
73
74
OAI set to harvest
75
76
=head2 last_modified
77
78
  data_type: 'timestamp'
79
  datetime_undef_if_invalid: 1
80
  default_value: current_timestamp
81
  is_nullable: 0
82
83
=cut
84
85
__PACKAGE__->add_columns(
86
  "id",
87
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
88
  "authid",
89
  {
90
    data_type => "bigint",
91
    extra => { unsigned => 1 },
92
    is_foreign_key => 1,
93
    is_nullable => 0,
94
  },
95
  "identifier",
96
  { data_type => "varchar", is_nullable => 0, size => 255 },
97
  "repository",
98
  { data_type => "varchar", is_nullable => 0, size => 255 },
99
  "recordtype",
100
  {
101
    data_type => "enum",
102
    default_value => "biblio",
103
    extra => { list => ["authority", "biblio"] },
104
    is_nullable => 0,
105
  },
106
  "datestamp",
107
  { data_type => "varchar", is_nullable => 1, size => 255 },
108
  "last_modified",
109
  {
110
    data_type => "timestamp",
111
    datetime_undef_if_invalid => 1,
112
    default_value => \"current_timestamp",
113
    is_nullable => 0,
114
  },
115
);
116
117
=head1 PRIMARY KEY
118
119
=over 4
120
121
=item * L</id>
122
123
=back
124
125
=cut
126
127
__PACKAGE__->set_primary_key("id");
128
129
=head1 RELATIONS
130
131
=head2 authid
132
133
Type: belongs_to
134
135
Related object: L<Koha::Schema::Result::AuthHeader>
136
137
=cut
138
139
__PACKAGE__->belongs_to(
140
  "authid",
141
  "Koha::Schema::Result::AuthHeader",
142
  { authid => "authid" },
143
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "NO ACTION" },
144
);
145
146
147
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-28 09:10:10
148
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9JtWGrOyu8jBoK1gGIVKFg
149
150
151
# You can replace this text with custom code or comments, and it will be preserved on regeneration
152
1;
(-)a/Koha/Schema/Result/ImportOaipmhBiblio.pm (+146 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::ImportOaipmhBiblio;
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::ImportOaipmhBiblio
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<import_oaipmh_biblios>
19
20
=cut
21
22
__PACKAGE__->table("import_oaipmh_biblios");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
unique identifier assigned by Koha
33
34
=head2 biblionumber
35
36
  data_type: 'integer'
37
  is_foreign_key: 1
38
  is_nullable: 0
39
40
unique identifier assigned to each koha record
41
42
=head2 identifier
43
44
  data_type: 'varchar'
45
  is_nullable: 0
46
  size: 255
47
48
OAI record identifier
49
50
=head2 repository
51
52
  data_type: 'varchar'
53
  is_nullable: 0
54
  size: 255
55
56
OAI repository
57
58
=head2 recordtype
59
60
  data_type: 'enum'
61
  default_value: 'biblio'
62
  extra: {list => ["authority","biblio"]}
63
  is_nullable: 0
64
65
is the record bibliographic or authority
66
67
=head2 datestamp
68
69
  data_type: 'varchar'
70
  is_nullable: 1
71
  size: 255
72
73
OAI set to harvest
74
75
=head2 last_modified
76
77
  data_type: 'timestamp'
78
  datetime_undef_if_invalid: 1
79
  default_value: current_timestamp
80
  is_nullable: 0
81
82
=cut
83
84
__PACKAGE__->add_columns(
85
  "id",
86
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
87
  "biblionumber",
88
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
89
  "identifier",
90
  { data_type => "varchar", is_nullable => 0, size => 255 },
91
  "repository",
92
  { data_type => "varchar", is_nullable => 0, size => 255 },
93
  "recordtype",
94
  {
95
    data_type => "enum",
96
    default_value => "biblio",
97
    extra => { list => ["authority", "biblio"] },
98
    is_nullable => 0,
99
  },
100
  "datestamp",
101
  { data_type => "varchar", is_nullable => 1, size => 255 },
102
  "last_modified",
103
  {
104
    data_type => "timestamp",
105
    datetime_undef_if_invalid => 1,
106
    default_value => \"current_timestamp",
107
    is_nullable => 0,
108
  },
109
);
110
111
=head1 PRIMARY KEY
112
113
=over 4
114
115
=item * L</id>
116
117
=back
118
119
=cut
120
121
__PACKAGE__->set_primary_key("id");
122
123
=head1 RELATIONS
124
125
=head2 biblionumber
126
127
Type: belongs_to
128
129
Related object: L<Koha::Schema::Result::Biblio>
130
131
=cut
132
133
__PACKAGE__->belongs_to(
134
  "biblionumber",
135
  "Koha::Schema::Result::Biblio",
136
  { biblionumber => "biblionumber" },
137
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "NO ACTION" },
138
);
139
140
141
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-28 09:10:10
142
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SXVQCEuMJAJ1zfKoNEG0jg
143
144
145
# You can replace this text with custom code or comments, and it will be preserved on regeneration
146
1;
(-)a/Koha/Schema/Result/Oaiserver.pm (-1 / +136 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::Oaiserver;
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::Oaiserver
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<oaiservers>
19
20
=cut
21
22
__PACKAGE__->table("oaiservers");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
unique identifier assigned by Koha
33
34
=head2 endpoint
35
36
  data_type: 'varchar'
37
  is_nullable: 0
38
  size: 255
39
40
OAI endpoint (host + port + path)
41
42
=head2 oai_set
43
44
  data_type: 'varchar'
45
  is_nullable: 1
46
  size: 255
47
48
OAI set to harvest
49
50
=head2 servername
51
52
  data_type: 'longtext'
53
  is_nullable: 0
54
55
name given to the target by the library
56
57
=head2 dataformat
58
59
  data_type: 'enum'
60
  default_value: 'oai_dc'
61
  extra: {list => ["oai_dc","marc-xml","marcxml"]}
62
  is_nullable: 0
63
64
data format
65
66
=head2 recordtype
67
68
  data_type: 'enum'
69
  default_value: 'biblio'
70
  extra: {list => ["authority","biblio"]}
71
  is_nullable: 0
72
73
server contains bibliographic or authority records
74
75
=head2 add_xslt
76
77
  data_type: 'longtext'
78
  is_nullable: 1
79
80
zero or more paths to XSLT files to be processed on the search results
81
82
=cut
83
84
__PACKAGE__->add_columns(
85
  "id",
86
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
87
  "endpoint",
88
  { data_type => "varchar", is_nullable => 0, size => 255 },
89
  "oai_set",
90
  { data_type => "varchar", is_nullable => 1, size => 255 },
91
  "servername",
92
  { data_type => "longtext", is_nullable => 0 },
93
  "dataformat",
94
  {
95
    data_type => "enum",
96
    default_value => "oai_dc",
97
    extra => { list => ["oai_dc", "marc-xml", "marcxml"] },
98
    is_nullable => 0,
99
  },
100
  "recordtype",
101
  {
102
    data_type => "enum",
103
    default_value => "biblio",
104
    extra => { list => ["authority", "biblio"] },
105
    is_nullable => 0,
106
  },
107
  "add_xslt",
108
  { data_type => "longtext", is_nullable => 1 },
109
);
110
111
=head1 PRIMARY KEY
112
113
=over 4
114
115
=item * L</id>
116
117
=back
118
119
=cut
120
121
__PACKAGE__->set_primary_key("id");
122
123
124
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-12-28 09:12:41
125
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DaalHke73YH5EXeqzS61bA
126
127
sub koha_object_class {
128
    'Koha::OaiServer';
129
}
130
sub koha_objects_class {
131
    'Koha::OaiServers';
132
}
133
134
135
# You can replace this text with custom code or comments, and it will be preserved on regeneration
136
1;

Return to bug 35659