Bug 14279: Remove CGI::scrolling_list from issues_avg_stats.pl
[koha.git] / Koha / Schema / Result / Virtualshelve.pm
blob5c5b4c343c0bd780a02785671506488f94158715
1 use utf8;
2 package Koha::Schema::Result::Virtualshelve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Virtualshelve
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<virtualshelves>
20 =cut
22 __PACKAGE__->table("virtualshelves");
24 =head1 ACCESSORS
26 =head2 shelfnumber
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 shelfname
34 data_type: 'varchar'
35 is_nullable: 1
36 size: 255
38 =head2 owner
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
44 =head2 category
46 data_type: 'varchar'
47 is_nullable: 1
48 size: 1
50 =head2 sortfield
52 data_type: 'varchar'
53 is_nullable: 1
54 size: 16
56 =head2 lastmodified
58 data_type: 'timestamp'
59 datetime_undef_if_invalid: 1
60 default_value: current_timestamp
61 is_nullable: 0
63 =head2 created_on
65 data_type: 'timestamp'
66 datetime_undef_if_invalid: 1
67 default_value: '0000-00-00 00:00:00'
68 is_nullable: 0
70 =head2 allow_add
72 data_type: 'tinyint'
73 default_value: 0
74 is_nullable: 1
76 =head2 allow_delete_own
78 data_type: 'tinyint'
79 default_value: 1
80 is_nullable: 1
82 =head2 allow_delete_other
84 data_type: 'tinyint'
85 default_value: 0
86 is_nullable: 1
88 =cut
90 __PACKAGE__->add_columns(
91 "shelfnumber",
92 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
93 "shelfname",
94 { data_type => "varchar", is_nullable => 1, size => 255 },
95 "owner",
96 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97 "category",
98 { data_type => "varchar", is_nullable => 1, size => 1 },
99 "sortfield",
100 { data_type => "varchar", is_nullable => 1, size => 16 },
101 "lastmodified",
103 data_type => "timestamp",
104 datetime_undef_if_invalid => 1,
105 default_value => \"current_timestamp",
106 is_nullable => 0,
108 "created_on",
110 data_type => "timestamp",
111 datetime_undef_if_invalid => 1,
112 default_value => "0000-00-00 00:00:00",
113 is_nullable => 0,
115 "allow_add",
116 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
117 "allow_delete_own",
118 { data_type => "tinyint", default_value => 1, is_nullable => 1 },
119 "allow_delete_other",
120 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
123 =head1 PRIMARY KEY
125 =over 4
127 =item * L</shelfnumber>
129 =back
131 =cut
133 __PACKAGE__->set_primary_key("shelfnumber");
135 =head1 RELATIONS
137 =head2 owner
139 Type: belongs_to
141 Related object: L<Koha::Schema::Result::Borrower>
143 =cut
145 __PACKAGE__->belongs_to(
146 "owner",
147 "Koha::Schema::Result::Borrower",
148 { borrowernumber => "owner" },
150 is_deferrable => 1,
151 join_type => "LEFT",
152 on_delete => "SET NULL",
153 on_update => "SET NULL",
157 =head2 virtualshelfcontents
159 Type: has_many
161 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
163 =cut
165 __PACKAGE__->has_many(
166 "virtualshelfcontents",
167 "Koha::Schema::Result::Virtualshelfcontent",
168 { "foreign.shelfnumber" => "self.shelfnumber" },
169 { cascade_copy => 0, cascade_delete => 0 },
172 =head2 virtualshelfshares
174 Type: has_many
176 Related object: L<Koha::Schema::Result::Virtualshelfshare>
178 =cut
180 __PACKAGE__->has_many(
181 "virtualshelfshares",
182 "Koha::Schema::Result::Virtualshelfshare",
183 { "foreign.shelfnumber" => "self.shelfnumber" },
184 { cascade_copy => 0, cascade_delete => 0 },
188 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-05-14 11:27:16
189 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WVMPB7DvigdoNQ07kaT0lA
192 # You can replace this text with custom content, and it will be preserved on regeneration