Bug 19618: DBRev 19.06.00.030
[koha.git] / Koha / Schema / Result / ClubHold.pm
blob8287c72eecdfd584f574cb36878d767ec51b5166
1 use utf8;
2 package Koha::Schema::Result::ClubHold;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ClubHold
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<club_holds>
20 =cut
22 __PACKAGE__->table("club_holds");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 club_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 biblio_id
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 item_id
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
50 =head2 date_created
52 data_type: 'timestamp'
53 datetime_undef_if_invalid: 1
54 default_value: current_timestamp
55 is_nullable: 0
57 =cut
59 __PACKAGE__->add_columns(
60 "id",
61 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
62 "club_id",
63 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
64 "biblio_id",
65 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
66 "item_id",
67 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
68 "date_created",
70 data_type => "timestamp",
71 datetime_undef_if_invalid => 1,
72 default_value => \"current_timestamp",
73 is_nullable => 0,
77 =head1 PRIMARY KEY
79 =over 4
81 =item * L</id>
83 =back
85 =cut
87 __PACKAGE__->set_primary_key("id");
89 =head1 RELATIONS
91 =head2 biblio
93 Type: belongs_to
95 Related object: L<Koha::Schema::Result::Biblio>
97 =cut
99 __PACKAGE__->belongs_to(
100 "biblio",
101 "Koha::Schema::Result::Biblio",
102 { biblionumber => "biblio_id" },
103 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106 =head2 club
108 Type: belongs_to
110 Related object: L<Koha::Schema::Result::Club>
112 =cut
114 __PACKAGE__->belongs_to(
115 "club",
116 "Koha::Schema::Result::Club",
117 { id => "club_id" },
118 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
121 =head2 club_holds_to_patron_holds
123 Type: has_many
125 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
127 =cut
129 __PACKAGE__->has_many(
130 "club_holds_to_patron_holds",
131 "Koha::Schema::Result::ClubHoldsToPatronHold",
132 { "foreign.club_hold_id" => "self.id" },
133 { cascade_copy => 0, cascade_delete => 0 },
136 =head2 item
138 Type: belongs_to
140 Related object: L<Koha::Schema::Result::Item>
142 =cut
144 __PACKAGE__->belongs_to(
145 "item",
146 "Koha::Schema::Result::Item",
147 { itemnumber => "item_id" },
149 is_deferrable => 1,
150 join_type => "LEFT",
151 on_delete => "CASCADE",
152 on_update => "CASCADE",
157 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
158 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FYGXVx1P2R+dGbeP1xshPA
161 # You can replace this text with custom code or comments, and it will be preserved on regeneration