Bug 25501: Supress warnings on installing translation
[koha.git] / Koha / Schema / Result / Virtualshelve.pm
blob83334f8ac4d3928b8c2c81b233a620868c3f5249
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 default_value: 'title'
54 is_nullable: 1
55 size: 16
57 =head2 lastmodified
59 data_type: 'timestamp'
60 datetime_undef_if_invalid: 1
61 default_value: current_timestamp
62 is_nullable: 0
64 =head2 created_on
66 data_type: 'datetime'
67 datetime_undef_if_invalid: 1
68 is_nullable: 0
70 =head2 allow_change_from_owner
72 data_type: 'tinyint'
73 default_value: 1
74 is_nullable: 1
76 =head2 allow_change_from_others
78 data_type: 'tinyint'
79 default_value: 0
80 is_nullable: 1
82 =cut
84 __PACKAGE__->add_columns(
85 "shelfnumber",
86 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
87 "shelfname",
88 { data_type => "varchar", is_nullable => 1, size => 255 },
89 "owner",
90 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
91 "category",
92 { data_type => "varchar", is_nullable => 1, size => 1 },
93 "sortfield",
95 data_type => "varchar",
96 default_value => "title",
97 is_nullable => 1,
98 size => 16,
100 "lastmodified",
102 data_type => "timestamp",
103 datetime_undef_if_invalid => 1,
104 default_value => \"current_timestamp",
105 is_nullable => 0,
107 "created_on",
109 data_type => "datetime",
110 datetime_undef_if_invalid => 1,
111 is_nullable => 0,
113 "allow_change_from_owner",
114 { data_type => "tinyint", default_value => 1, is_nullable => 1 },
115 "allow_change_from_others",
116 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
119 =head1 PRIMARY KEY
121 =over 4
123 =item * L</shelfnumber>
125 =back
127 =cut
129 __PACKAGE__->set_primary_key("shelfnumber");
131 =head1 RELATIONS
133 =head2 owner
135 Type: belongs_to
137 Related object: L<Koha::Schema::Result::Borrower>
139 =cut
141 __PACKAGE__->belongs_to(
142 "owner",
143 "Koha::Schema::Result::Borrower",
144 { borrowernumber => "owner" },
146 is_deferrable => 1,
147 join_type => "LEFT",
148 on_delete => "SET NULL",
149 on_update => "SET NULL",
153 =head2 virtualshelfcontents
155 Type: has_many
157 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
159 =cut
161 __PACKAGE__->has_many(
162 "virtualshelfcontents",
163 "Koha::Schema::Result::Virtualshelfcontent",
164 { "foreign.shelfnumber" => "self.shelfnumber" },
165 { cascade_copy => 0, cascade_delete => 0 },
168 =head2 virtualshelfshares
170 Type: has_many
172 Related object: L<Koha::Schema::Result::Virtualshelfshare>
174 =cut
176 __PACKAGE__->has_many(
177 "virtualshelfshares",
178 "Koha::Schema::Result::Virtualshelfshare",
179 { "foreign.shelfnumber" => "self.shelfnumber" },
180 { cascade_copy => 0, cascade_delete => 0 },
184 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-08 14:19:17
185 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xoq0lhLouCbkAp6F4ZyMGQ
187 sub koha_object_class {
188 'Koha::Virtualshelf';
190 sub koha_objects_class {
191 'Koha::Virtualshelves';