Bug 19618: DBRev 19.06.00.030
[koha.git] / Koha / Schema / Result / ClubHoldsToPatronHold.pm
blobcb4931a675e17016e94595058140ed361caebbc7
1 use utf8;
2 package Koha::Schema::Result::ClubHoldsToPatronHold;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ClubHoldsToPatronHold
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<club_holds_to_patron_holds>
20 =cut
22 __PACKAGE__->table("club_holds_to_patron_holds");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 club_hold_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 patron_id
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 hold_id
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
50 =head2 error_code
52 data_type: 'enum'
53 extra: {list => ["damaged","ageRestricted","itemAlreadyOnHold","tooManyHoldsForThisRecord","tooManyReservesToday","tooManyReserves","notReservable","cannotReserveFromOtherBranches","libraryNotFound","libraryNotPickupLocation","cannotBeTransferred"]}
54 is_nullable: 1
56 =head2 error_message
58 data_type: 'varchar'
59 is_nullable: 1
60 size: 100
62 =cut
64 __PACKAGE__->add_columns(
65 "id",
66 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
67 "club_hold_id",
68 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
69 "patron_id",
70 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
71 "hold_id",
72 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
73 "error_code",
75 data_type => "enum",
76 extra => {
77 list => [
78 "damaged",
79 "ageRestricted",
80 "itemAlreadyOnHold",
81 "tooManyHoldsForThisRecord",
82 "tooManyReservesToday",
83 "tooManyReserves",
84 "notReservable",
85 "cannotReserveFromOtherBranches",
86 "libraryNotFound",
87 "libraryNotPickupLocation",
88 "cannotBeTransferred",
91 is_nullable => 1,
93 "error_message",
94 { data_type => "varchar", is_nullable => 1, size => 100 },
97 =head1 PRIMARY KEY
99 =over 4
101 =item * L</id>
103 =back
105 =cut
107 __PACKAGE__->set_primary_key("id");
109 =head1 RELATIONS
111 =head2 club_hold
113 Type: belongs_to
115 Related object: L<Koha::Schema::Result::ClubHold>
117 =cut
119 __PACKAGE__->belongs_to(
120 "club_hold",
121 "Koha::Schema::Result::ClubHold",
122 { id => "club_hold_id" },
123 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
126 =head2 hold
128 Type: belongs_to
130 Related object: L<Koha::Schema::Result::Reserve>
132 =cut
134 __PACKAGE__->belongs_to(
135 "hold",
136 "Koha::Schema::Result::Reserve",
137 { reserve_id => "hold_id" },
139 is_deferrable => 1,
140 join_type => "LEFT",
141 on_delete => "CASCADE",
142 on_update => "CASCADE",
146 =head2 patron
148 Type: belongs_to
150 Related object: L<Koha::Schema::Result::Borrower>
152 =cut
154 __PACKAGE__->belongs_to(
155 "patron",
156 "Koha::Schema::Result::Borrower",
157 { borrowernumber => "patron_id" },
158 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
162 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
163 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/T626DfqUi7SnXOyieUzYw
166 # You can replace this text with custom code or comments, and it will be preserved on regeneration