Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::ProblemReport; |
3 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
7 |
=head1 NAME |
8 |
|
9 |
Koha::Schema::Result::ProblemReport |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<problem_reports> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("problem_reports"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 reportid |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 title |
33 |
|
34 |
data_type: 'varchar' |
35 |
default_value: (empty string) |
36 |
is_nullable: 0 |
37 |
size: 40 |
38 |
|
39 |
=head2 content |
40 |
|
41 |
data_type: 'varchar' |
42 |
default_value: (empty string) |
43 |
is_nullable: 0 |
44 |
size: 255 |
45 |
|
46 |
=head2 borrowernumber |
47 |
|
48 |
data_type: 'integer' |
49 |
is_foreign_key: 1 |
50 |
is_nullable: 1 |
51 |
|
52 |
=head2 branchcode |
53 |
|
54 |
data_type: 'varchar' |
55 |
default_value: (empty string) |
56 |
is_foreign_key: 1 |
57 |
is_nullable: 0 |
58 |
size: 10 |
59 |
|
60 |
=head2 username |
61 |
|
62 |
data_type: 'varchar' |
63 |
is_nullable: 1 |
64 |
size: 75 |
65 |
|
66 |
=head2 problempage |
67 |
|
68 |
data_type: 'varchar' |
69 |
is_nullable: 1 |
70 |
size: 255 |
71 |
|
72 |
=head2 recipient |
73 |
|
74 |
data_type: 'enum' |
75 |
default_value: 'library' |
76 |
extra: {list => ["admin","library"]} |
77 |
is_nullable: 0 |
78 |
|
79 |
=head2 created_on |
80 |
|
81 |
data_type: 'timestamp' |
82 |
datetime_undef_if_invalid: 1 |
83 |
default_value: current_timestamp |
84 |
is_nullable: 0 |
85 |
|
86 |
=head2 status |
87 |
|
88 |
data_type: 'varchar' |
89 |
default_value: 'N' |
90 |
is_nullable: 0 |
91 |
size: 1 |
92 |
|
93 |
=cut |
94 |
|
95 |
__PACKAGE__->add_columns( |
96 |
"reportid", |
97 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
98 |
"title", |
99 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 40 }, |
100 |
"content", |
101 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
102 |
"borrowernumber", |
103 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
104 |
"branchcode", |
105 |
{ |
106 |
data_type => "varchar", |
107 |
default_value => "", |
108 |
is_foreign_key => 1, |
109 |
is_nullable => 0, |
110 |
size => 10, |
111 |
}, |
112 |
"username", |
113 |
{ data_type => "varchar", is_nullable => 1, size => 75 }, |
114 |
"problempage", |
115 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
116 |
"recipient", |
117 |
{ |
118 |
data_type => "enum", |
119 |
default_value => "library", |
120 |
extra => { list => ["admin", "library"] }, |
121 |
is_nullable => 0, |
122 |
}, |
123 |
"created_on", |
124 |
{ |
125 |
data_type => "timestamp", |
126 |
datetime_undef_if_invalid => 1, |
127 |
default_value => \"current_timestamp", |
128 |
is_nullable => 0, |
129 |
}, |
130 |
"status", |
131 |
{ data_type => "varchar", default_value => "N", is_nullable => 0, size => 1 }, |
132 |
); |
133 |
|
134 |
=head1 PRIMARY KEY |
135 |
|
136 |
=over 4 |
137 |
|
138 |
=item * L</reportid> |
139 |
|
140 |
=back |
141 |
|
142 |
=cut |
143 |
|
144 |
__PACKAGE__->set_primary_key("reportid"); |
145 |
|
146 |
=head1 RELATIONS |
147 |
|
148 |
=head2 borrowernumber |
149 |
|
150 |
Type: belongs_to |
151 |
|
152 |
Related object: L<Koha::Schema::Result::Borrower> |
153 |
|
154 |
=cut |
155 |
|
156 |
__PACKAGE__->belongs_to( |
157 |
"borrowernumber", |
158 |
"Koha::Schema::Result::Borrower", |
159 |
{ borrowernumber => "borrowernumber" }, |
160 |
{ |
161 |
is_deferrable => 1, |
162 |
join_type => "LEFT", |
163 |
on_delete => "CASCADE", |
164 |
on_update => "CASCADE", |
165 |
}, |
166 |
); |
167 |
|
168 |
=head2 branchcode |
169 |
|
170 |
Type: belongs_to |
171 |
|
172 |
Related object: L<Koha::Schema::Result::Branch> |
173 |
|
174 |
=cut |
175 |
|
176 |
__PACKAGE__->belongs_to( |
177 |
"branchcode", |
178 |
"Koha::Schema::Result::Branch", |
179 |
{ branchcode => "branchcode" }, |
180 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
181 |
); |
182 |
|
183 |
|
184 |
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-11 08:28:15 |
185 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qVNVIuurFD6Q6p4YA5Kptg |
186 |
|
187 |
|
188 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
189 |
1; |