Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::AnonymizedBorrower; |
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::AnonymizedBorrower |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<anonymized_borrowers> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("anonymized_borrowers"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 hashed_borrowernumber |
27 |
|
28 |
data_type: 'varchar' |
29 |
is_nullable: 0 |
30 |
size: 60 |
31 |
|
32 |
=head2 has_cardnumber |
33 |
|
34 |
data_type: 'tinyint' |
35 |
default_value: 0 |
36 |
is_nullable: 0 |
37 |
|
38 |
=head2 title |
39 |
|
40 |
data_type: 'longtext' |
41 |
is_nullable: 1 |
42 |
|
43 |
=head2 city |
44 |
|
45 |
data_type: 'longtext' |
46 |
is_nullable: 1 |
47 |
|
48 |
=head2 state |
49 |
|
50 |
data_type: 'mediumtext' |
51 |
is_nullable: 1 |
52 |
|
53 |
=head2 zipcode |
54 |
|
55 |
data_type: 'varchar' |
56 |
is_nullable: 1 |
57 |
size: 25 |
58 |
|
59 |
=head2 country |
60 |
|
61 |
data_type: 'mediumtext' |
62 |
is_nullable: 1 |
63 |
|
64 |
=head2 branchcode |
65 |
|
66 |
data_type: 'varchar' |
67 |
default_value: (empty string) |
68 |
is_foreign_key: 1 |
69 |
is_nullable: 0 |
70 |
size: 10 |
71 |
|
72 |
=head2 categorycode |
73 |
|
74 |
data_type: 'varchar' |
75 |
default_value: (empty string) |
76 |
is_foreign_key: 1 |
77 |
is_nullable: 0 |
78 |
size: 10 |
79 |
|
80 |
=head2 dateenrolled |
81 |
|
82 |
data_type: 'date' |
83 |
datetime_undef_if_invalid: 1 |
84 |
is_nullable: 1 |
85 |
|
86 |
=head2 sex |
87 |
|
88 |
data_type: 'varchar' |
89 |
is_nullable: 1 |
90 |
size: 1 |
91 |
|
92 |
=head2 sort1 |
93 |
|
94 |
data_type: 'varchar' |
95 |
is_nullable: 1 |
96 |
size: 80 |
97 |
|
98 |
=head2 sort2 |
99 |
|
100 |
data_type: 'varchar' |
101 |
is_nullable: 1 |
102 |
size: 80 |
103 |
|
104 |
=cut |
105 |
|
106 |
__PACKAGE__->add_columns( |
107 |
"hashed_borrowernumber", |
108 |
{ data_type => "varchar", is_nullable => 0, size => 60 }, |
109 |
"has_cardnumber", |
110 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
111 |
"title", |
112 |
{ data_type => "longtext", is_nullable => 1 }, |
113 |
"city", |
114 |
{ data_type => "longtext", is_nullable => 1 }, |
115 |
"state", |
116 |
{ data_type => "mediumtext", is_nullable => 1 }, |
117 |
"zipcode", |
118 |
{ data_type => "varchar", is_nullable => 1, size => 25 }, |
119 |
"country", |
120 |
{ data_type => "mediumtext", is_nullable => 1 }, |
121 |
"branchcode", |
122 |
{ |
123 |
data_type => "varchar", |
124 |
default_value => "", |
125 |
is_foreign_key => 1, |
126 |
is_nullable => 0, |
127 |
size => 10, |
128 |
}, |
129 |
"categorycode", |
130 |
{ |
131 |
data_type => "varchar", |
132 |
default_value => "", |
133 |
is_foreign_key => 1, |
134 |
is_nullable => 0, |
135 |
size => 10, |
136 |
}, |
137 |
"dateenrolled", |
138 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
139 |
"sex", |
140 |
{ data_type => "varchar", is_nullable => 1, size => 1 }, |
141 |
"sort1", |
142 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
143 |
"sort2", |
144 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
145 |
); |
146 |
|
147 |
=head1 PRIMARY KEY |
148 |
|
149 |
=over 4 |
150 |
|
151 |
=item * L</hashed_borrowernumber> |
152 |
|
153 |
=back |
154 |
|
155 |
=cut |
156 |
|
157 |
__PACKAGE__->set_primary_key("hashed_borrowernumber"); |
158 |
|
159 |
=head1 RELATIONS |
160 |
|
161 |
=head2 anonymized_borrower_attributes |
162 |
|
163 |
Type: has_many |
164 |
|
165 |
Related object: L<Koha::Schema::Result::AnonymizedBorrowerAttribute> |
166 |
|
167 |
=cut |
168 |
|
169 |
__PACKAGE__->has_many( |
170 |
"anonymized_borrower_attributes", |
171 |
"Koha::Schema::Result::AnonymizedBorrowerAttribute", |
172 |
{ "foreign.hashed_borrowernumber" => "self.hashed_borrowernumber" }, |
173 |
{ cascade_copy => 0, cascade_delete => 0 }, |
174 |
); |
175 |
|
176 |
=head2 anonymized_transactions |
177 |
|
178 |
Type: has_many |
179 |
|
180 |
Related object: L<Koha::Schema::Result::AnonymizedTransaction> |
181 |
|
182 |
=cut |
183 |
|
184 |
__PACKAGE__->has_many( |
185 |
"anonymized_transactions", |
186 |
"Koha::Schema::Result::AnonymizedTransaction", |
187 |
{ "foreign.hashed_borrowernumber" => "self.hashed_borrowernumber" }, |
188 |
{ cascade_copy => 0, cascade_delete => 0 }, |
189 |
); |
190 |
|
191 |
=head2 branchcode |
192 |
|
193 |
Type: belongs_to |
194 |
|
195 |
Related object: L<Koha::Schema::Result::Branch> |
196 |
|
197 |
=cut |
198 |
|
199 |
__PACKAGE__->belongs_to( |
200 |
"branchcode", |
201 |
"Koha::Schema::Result::Branch", |
202 |
{ branchcode => "branchcode" }, |
203 |
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, |
204 |
); |
205 |
|
206 |
=head2 categorycode |
207 |
|
208 |
Type: belongs_to |
209 |
|
210 |
Related object: L<Koha::Schema::Result::Category> |
211 |
|
212 |
=cut |
213 |
|
214 |
__PACKAGE__->belongs_to( |
215 |
"categorycode", |
216 |
"Koha::Schema::Result::Category", |
217 |
{ categorycode => "categorycode" }, |
218 |
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, |
219 |
); |
220 |
|
221 |
|
222 |
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:04 |
223 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lQbpkjRIhSCiv17bsns6TQ |
224 |
|
225 |
|
226 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
227 |
1; |