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

(-)a/Koha/Schema/Result/MarcMergeRule.pm (+128 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::MarcMergeRule;
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::MarcMergeRule
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<marc_merge_rules>
19
20
=cut
21
22
__PACKAGE__->table("marc_merge_rules");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 tag
33
34
  data_type: 'varchar'
35
  is_nullable: 0
36
  size: 255
37
38
=head2 module
39
40
  data_type: 'varchar'
41
  is_foreign_key: 1
42
  is_nullable: 0
43
  size: 255
44
45
=head2 filter
46
47
  data_type: 'varchar'
48
  is_nullable: 0
49
  size: 255
50
51
=head2 add
52
53
  data_type: 'tinyint'
54
  is_nullable: 0
55
56
=head2 append
57
58
  data_type: 'tinyint'
59
  is_nullable: 0
60
61
=head2 remove
62
63
  data_type: 'tinyint'
64
  is_nullable: 0
65
66
=head2 delete
67
68
  accessor: undef
69
  data_type: 'tinyint'
70
  is_nullable: 0
71
72
=cut
73
74
__PACKAGE__->add_columns(
75
  "id",
76
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77
  "tag",
78
  { data_type => "varchar", is_nullable => 0, size => 255 },
79
  "module",
80
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 255 },
81
  "filter",
82
  { data_type => "varchar", is_nullable => 0, size => 255 },
83
  "add",
84
  { data_type => "tinyint", is_nullable => 0 },
85
  "append",
86
  { data_type => "tinyint", is_nullable => 0 },
87
  "remove",
88
  { data_type => "tinyint", is_nullable => 0 },
89
  "delete",
90
  { accessor => undef, data_type => "tinyint", is_nullable => 0 },
91
);
92
93
=head1 PRIMARY KEY
94
95
=over 4
96
97
=item * L</id>
98
99
=back
100
101
=cut
102
103
__PACKAGE__->set_primary_key("id");
104
105
=head1 RELATIONS
106
107
=head2 module
108
109
Type: belongs_to
110
111
Related object: L<Koha::Schema::Result::MarcMergeRulesModule>
112
113
=cut
114
115
__PACKAGE__->belongs_to(
116
  "module",
117
  "Koha::Schema::Result::MarcMergeRulesModule",
118
  { name => "module" },
119
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
120
);
121
122
123
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-20 08:56:07
124
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CLrTLesHXkGKCs89us0xgQ
125
126
127
# You can replace this text with custom code or comments, and it will be preserved on regeneration
128
1;
(-)a/Koha/Schema/Result/MarcMergeRulesModule.pm (-1 / +103 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::MarcMergeRulesModule;
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::MarcMergeRulesModule
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<marc_merge_rules_modules>
19
20
=cut
21
22
__PACKAGE__->table("marc_merge_rules_modules");
23
24
=head1 ACCESSORS
25
26
=head2 name
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 255
31
32
=head2 description
33
34
  data_type: 'varchar'
35
  is_nullable: 1
36
  size: 255
37
38
=head2 specificity
39
40
  data_type: 'integer'
41
  is_nullable: 0
42
43
=cut
44
45
__PACKAGE__->add_columns(
46
  "name",
47
  { data_type => "varchar", is_nullable => 0, size => 255 },
48
  "description",
49
  { data_type => "varchar", is_nullable => 1, size => 255 },
50
  "specificity",
51
  { data_type => "integer", is_nullable => 0 },
52
);
53
54
=head1 PRIMARY KEY
55
56
=over 4
57
58
=item * L</name>
59
60
=back
61
62
=cut
63
64
__PACKAGE__->set_primary_key("name");
65
66
=head1 UNIQUE CONSTRAINTS
67
68
=head2 C<specificity>
69
70
=over 4
71
72
=item * L</specificity>
73
74
=back
75
76
=cut
77
78
__PACKAGE__->add_unique_constraint("specificity", ["specificity"]);
79
80
=head1 RELATIONS
81
82
=head2 marc_merge_rules
83
84
Type: has_many
85
86
Related object: L<Koha::Schema::Result::MarcMergeRule>
87
88
=cut
89
90
__PACKAGE__->has_many(
91
  "marc_merge_rules",
92
  "Koha::Schema::Result::MarcMergeRule",
93
  { "foreign.module" => "self.name" },
94
  { cascade_copy => 0, cascade_delete => 0 },
95
);
96
97
98
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-15 12:11:59
99
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bNG+m3wj6NDa6mZCtI2nKg
100
101
102
# You can replace this text with custom code or comments, and it will be preserved on regeneration
103
1;

Return to bug 14957