2 package Koha::Schema::Result::Virtualshelve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Virtualshelve
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<virtualshelves>
22 __PACKAGE__->table("virtualshelves");
32 unique identifier assigned by Koha
48 foreign key linking to the borrowers table (using borrowernumber) for the creator of this list (changed from varchar(80) to int)
61 default_value: 'title'
65 the field this list is sorted on
69 data_type: 'timestamp'
70 datetime_undef_if_invalid: 1
71 default_value: current_timestamp
74 date and time the list was last modified
79 datetime_undef_if_invalid: 1
84 =head2 allow_change_from_owner
90 can owner change contents?
92 =head2 allow_change_from_others
98 can others change contents?
100 =head2 allow_change_from_staff
106 can staff change contents?
110 __PACKAGE__->add_columns(
112 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
114 { data_type => "varchar", is_nullable => 1, size => 255 },
116 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
118 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
121 data_type => "varchar",
122 default_value => "title",
128 data_type => "timestamp",
129 datetime_undef_if_invalid => 1,
130 default_value => \"current_timestamp",
135 data_type => "datetime",
136 datetime_undef_if_invalid => 1,
139 "allow_change_from_owner",
140 { data_type => "tinyint", default_value => 1, is_nullable => 1 },
141 "allow_change_from_others",
142 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
143 "allow_change_from_staff",
144 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
151 =item * L</shelfnumber>
157 __PACKAGE__->set_primary_key("shelfnumber");
165 Related object: L<Koha::Schema::Result::Borrower>
169 __PACKAGE__->belongs_to(
171 "Koha::Schema::Result::Borrower",
172 { borrowernumber => "owner" },
176 on_delete => "SET NULL",
177 on_update => "SET NULL",
181 =head2 virtualshelfcontents
185 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
189 __PACKAGE__->has_many(
190 "virtualshelfcontents",
191 "Koha::Schema::Result::Virtualshelfcontent",
192 { "foreign.shelfnumber" => "self.shelfnumber" },
193 { cascade_copy => 0, cascade_delete => 0 },
196 =head2 virtualshelfshares
200 Related object: L<Koha::Schema::Result::Virtualshelfshare>
204 __PACKAGE__->has_many(
205 "virtualshelfshares",
206 "Koha::Schema::Result::Virtualshelfshare",
207 { "foreign.shelfnumber" => "self.shelfnumber" },
208 { cascade_copy => 0, cascade_delete => 0 },
212 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-12 10:03:27
213 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dzF83u6fWMs2YRrG2yBD8w
215 sub koha_object_class {
216 'Koha::Virtualshelf';
218 sub koha_objects_class {
219 'Koha::Virtualshelves';
222 __PACKAGE__->add_columns(
223 '+public' => { is_boolean => 1 },
226 __PACKAGE__->add_columns(
227 '+allow_change_from_staff' => { is_boolean => 1 },
230 # You can replace this text with custom code or comments, and it will be preserved on regeneration