Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / MarcModificationTemplateAction.pm
blob6523850ee522998ff29668912dcdeb173deb1e95
1 use utf8;
2 package Koha::Schema::Result::MarcModificationTemplateAction;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::MarcModificationTemplateAction
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<marc_modification_template_actions>
20 =cut
22 __PACKAGE__->table("marc_modification_template_actions");
24 =head1 ACCESSORS
26 =head2 mmta_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 template_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 ordering
40 data_type: 'integer'
41 is_nullable: 0
43 =head2 action
45 data_type: 'enum'
46 extra: {list => ["delete_field","add_field","update_field","move_field","copy_field","copy_and_replace_field"]}
47 is_nullable: 0
49 =head2 field_number
51 data_type: 'smallint'
52 default_value: 0
53 is_nullable: 0
55 =head2 from_field
57 data_type: 'varchar'
58 is_nullable: 0
59 size: 3
61 =head2 from_subfield
63 data_type: 'varchar'
64 is_nullable: 1
65 size: 1
67 =head2 field_value
69 data_type: 'varchar'
70 is_nullable: 1
71 size: 100
73 =head2 to_field
75 data_type: 'varchar'
76 is_nullable: 1
77 size: 3
79 =head2 to_subfield
81 data_type: 'varchar'
82 is_nullable: 1
83 size: 1
85 =head2 to_regex_search
87 data_type: 'mediumtext'
88 is_nullable: 1
90 =head2 to_regex_replace
92 data_type: 'mediumtext'
93 is_nullable: 1
95 =head2 to_regex_modifiers
97 data_type: 'varchar'
98 default_value: (empty string)
99 is_nullable: 1
100 size: 8
102 =head2 conditional
104 data_type: 'enum'
105 extra: {list => ["if","unless"]}
106 is_nullable: 1
108 =head2 conditional_field
110 data_type: 'varchar'
111 is_nullable: 1
112 size: 3
114 =head2 conditional_subfield
116 data_type: 'varchar'
117 is_nullable: 1
118 size: 1
120 =head2 conditional_comparison
122 data_type: 'enum'
123 extra: {list => ["exists","not_exists","equals","not_equals"]}
124 is_nullable: 1
126 =head2 conditional_value
128 data_type: 'mediumtext'
129 is_nullable: 1
131 =head2 conditional_regex
133 data_type: 'tinyint'
134 default_value: 0
135 is_nullable: 0
137 =head2 description
139 data_type: 'mediumtext'
140 is_nullable: 1
142 =cut
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",
153 data_type => "enum",
154 extra => {
155 list => [
156 "delete_field",
157 "add_field",
158 "update_field",
159 "move_field",
160 "copy_field",
161 "copy_and_replace_field",
164 is_nullable => 0,
166 "field_number",
167 { data_type => "smallint", default_value => 0, is_nullable => 0 },
168 "from_field",
169 { data_type => "varchar", is_nullable => 0, size => 3 },
170 "from_subfield",
171 { data_type => "varchar", is_nullable => 1, size => 1 },
172 "field_value",
173 { data_type => "varchar", is_nullable => 1, size => 100 },
174 "to_field",
175 { data_type => "varchar", is_nullable => 1, size => 3 },
176 "to_subfield",
177 { data_type => "varchar", is_nullable => 1, size => 1 },
178 "to_regex_search",
179 { data_type => "mediumtext", is_nullable => 1 },
180 "to_regex_replace",
181 { data_type => "mediumtext", is_nullable => 1 },
182 "to_regex_modifiers",
183 { data_type => "varchar", default_value => "", is_nullable => 1, size => 8 },
184 "conditional",
186 data_type => "enum",
187 extra => { list => ["if", "unless"] },
188 is_nullable => 1,
190 "conditional_field",
191 { data_type => "varchar", is_nullable => 1, size => 3 },
192 "conditional_subfield",
193 { data_type => "varchar", is_nullable => 1, size => 1 },
194 "conditional_comparison",
196 data_type => "enum",
197 extra => { list => ["exists", "not_exists", "equals", "not_equals"] },
198 is_nullable => 1,
200 "conditional_value",
201 { data_type => "mediumtext", is_nullable => 1 },
202 "conditional_regex",
203 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
204 "description",
205 { data_type => "mediumtext", is_nullable => 1 },
208 =head1 PRIMARY KEY
210 =over 4
212 =item * L</mmta_id>
214 =back
216 =cut
218 __PACKAGE__->set_primary_key("mmta_id");
220 =head1 RELATIONS
222 =head2 template
224 Type: belongs_to
226 Related object: L<Koha::Schema::Result::MarcModificationTemplate>
228 =cut
230 __PACKAGE__->belongs_to(
231 "template",
232 "Koha::Schema::Result::MarcModificationTemplate",
233 { template_id => "template_id" },
234 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
238 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-19 17:32:57
239 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dAUr9aGlNZleldYbjJHdmw
242 # You can replace this text with custom code or comments, and it will be preserved on regeneration