View | Details | Raw Unified | Return to bug 29002
Collapse All | Expand All

(-)a/Koha/Schema/Result/Biblio.pm (+15 lines)
Lines 255-260 __PACKAGE__->has_many( Link Here
255
  { cascade_copy => 0, cascade_delete => 0 },
255
  { cascade_copy => 0, cascade_delete => 0 },
256
);
256
);
257
257
258
=head2 bookings
259
260
Type: has_many
261
262
Related object: L<Koha::Schema::Result::Booking>
263
264
=cut
265
266
__PACKAGE__->has_many(
267
  "bookings",
268
  "Koha::Schema::Result::Booking",
269
  { "foreign.biblionumber" => "self.biblionumber" },
270
  { cascade_copy => 0, cascade_delete => 0 },
271
);
272
258
=head2 club_holds
273
=head2 club_holds
259
274
260
Type: has_many
275
Type: has_many
(-)a/Koha/Schema/Result/Booking.pm (+181 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Booking;
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::Booking
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<bookings>
19
20
=cut
21
22
__PACKAGE__->table("bookings");
23
24
=head1 ACCESSORS
25
26
=head2 booking_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
primary key
33
34
=head2 borrowernumber
35
36
  data_type: 'integer'
37
  default_value: 0
38
  is_foreign_key: 1
39
  is_nullable: 0
40
41
foreign key from the borrowers table defining which patron this booking is for
42
43
=head2 biblionumber
44
45
  data_type: 'integer'
46
  default_value: 0
47
  is_foreign_key: 1
48
  is_nullable: 0
49
50
foreign key from the biblio table defining which bib record this booking is on
51
52
=head2 itemnumber
53
54
  data_type: 'integer'
55
  is_foreign_key: 1
56
  is_nullable: 1
57
58
foreign key from the items table defining the specific item the patron has placed a booking for
59
60
=head2 start_date
61
62
  data_type: 'datetime'
63
  datetime_undef_if_invalid: 1
64
  is_nullable: 1
65
66
the start date of the booking
67
68
=head2 end_date
69
70
  data_type: 'datetime'
71
  datetime_undef_if_invalid: 1
72
  is_nullable: 1
73
74
the end date of the booking
75
76
=cut
77
78
__PACKAGE__->add_columns(
79
  "booking_id",
80
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
81
  "borrowernumber",
82
  {
83
    data_type      => "integer",
84
    default_value  => 0,
85
    is_foreign_key => 1,
86
    is_nullable    => 0,
87
  },
88
  "biblionumber",
89
  {
90
    data_type      => "integer",
91
    default_value  => 0,
92
    is_foreign_key => 1,
93
    is_nullable    => 0,
94
  },
95
  "itemnumber",
96
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  "start_date",
98
  {
99
    data_type => "datetime",
100
    datetime_undef_if_invalid => 1,
101
    is_nullable => 1,
102
  },
103
  "end_date",
104
  {
105
    data_type => "datetime",
106
    datetime_undef_if_invalid => 1,
107
    is_nullable => 1,
108
  },
109
);
110
111
=head1 PRIMARY KEY
112
113
=over 4
114
115
=item * L</booking_id>
116
117
=back
118
119
=cut
120
121
__PACKAGE__->set_primary_key("booking_id");
122
123
=head1 RELATIONS
124
125
=head2 biblionumber
126
127
Type: belongs_to
128
129
Related object: L<Koha::Schema::Result::Biblio>
130
131
=cut
132
133
__PACKAGE__->belongs_to(
134
  "biblionumber",
135
  "Koha::Schema::Result::Biblio",
136
  { biblionumber => "biblionumber" },
137
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
138
);
139
140
=head2 borrowernumber
141
142
Type: belongs_to
143
144
Related object: L<Koha::Schema::Result::Borrower>
145
146
=cut
147
148
__PACKAGE__->belongs_to(
149
  "borrowernumber",
150
  "Koha::Schema::Result::Borrower",
151
  { borrowernumber => "borrowernumber" },
152
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
153
);
154
155
=head2 itemnumber
156
157
Type: belongs_to
158
159
Related object: L<Koha::Schema::Result::Item>
160
161
=cut
162
163
__PACKAGE__->belongs_to(
164
  "itemnumber",
165
  "Koha::Schema::Result::Item",
166
  { itemnumber => "itemnumber" },
167
  {
168
    is_deferrable => 1,
169
    join_type     => "LEFT",
170
    on_delete     => "CASCADE",
171
    on_update     => "CASCADE",
172
  },
173
);
174
175
176
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-15 15:26:37
177
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1M7/k3YWVzO2kH517vNNtg
178
179
180
# You can replace this text with custom code or comments, and it will be preserved on regeneration
181
1;
(-)a/Koha/Schema/Result/Borrower.pm (-2 / +17 lines)
Lines 1004-1009 __PACKAGE__->has_many( Link Here
1004
  { cascade_copy => 0, cascade_delete => 0 },
1004
  { cascade_copy => 0, cascade_delete => 0 },
1005
);
1005
);
1006
1006
1007
=head2 bookings
1008
1009
Type: has_many
1010
1011
Related object: L<Koha::Schema::Result::Booking>
1012
1013
=cut
1014
1015
__PACKAGE__->has_many(
1016
  "bookings",
1017
  "Koha::Schema::Result::Booking",
1018
  { "foreign.borrowernumber" => "self.borrowernumber" },
1019
  { cascade_copy => 0, cascade_delete => 0 },
1020
);
1021
1007
=head2 borrower_attributes
1022
=head2 borrower_attributes
1008
1023
1009
Type: has_many
1024
Type: has_many
Lines 1905-1912 Composing rels: L</aqorder_users> -> ordernumber Link Here
1905
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1920
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1906
1921
1907
1922
1908
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-20 12:00:15
1923
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-15 15:26:37
1909
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9g9WsdsdPINi2NP4H2A+CA
1924
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gT3Z4IHnObg8sCkBk5yrMA
1910
1925
1911
__PACKAGE__->add_columns(
1926
__PACKAGE__->add_columns(
1912
    '+anonymized'    => { is_boolean => 1 },
1927
    '+anonymized'    => { is_boolean => 1 },
(-)a/Koha/Schema/Result/Item.pm (-3 / +17 lines)
Lines 584-589 __PACKAGE__->belongs_to( Link Here
584
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
584
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
585
);
585
);
586
586
587
=head2 bookings
588
589
Type: has_many
590
591
Related object: L<Koha::Schema::Result::Booking>
592
593
=cut
594
595
__PACKAGE__->has_many(
596
  "bookings",
597
  "Koha::Schema::Result::Booking",
598
  { "foreign.itemnumber" => "self.itemnumber" },
599
  { cascade_copy => 0, cascade_delete => 0 },
600
);
601
587
=head2 branchtransfers
602
=head2 branchtransfers
588
603
589
Type: has_many
604
Type: has_many
Lines 865-872 __PACKAGE__->has_many( Link Here
865
);
880
);
866
881
867
882
868
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-27 08:42:21
883
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-15 15:26:37
869
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SjZn3haOtUZWu1jrMigjNQ
884
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Y2jtctgzsfhwCbaHjHXkw
870
885
871
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
886
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
872
887
873
- 

Return to bug 29002