Bug 24151: DBIC changes
[koha.git] / Koha / Schema / Result / BorrowerAttributeType.pm
blob70abaa3700cc402ac71a958697bed077b312e6d1
1 use utf8;
2 package Koha::Schema::Result::BorrowerAttributeType;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::BorrowerAttributeType
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<borrower_attribute_types>
20 =cut
22 __PACKAGE__->table("borrower_attribute_types");
24 =head1 ACCESSORS
26 =head2 code
28 data_type: 'varchar'
29 is_nullable: 0
30 size: 10
32 =head2 description
34 data_type: 'varchar'
35 is_nullable: 0
36 size: 255
38 =head2 repeatable
40 data_type: 'tinyint'
41 default_value: 0
42 is_nullable: 0
44 =head2 unique_id
46 data_type: 'tinyint'
47 default_value: 0
48 is_nullable: 0
50 =head2 opac_display
52 data_type: 'tinyint'
53 default_value: 0
54 is_nullable: 0
56 =head2 opac_editable
58 data_type: 'tinyint'
59 default_value: 0
60 is_nullable: 0
62 =head2 staff_searchable
64 data_type: 'tinyint'
65 default_value: 0
66 is_nullable: 0
68 =head2 authorised_value_category
70 data_type: 'varchar'
71 is_nullable: 1
72 size: 32
74 =head2 display_checkout
76 data_type: 'tinyint'
77 default_value: 0
78 is_nullable: 0
80 =head2 category_code
82 data_type: 'varchar'
83 is_nullable: 1
84 size: 10
86 =head2 class
88 data_type: 'varchar'
89 default_value: (empty string)
90 is_nullable: 0
91 size: 255
93 =head2 keep_for_pseudonymization
95 data_type: 'tinyint'
96 default_value: 0
97 is_nullable: 0
99 =cut
101 __PACKAGE__->add_columns(
102 "code",
103 { data_type => "varchar", is_nullable => 0, size => 10 },
104 "description",
105 { data_type => "varchar", is_nullable => 0, size => 255 },
106 "repeatable",
107 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
108 "unique_id",
109 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
110 "opac_display",
111 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
112 "opac_editable",
113 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
114 "staff_searchable",
115 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
116 "authorised_value_category",
117 { data_type => "varchar", is_nullable => 1, size => 32 },
118 "display_checkout",
119 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
120 "category_code",
121 { data_type => "varchar", is_nullable => 1, size => 10 },
122 "class",
123 { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
124 "keep_for_pseudonymization",
125 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
128 =head1 PRIMARY KEY
130 =over 4
132 =item * L</code>
134 =back
136 =cut
138 __PACKAGE__->set_primary_key("code");
140 =head1 RELATIONS
142 =head2 borrower_attribute_types_branches
144 Type: has_many
146 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
148 =cut
150 __PACKAGE__->has_many(
151 "borrower_attribute_types_branches",
152 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
153 { "foreign.bat_code" => "self.code" },
154 { cascade_copy => 0, cascade_delete => 0 },
157 =head2 borrower_attributes
159 Type: has_many
161 Related object: L<Koha::Schema::Result::BorrowerAttribute>
163 =cut
165 __PACKAGE__->has_many(
166 "borrower_attributes",
167 "Koha::Schema::Result::BorrowerAttribute",
168 { "foreign.code" => "self.code" },
169 { cascade_copy => 0, cascade_delete => 0 },
172 =head2 pseudonymized_borrower_attributes
174 Type: has_many
176 Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
178 =cut
180 __PACKAGE__->has_many(
181 "pseudonymized_borrower_attributes",
182 "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
183 { "foreign.code" => "self.code" },
184 { cascade_copy => 0, cascade_delete => 0 },
188 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 18:00:12
189 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MMozmna9C3PseXF0Qskznw
191 __PACKAGE__->add_columns(
192 '+keep_for_pseudonymization' => { is_boolean => 1 },
195 sub koha_object_class {
196 'Koha::Patron::Attribute::Type';
198 sub koha_objects_class {
199 'Koha::Patron::Attribute::Types';