Bug 11502: make library filter in "Holds To Pull" more precise
[koha.git] / Koha / Schema / Result / BorrowerMessagePreference.pm
blob3069df50f042655a281d5b68c84552875035a776
1 use utf8;
2 package Koha::Schema::Result::BorrowerMessagePreference;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::BorrowerMessagePreference
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<borrower_message_preferences>
20 =cut
22 __PACKAGE__->table("borrower_message_preferences");
24 =head1 ACCESSORS
26 =head2 borrower_message_preference_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 borrowernumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 1
38 =head2 categorycode
40 data_type: 'varchar'
41 is_foreign_key: 1
42 is_nullable: 1
43 size: 10
45 =head2 message_attribute_id
47 data_type: 'integer'
48 default_value: 0
49 is_foreign_key: 1
50 is_nullable: 1
52 =head2 days_in_advance
54 data_type: 'integer'
55 default_value: 0
56 is_nullable: 1
58 =head2 wants_digest
60 data_type: 'tinyint'
61 default_value: 0
62 is_nullable: 0
64 =cut
66 __PACKAGE__->add_columns(
67 "borrower_message_preference_id",
68 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
69 "borrowernumber",
70 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
71 "categorycode",
72 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
73 "message_attribute_id",
75 data_type => "integer",
76 default_value => 0,
77 is_foreign_key => 1,
78 is_nullable => 1,
80 "days_in_advance",
81 { data_type => "integer", default_value => 0, is_nullable => 1 },
82 "wants_digest",
83 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
86 =head1 PRIMARY KEY
88 =over 4
90 =item * L</borrower_message_preference_id>
92 =back
94 =cut
96 __PACKAGE__->set_primary_key("borrower_message_preference_id");
98 =head1 RELATIONS
100 =head2 borrower_message_transport_preferences
102 Type: has_many
104 Related object: L<Koha::Schema::Result::BorrowerMessageTransportPreference>
106 =cut
108 __PACKAGE__->has_many(
109 "borrower_message_transport_preferences",
110 "Koha::Schema::Result::BorrowerMessageTransportPreference",
112 "foreign.borrower_message_preference_id" => "self.borrower_message_preference_id",
114 { cascade_copy => 0, cascade_delete => 0 },
117 =head2 borrowernumber
119 Type: belongs_to
121 Related object: L<Koha::Schema::Result::Borrower>
123 =cut
125 __PACKAGE__->belongs_to(
126 "borrowernumber",
127 "Koha::Schema::Result::Borrower",
128 { borrowernumber => "borrowernumber" },
130 is_deferrable => 1,
131 join_type => "LEFT",
132 on_delete => "CASCADE",
133 on_update => "CASCADE",
137 =head2 categorycode
139 Type: belongs_to
141 Related object: L<Koha::Schema::Result::Category>
143 =cut
145 __PACKAGE__->belongs_to(
146 "categorycode",
147 "Koha::Schema::Result::Category",
148 { categorycode => "categorycode" },
150 is_deferrable => 1,
151 join_type => "LEFT",
152 on_delete => "CASCADE",
153 on_update => "CASCADE",
157 =head2 message_attribute
159 Type: belongs_to
161 Related object: L<Koha::Schema::Result::MessageAttribute>
163 =cut
165 __PACKAGE__->belongs_to(
166 "message_attribute",
167 "Koha::Schema::Result::MessageAttribute",
168 { message_attribute_id => "message_attribute_id" },
170 is_deferrable => 1,
171 join_type => "LEFT",
172 on_delete => "CASCADE",
173 on_update => "CASCADE",
177 =head2 message_transport_types
179 Type: many_to_many
181 Composing rels: L</borrower_message_transport_preferences> -> message_transport_type
183 =cut
185 __PACKAGE__->many_to_many(
186 "message_transport_types",
187 "borrower_message_transport_preferences",
188 "message_transport_type",
192 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
193 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hd5sPnxGi5332WmzqCus8A
196 # You can replace this text with custom content, and it will be preserved on regeneration