Bug 26922: Regression tests
[koha.git] / Koha / Schema / Result / PseudonymizedTransaction.pm
blobccbe7434a64fe91a896241ae024dbbfc2f1c9500
1 use utf8;
2 package Koha::Schema::Result::PseudonymizedTransaction;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::PseudonymizedTransaction
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<pseudonymized_transactions>
20 =cut
22 __PACKAGE__->table("pseudonymized_transactions");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 hashed_borrowernumber
34 data_type: 'varchar'
35 is_nullable: 0
36 size: 60
38 =head2 has_cardnumber
40 data_type: 'tinyint'
41 default_value: 0
42 is_nullable: 0
44 =head2 title
46 data_type: 'longtext'
47 is_nullable: 1
49 =head2 city
51 data_type: 'longtext'
52 is_nullable: 1
54 =head2 state
56 data_type: 'mediumtext'
57 is_nullable: 1
59 =head2 zipcode
61 data_type: 'varchar'
62 is_nullable: 1
63 size: 25
65 =head2 country
67 data_type: 'mediumtext'
68 is_nullable: 1
70 =head2 branchcode
72 data_type: 'varchar'
73 default_value: (empty string)
74 is_foreign_key: 1
75 is_nullable: 0
76 size: 10
78 =head2 categorycode
80 data_type: 'varchar'
81 default_value: (empty string)
82 is_foreign_key: 1
83 is_nullable: 0
84 size: 10
86 =head2 dateenrolled
88 data_type: 'date'
89 datetime_undef_if_invalid: 1
90 is_nullable: 1
92 =head2 sex
94 data_type: 'varchar'
95 is_nullable: 1
96 size: 1
98 =head2 sort1
100 data_type: 'varchar'
101 is_nullable: 1
102 size: 80
104 =head2 sort2
106 data_type: 'varchar'
107 is_nullable: 1
108 size: 80
110 =head2 datetime
112 data_type: 'datetime'
113 datetime_undef_if_invalid: 1
114 is_nullable: 1
116 =head2 transaction_branchcode
118 data_type: 'varchar'
119 is_foreign_key: 1
120 is_nullable: 1
121 size: 10
123 =head2 transaction_type
125 data_type: 'varchar'
126 is_nullable: 1
127 size: 16
129 =head2 itemnumber
131 data_type: 'integer'
132 is_nullable: 1
134 =head2 itemtype
136 data_type: 'varchar'
137 is_nullable: 1
138 size: 10
140 =head2 holdingbranch
142 data_type: 'varchar'
143 is_nullable: 1
144 size: 10
146 =head2 homebranch
148 data_type: 'varchar'
149 is_nullable: 1
150 size: 10
152 =head2 location
154 data_type: 'varchar'
155 is_nullable: 1
156 size: 80
158 =head2 itemcallnumber
160 data_type: 'varchar'
161 is_nullable: 1
162 size: 255
164 =head2 ccode
166 data_type: 'varchar'
167 is_nullable: 1
168 size: 80
170 =cut
172 __PACKAGE__->add_columns(
173 "id",
174 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
175 "hashed_borrowernumber",
176 { data_type => "varchar", is_nullable => 0, size => 60 },
177 "has_cardnumber",
178 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
179 "title",
180 { data_type => "longtext", is_nullable => 1 },
181 "city",
182 { data_type => "longtext", is_nullable => 1 },
183 "state",
184 { data_type => "mediumtext", is_nullable => 1 },
185 "zipcode",
186 { data_type => "varchar", is_nullable => 1, size => 25 },
187 "country",
188 { data_type => "mediumtext", is_nullable => 1 },
189 "branchcode",
191 data_type => "varchar",
192 default_value => "",
193 is_foreign_key => 1,
194 is_nullable => 0,
195 size => 10,
197 "categorycode",
199 data_type => "varchar",
200 default_value => "",
201 is_foreign_key => 1,
202 is_nullable => 0,
203 size => 10,
205 "dateenrolled",
206 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
207 "sex",
208 { data_type => "varchar", is_nullable => 1, size => 1 },
209 "sort1",
210 { data_type => "varchar", is_nullable => 1, size => 80 },
211 "sort2",
212 { data_type => "varchar", is_nullable => 1, size => 80 },
213 "datetime",
215 data_type => "datetime",
216 datetime_undef_if_invalid => 1,
217 is_nullable => 1,
219 "transaction_branchcode",
220 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
221 "transaction_type",
222 { data_type => "varchar", is_nullable => 1, size => 16 },
223 "itemnumber",
224 { data_type => "integer", is_nullable => 1 },
225 "itemtype",
226 { data_type => "varchar", is_nullable => 1, size => 10 },
227 "holdingbranch",
228 { data_type => "varchar", is_nullable => 1, size => 10 },
229 "homebranch",
230 { data_type => "varchar", is_nullable => 1, size => 10 },
231 "location",
232 { data_type => "varchar", is_nullable => 1, size => 80 },
233 "itemcallnumber",
234 { data_type => "varchar", is_nullable => 1, size => 255 },
235 "ccode",
236 { data_type => "varchar", is_nullable => 1, size => 80 },
239 =head1 PRIMARY KEY
241 =over 4
243 =item * L</id>
245 =back
247 =cut
249 __PACKAGE__->set_primary_key("id");
251 =head1 RELATIONS
253 =head2 branchcode
255 Type: belongs_to
257 Related object: L<Koha::Schema::Result::Branch>
259 =cut
261 __PACKAGE__->belongs_to(
262 "branchcode",
263 "Koha::Schema::Result::Branch",
264 { branchcode => "branchcode" },
265 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
268 =head2 categorycode
270 Type: belongs_to
272 Related object: L<Koha::Schema::Result::Category>
274 =cut
276 __PACKAGE__->belongs_to(
277 "categorycode",
278 "Koha::Schema::Result::Category",
279 { categorycode => "categorycode" },
280 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
283 =head2 pseudonymized_borrower_attributes
285 Type: has_many
287 Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
289 =cut
291 __PACKAGE__->has_many(
292 "pseudonymized_borrower_attributes",
293 "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
294 { "foreign.transaction_id" => "self.id" },
295 { cascade_copy => 0, cascade_delete => 0 },
298 =head2 transaction_branchcode
300 Type: belongs_to
302 Related object: L<Koha::Schema::Result::Branch>
304 =cut
306 __PACKAGE__->belongs_to(
307 "transaction_branchcode",
308 "Koha::Schema::Result::Branch",
309 { branchcode => "transaction_branchcode" },
311 is_deferrable => 1,
312 join_type => "LEFT",
313 on_delete => "RESTRICT",
314 on_update => "RESTRICT",
319 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-17 16:28:03
320 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jgUZi4W5vJo33KdKI7+jyQ
322 __PACKAGE__->add_columns(
323 '+has_cardnumber' => { is_boolean => 1 },