Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::AccountDebit; |
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::AccountDebit |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<account_debits> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("account_debits"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 debit_id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 borrowernumber |
33 |
|
34 |
data_type: 'integer' |
35 |
default_value: 0 |
36 |
is_foreign_key: 1 |
37 |
is_nullable: 0 |
38 |
|
39 |
=head2 itemnumber |
40 |
|
41 |
data_type: 'integer' |
42 |
is_nullable: 1 |
43 |
|
44 |
=head2 issue_id |
45 |
|
46 |
data_type: 'integer' |
47 |
is_nullable: 1 |
48 |
|
49 |
=head2 type |
50 |
|
51 |
data_type: 'varchar' |
52 |
is_nullable: 0 |
53 |
size: 255 |
54 |
|
55 |
=head2 accruing |
56 |
|
57 |
data_type: 'tinyint' |
58 |
default_value: 0 |
59 |
is_nullable: 0 |
60 |
|
61 |
=head2 amount_original |
62 |
|
63 |
data_type: 'decimal' |
64 |
is_nullable: 1 |
65 |
size: [28,6] |
66 |
|
67 |
=head2 amount_outstanding |
68 |
|
69 |
data_type: 'decimal' |
70 |
is_nullable: 1 |
71 |
size: [28,6] |
72 |
|
73 |
=head2 amount_last_increment |
74 |
|
75 |
data_type: 'decimal' |
76 |
is_nullable: 1 |
77 |
size: [28,6] |
78 |
|
79 |
=head2 description |
80 |
|
81 |
data_type: 'mediumtext' |
82 |
is_nullable: 1 |
83 |
|
84 |
=head2 notes |
85 |
|
86 |
data_type: 'text' |
87 |
is_nullable: 1 |
88 |
|
89 |
=head2 branchcode |
90 |
|
91 |
data_type: 'varchar' |
92 |
is_foreign_key: 1 |
93 |
is_nullable: 1 |
94 |
size: 10 |
95 |
|
96 |
=head2 manager_id |
97 |
|
98 |
data_type: 'integer' |
99 |
is_nullable: 1 |
100 |
|
101 |
=head2 created_on |
102 |
|
103 |
data_type: 'timestamp' |
104 |
datetime_undef_if_invalid: 1 |
105 |
is_nullable: 1 |
106 |
|
107 |
=head2 updated_on |
108 |
|
109 |
data_type: 'timestamp' |
110 |
datetime_undef_if_invalid: 1 |
111 |
is_nullable: 1 |
112 |
|
113 |
=cut |
114 |
|
115 |
__PACKAGE__->add_columns( |
116 |
"debit_id", |
117 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
118 |
"borrowernumber", |
119 |
{ |
120 |
data_type => "integer", |
121 |
default_value => 0, |
122 |
is_foreign_key => 1, |
123 |
is_nullable => 0, |
124 |
}, |
125 |
"itemnumber", |
126 |
{ data_type => "integer", is_nullable => 1 }, |
127 |
"issue_id", |
128 |
{ data_type => "integer", is_nullable => 1 }, |
129 |
"type", |
130 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
131 |
"accruing", |
132 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
133 |
"amount_original", |
134 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
135 |
"amount_outstanding", |
136 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
137 |
"amount_last_increment", |
138 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
139 |
"description", |
140 |
{ data_type => "mediumtext", is_nullable => 1 }, |
141 |
"notes", |
142 |
{ data_type => "text", is_nullable => 1 }, |
143 |
"branchcode", |
144 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
145 |
"manager_id", |
146 |
{ data_type => "integer", is_nullable => 1 }, |
147 |
"created_on", |
148 |
{ |
149 |
data_type => "timestamp", |
150 |
datetime_undef_if_invalid => 1, |
151 |
is_nullable => 1, |
152 |
}, |
153 |
"updated_on", |
154 |
{ |
155 |
data_type => "timestamp", |
156 |
datetime_undef_if_invalid => 1, |
157 |
is_nullable => 1, |
158 |
}, |
159 |
); |
160 |
|
161 |
=head1 PRIMARY KEY |
162 |
|
163 |
=over 4 |
164 |
|
165 |
=item * L</debit_id> |
166 |
|
167 |
=back |
168 |
|
169 |
=cut |
170 |
|
171 |
__PACKAGE__->set_primary_key("debit_id"); |
172 |
|
173 |
=head1 RELATIONS |
174 |
|
175 |
=head2 account_offsets |
176 |
|
177 |
Type: has_many |
178 |
|
179 |
Related object: L<Koha::Schema::Result::AccountOffset> |
180 |
|
181 |
=cut |
182 |
|
183 |
__PACKAGE__->has_many( |
184 |
"account_offsets", |
185 |
"Koha::Schema::Result::AccountOffset", |
186 |
{ "foreign.debit_id" => "self.debit_id" }, |
187 |
{ cascade_copy => 0, cascade_delete => 0 }, |
188 |
); |
189 |
|
190 |
=head2 borrowernumber |
191 |
|
192 |
Type: belongs_to |
193 |
|
194 |
Related object: L<Koha::Schema::Result::Borrower> |
195 |
|
196 |
=cut |
197 |
|
198 |
__PACKAGE__->belongs_to( |
199 |
"borrowernumber", |
200 |
"Koha::Schema::Result::Borrower", |
201 |
{ borrowernumber => "borrowernumber" }, |
202 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
203 |
); |
204 |
|
205 |
=head2 branchcode |
206 |
|
207 |
Type: belongs_to |
208 |
|
209 |
Related object: L<Koha::Schema::Result::Branch> |
210 |
|
211 |
=cut |
212 |
|
213 |
__PACKAGE__->belongs_to( |
214 |
"branchcode", |
215 |
"Koha::Schema::Result::Branch", |
216 |
{ branchcode => "branchcode" }, |
217 |
{ |
218 |
is_deferrable => 1, |
219 |
join_type => "LEFT", |
220 |
on_delete => "CASCADE", |
221 |
on_update => "CASCADE", |
222 |
}, |
223 |
); |
224 |
|
225 |
|
226 |
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:03:44 |
227 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ns19xWix5RriwDPelPnhfw |
228 |
|
229 |
__PACKAGE__->belongs_to( |
230 |
"item", |
231 |
"Koha::Schema::Result::Item", |
232 |
{ itemnumber => "itemnumber" } |
233 |
); |
234 |
|
235 |
__PACKAGE__->belongs_to( |
236 |
"deleted_item", |
237 |
"Koha::Schema::Result::Deleteditem", |
238 |
{ itemnumber => "itemnumber" } |
239 |
); |
240 |
|
241 |
__PACKAGE__->belongs_to( |
242 |
"issue", |
243 |
"Koha::Schema::Result::Issue", |
244 |
{ issue_id => "issue_id" } |
245 |
); |
246 |
|
247 |
__PACKAGE__->belongs_to( |
248 |
"old_issue", |
249 |
"Koha::Schema::Result::OldIssue", |
250 |
{ issue_id => "issue_id" } |
251 |
); |
252 |
|
253 |
__PACKAGE__->belongs_to( |
254 |
"borrower", |
255 |
"Koha::Schema::Result::Borrower", |
256 |
{ borrowernumber => "borrowernumber" }, |
257 |
{ on_delete => "CASCADE", on_update => "CASCADE" }, |
258 |
); |
259 |
|
260 |
# You can replace this text with custom content, and it will be preserved on regeneration |
261 |
1; |