Bug 18936: (follow-up) Add cloning of circulation rules back to Koha
[koha.git] / Koha / Schema / Result / Virtualshelfcontent.pm
bloba8ad19d4b0e55886546c9f9e7373c3de799660f2
1 use utf8;
2 package Koha::Schema::Result::Virtualshelfcontent;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Virtualshelfcontent
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<virtualshelfcontents>
20 =cut
22 __PACKAGE__->table("virtualshelfcontents");
24 =head1 ACCESSORS
26 =head2 shelfnumber
28 data_type: 'integer'
29 default_value: 0
30 is_foreign_key: 1
31 is_nullable: 0
33 =head2 biblionumber
35 data_type: 'integer'
36 default_value: 0
37 is_foreign_key: 1
38 is_nullable: 0
40 =head2 flags
42 data_type: 'integer'
43 is_nullable: 1
45 =head2 dateadded
47 data_type: 'timestamp'
48 datetime_undef_if_invalid: 1
49 default_value: current_timestamp
50 is_nullable: 0
52 =head2 borrowernumber
54 data_type: 'integer'
55 is_foreign_key: 1
56 is_nullable: 1
58 =cut
60 __PACKAGE__->add_columns(
61 "shelfnumber",
63 data_type => "integer",
64 default_value => 0,
65 is_foreign_key => 1,
66 is_nullable => 0,
68 "biblionumber",
70 data_type => "integer",
71 default_value => 0,
72 is_foreign_key => 1,
73 is_nullable => 0,
75 "flags",
76 { data_type => "integer", is_nullable => 1 },
77 "dateadded",
79 data_type => "timestamp",
80 datetime_undef_if_invalid => 1,
81 default_value => \"current_timestamp",
82 is_nullable => 0,
84 "borrowernumber",
85 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
88 =head1 RELATIONS
90 =head2 biblionumber
92 Type: belongs_to
94 Related object: L<Koha::Schema::Result::Biblio>
96 =cut
98 __PACKAGE__->belongs_to(
99 "biblionumber",
100 "Koha::Schema::Result::Biblio",
101 { biblionumber => "biblionumber" },
102 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
105 =head2 borrowernumber
107 Type: belongs_to
109 Related object: L<Koha::Schema::Result::Borrower>
111 =cut
113 __PACKAGE__->belongs_to(
114 "borrowernumber",
115 "Koha::Schema::Result::Borrower",
116 { borrowernumber => "borrowernumber" },
118 is_deferrable => 1,
119 join_type => "LEFT",
120 on_delete => "SET NULL",
121 on_update => "SET NULL",
125 =head2 shelfnumber
127 Type: belongs_to
129 Related object: L<Koha::Schema::Result::Virtualshelve>
131 =cut
133 __PACKAGE__->belongs_to(
134 "shelfnumber",
135 "Koha::Schema::Result::Virtualshelve",
136 { shelfnumber => "shelfnumber" },
137 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
141 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
142 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ie3Gx+/HthZQ/4fHjcPF0w
144 #TODO See BZ 14544: Should be resolved by db revision
145 __PACKAGE__->set_primary_key("shelfnumber","biblionumber");
147 # You can replace this text with custom content, and it will be preserved on regeneration