Bug 8015: (follow-up) update DBIx::Class schema classes
[koha.git] / Koha / Schema / Result / MarcModificationTemplateAction.pm
1 use utf8;
2 package Koha::Schema::Result::MarcModificationTemplateAction;
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::MarcModificationTemplateAction
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<marc_modification_template_actions>
19
20 =cut
21
22 __PACKAGE__->table("marc_modification_template_actions");
23
24 =head1 ACCESSORS
25
26 =head2 mmta_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 template_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 ordering
39
40   data_type: 'integer'
41   is_nullable: 0
42
43 =head2 action
44
45   data_type: 'enum'
46   extra: {list => ["delete_field","update_field","move_field","copy_field"]}
47   is_nullable: 0
48
49 =head2 field_number
50
51   data_type: 'smallint'
52   default_value: 0
53   is_nullable: 0
54
55 =head2 from_field
56
57   data_type: 'varchar'
58   is_nullable: 0
59   size: 3
60
61 =head2 from_subfield
62
63   data_type: 'varchar'
64   is_nullable: 1
65   size: 1
66
67 =head2 field_value
68
69   data_type: 'varchar'
70   is_nullable: 1
71   size: 100
72
73 =head2 to_field
74
75   data_type: 'varchar'
76   is_nullable: 1
77   size: 3
78
79 =head2 to_subfield
80
81   data_type: 'varchar'
82   is_nullable: 1
83   size: 1
84
85 =head2 to_regex_search
86
87   data_type: 'text'
88   is_nullable: 1
89
90 =head2 to_regex_replace
91
92   data_type: 'text'
93   is_nullable: 1
94
95 =head2 to_regex_modifiers
96
97   data_type: 'varchar'
98   default_value: (empty string)
99   is_nullable: 1
100   size: 8
101
102 =head2 conditional
103
104   data_type: 'enum'
105   extra: {list => ["if","unless"]}
106   is_nullable: 1
107
108 =head2 conditional_field
109
110   data_type: 'varchar'
111   is_nullable: 1
112   size: 3
113
114 =head2 conditional_subfield
115
116   data_type: 'varchar'
117   is_nullable: 1
118   size: 1
119
120 =head2 conditional_comparison
121
122   data_type: 'enum'
123   extra: {list => ["exists","not_exists","equals","not_equals"]}
124   is_nullable: 1
125
126 =head2 conditional_value
127
128   data_type: 'text'
129   is_nullable: 1
130
131 =head2 conditional_regex
132
133   data_type: 'tinyint'
134   default_value: 0
135   is_nullable: 0
136
137 =head2 description
138
139   data_type: 'text'
140   is_nullable: 1
141
142 =cut
143
144 __PACKAGE__->add_columns(
145   "mmta_id",
146   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
147   "template_id",
148   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
149   "ordering",
150   { data_type => "integer", is_nullable => 0 },
151   "action",
152   {
153     data_type => "enum",
154     extra => {
155       list => ["delete_field", "update_field", "move_field", "copy_field"],
156     },
157     is_nullable => 0,
158   },
159   "field_number",
160   { data_type => "smallint", default_value => 0, is_nullable => 0 },
161   "from_field",
162   { data_type => "varchar", is_nullable => 0, size => 3 },
163   "from_subfield",
164   { data_type => "varchar", is_nullable => 1, size => 1 },
165   "field_value",
166   { data_type => "varchar", is_nullable => 1, size => 100 },
167   "to_field",
168   { data_type => "varchar", is_nullable => 1, size => 3 },
169   "to_subfield",
170   { data_type => "varchar", is_nullable => 1, size => 1 },
171   "to_regex_search",
172   { data_type => "text", is_nullable => 1 },
173   "to_regex_replace",
174   { data_type => "text", is_nullable => 1 },
175   "to_regex_modifiers",
176   { data_type => "varchar", default_value => "", is_nullable => 1, size => 8 },
177   "conditional",
178   {
179     data_type => "enum",
180     extra => { list => ["if", "unless"] },
181     is_nullable => 1,
182   },
183   "conditional_field",
184   { data_type => "varchar", is_nullable => 1, size => 3 },
185   "conditional_subfield",
186   { data_type => "varchar", is_nullable => 1, size => 1 },
187   "conditional_comparison",
188   {
189     data_type => "enum",
190     extra => { list => ["exists", "not_exists", "equals", "not_equals"] },
191     is_nullable => 1,
192   },
193   "conditional_value",
194   { data_type => "text", is_nullable => 1 },
195   "conditional_regex",
196   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
197   "description",
198   { data_type => "text", is_nullable => 1 },
199 );
200
201 =head1 PRIMARY KEY
202
203 =over 4
204
205 =item * L</mmta_id>
206
207 =back
208
209 =cut
210
211 __PACKAGE__->set_primary_key("mmta_id");
212
213 =head1 RELATIONS
214
215 =head2 template
216
217 Type: belongs_to
218
219 Related object: L<Koha::Schema::Result::MarcModificationTemplate>
220
221 =cut
222
223 __PACKAGE__->belongs_to(
224   "template",
225   "Koha::Schema::Result::MarcModificationTemplate",
226   { template_id => "template_id" },
227   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
228 );
229
230
231 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 22:03:59
232 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sl0AD0sWPYcKRjHN3l3eFg
233
234
235 # You can replace this text with custom code or comments, and it will be preserved on regeneration
236 1;