Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / ClubHold.pm
1 use utf8;
2 package Koha::Schema::Result::ClubHold;
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::ClubHold
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<club_holds>
19
20 =cut
21
22 __PACKAGE__->table("club_holds");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 club_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 id for the club the hold was generated for
39
40 =head2 biblio_id
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 0
45
46 id for the bibliographic record the hold has been placed against
47
48 =head2 item_id
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 1
53
54 If item-level, the id for the item the hold has been placed agains
55
56 =head2 date_created
57
58   data_type: 'timestamp'
59   datetime_undef_if_invalid: 1
60   default_value: current_timestamp
61   is_nullable: 0
62
63 Timestamp for the placed hold
64
65 =cut
66
67 __PACKAGE__->add_columns(
68   "id",
69   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70   "club_id",
71   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
72   "biblio_id",
73   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
74   "item_id",
75   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
76   "date_created",
77   {
78     data_type => "timestamp",
79     datetime_undef_if_invalid => 1,
80     default_value => \"current_timestamp",
81     is_nullable => 0,
82   },
83 );
84
85 =head1 PRIMARY KEY
86
87 =over 4
88
89 =item * L</id>
90
91 =back
92
93 =cut
94
95 __PACKAGE__->set_primary_key("id");
96
97 =head1 RELATIONS
98
99 =head2 biblio
100
101 Type: belongs_to
102
103 Related object: L<Koha::Schema::Result::Biblio>
104
105 =cut
106
107 __PACKAGE__->belongs_to(
108   "biblio",
109   "Koha::Schema::Result::Biblio",
110   { biblionumber => "biblio_id" },
111   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
112 );
113
114 =head2 club
115
116 Type: belongs_to
117
118 Related object: L<Koha::Schema::Result::Club>
119
120 =cut
121
122 __PACKAGE__->belongs_to(
123   "club",
124   "Koha::Schema::Result::Club",
125   { id => "club_id" },
126   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
127 );
128
129 =head2 club_holds_to_patron_holds
130
131 Type: has_many
132
133 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
134
135 =cut
136
137 __PACKAGE__->has_many(
138   "club_holds_to_patron_holds",
139   "Koha::Schema::Result::ClubHoldsToPatronHold",
140   { "foreign.club_hold_id" => "self.id" },
141   { cascade_copy => 0, cascade_delete => 0 },
142 );
143
144 =head2 item
145
146 Type: belongs_to
147
148 Related object: L<Koha::Schema::Result::Item>
149
150 =cut
151
152 __PACKAGE__->belongs_to(
153   "item",
154   "Koha::Schema::Result::Item",
155   { itemnumber => "item_id" },
156   {
157     is_deferrable => 1,
158     join_type     => "LEFT",
159     on_delete     => "CASCADE",
160     on_update     => "CASCADE",
161   },
162 );
163
164
165 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
166 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dGkIYbw9CX0LqiH8XmuGAQ
167
168 sub koha_objects_class {
169     'Koha::Club::Holds';
170 }
171 sub koha_object_class {
172     'Koha::Club::Hold';
173 }
174 1;