Bug 24151: DBIC changes
[koha.git] / Koha / Schema / Result / PseudonymizedTransaction.pm
blobff93ec48ceda86100d2c7678c03127365a1c108b
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 location
148 data_type: 'varchar'
149 is_nullable: 1
150 size: 80
152 =head2 itemcallnumber
154 data_type: 'varchar'
155 is_nullable: 1
156 size: 255
158 =head2 ccode
160 data_type: 'varchar'
161 is_nullable: 1
162 size: 80
164 =cut
166 __PACKAGE__->add_columns(
167 "id",
168 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
169 "hashed_borrowernumber",
170 { data_type => "varchar", is_nullable => 0, size => 60 },
171 "has_cardnumber",
172 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
173 "title",
174 { data_type => "longtext", is_nullable => 1 },
175 "city",
176 { data_type => "longtext", is_nullable => 1 },
177 "state",
178 { data_type => "mediumtext", is_nullable => 1 },
179 "zipcode",
180 { data_type => "varchar", is_nullable => 1, size => 25 },
181 "country",
182 { data_type => "mediumtext", is_nullable => 1 },
183 "branchcode",
185 data_type => "varchar",
186 default_value => "",
187 is_foreign_key => 1,
188 is_nullable => 0,
189 size => 10,
191 "categorycode",
193 data_type => "varchar",
194 default_value => "",
195 is_foreign_key => 1,
196 is_nullable => 0,
197 size => 10,
199 "dateenrolled",
200 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
201 "sex",
202 { data_type => "varchar", is_nullable => 1, size => 1 },
203 "sort1",
204 { data_type => "varchar", is_nullable => 1, size => 80 },
205 "sort2",
206 { data_type => "varchar", is_nullable => 1, size => 80 },
207 "datetime",
209 data_type => "datetime",
210 datetime_undef_if_invalid => 1,
211 is_nullable => 1,
213 "transaction_branchcode",
214 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
215 "transaction_type",
216 { data_type => "varchar", is_nullable => 1, size => 16 },
217 "itemnumber",
218 { data_type => "integer", is_nullable => 1 },
219 "itemtype",
220 { data_type => "varchar", is_nullable => 1, size => 10 },
221 "holdingbranch",
222 { data_type => "varchar", is_nullable => 1, size => 10 },
223 "location",
224 { data_type => "varchar", is_nullable => 1, size => 80 },
225 "itemcallnumber",
226 { data_type => "varchar", is_nullable => 1, size => 255 },
227 "ccode",
228 { data_type => "varchar", is_nullable => 1, size => 80 },
231 =head1 PRIMARY KEY
233 =over 4
235 =item * L</id>
237 =back
239 =cut
241 __PACKAGE__->set_primary_key("id");
243 =head1 RELATIONS
245 =head2 branchcode
247 Type: belongs_to
249 Related object: L<Koha::Schema::Result::Branch>
251 =cut
253 __PACKAGE__->belongs_to(
254 "branchcode",
255 "Koha::Schema::Result::Branch",
256 { branchcode => "branchcode" },
257 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
260 =head2 categorycode
262 Type: belongs_to
264 Related object: L<Koha::Schema::Result::Category>
266 =cut
268 __PACKAGE__->belongs_to(
269 "categorycode",
270 "Koha::Schema::Result::Category",
271 { categorycode => "categorycode" },
272 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
275 =head2 pseudonymized_borrower_attributes
277 Type: has_many
279 Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
281 =cut
283 __PACKAGE__->has_many(
284 "pseudonymized_borrower_attributes",
285 "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
286 { "foreign.transaction_id" => "self.id" },
287 { cascade_copy => 0, cascade_delete => 0 },
290 =head2 transaction_branchcode
292 Type: belongs_to
294 Related object: L<Koha::Schema::Result::Branch>
296 =cut
298 __PACKAGE__->belongs_to(
299 "transaction_branchcode",
300 "Koha::Schema::Result::Branch",
301 { branchcode => "transaction_branchcode" },
303 is_deferrable => 1,
304 join_type => "LEFT",
305 on_delete => "RESTRICT",
306 on_update => "RESTRICT",
311 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 17:12:17
312 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bzHjcKCHYf+bixeA1dhKIQ
315 # You can replace this text with custom code or comments, and it will be preserved on regeneration