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_nullable: 0 |
37 |
|
38 |
=head2 itemnumber |
39 |
|
40 |
data_type: 'integer' |
41 |
is_nullable: 1 |
42 |
|
43 |
=head2 issue_id |
44 |
|
45 |
data_type: 'integer' |
46 |
is_nullable: 1 |
47 |
|
48 |
=head2 type |
49 |
|
50 |
data_type: 'varchar' |
51 |
is_nullable: 0 |
52 |
size: 255 |
53 |
|
54 |
=head2 accruing |
55 |
|
56 |
data_type: 'tinyint' |
57 |
default_value: 0 |
58 |
is_nullable: 0 |
59 |
|
60 |
=head2 amount_original |
61 |
|
62 |
data_type: 'decimal' |
63 |
is_nullable: 1 |
64 |
size: [28,6] |
65 |
|
66 |
=head2 amount_outstanding |
67 |
|
68 |
data_type: 'decimal' |
69 |
is_nullable: 1 |
70 |
size: [28,6] |
71 |
|
72 |
=head2 amount_last_increment |
73 |
|
74 |
data_type: 'decimal' |
75 |
is_nullable: 1 |
76 |
size: [28,6] |
77 |
|
78 |
=head2 description |
79 |
|
80 |
data_type: 'mediumtext' |
81 |
is_nullable: 1 |
82 |
|
83 |
=head2 notes |
84 |
|
85 |
data_type: 'text' |
86 |
is_nullable: 1 |
87 |
|
88 |
=head2 branchcode |
89 |
|
90 |
data_type: 'varchar' |
91 |
is_nullable: 1 |
92 |
size: 10 |
93 |
|
94 |
=head2 manager_id |
95 |
|
96 |
data_type: 'integer' |
97 |
is_nullable: 1 |
98 |
|
99 |
=head2 created_on |
100 |
|
101 |
data_type: 'timestamp' |
102 |
datetime_undef_if_invalid: 1 |
103 |
is_nullable: 1 |
104 |
|
105 |
=head2 updated_on |
106 |
|
107 |
data_type: 'timestamp' |
108 |
datetime_undef_if_invalid: 1 |
109 |
is_nullable: 1 |
110 |
|
111 |
=cut |
112 |
|
113 |
__PACKAGE__->add_columns( |
114 |
"debit_id", |
115 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
116 |
"borrowernumber", |
117 |
{ data_type => "integer", default_value => 0, is_nullable => 0 }, |
118 |
"itemnumber", |
119 |
{ data_type => "integer", is_nullable => 1 }, |
120 |
"issue_id", |
121 |
{ data_type => "integer", is_nullable => 1 }, |
122 |
"type", |
123 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
124 |
"accruing", |
125 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
126 |
"amount_original", |
127 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
128 |
"amount_outstanding", |
129 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
130 |
"amount_last_increment", |
131 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
132 |
"description", |
133 |
{ data_type => "mediumtext", is_nullable => 1 }, |
134 |
"notes", |
135 |
{ data_type => "text", is_nullable => 1 }, |
136 |
"branchcode", |
137 |
{ data_type => "varchar", is_nullable => 1, size => 10 }, |
138 |
"manager_id", |
139 |
{ data_type => "integer", is_nullable => 1 }, |
140 |
"created_on", |
141 |
{ |
142 |
data_type => "timestamp", |
143 |
datetime_undef_if_invalid => 1, |
144 |
is_nullable => 1, |
145 |
}, |
146 |
"updated_on", |
147 |
{ |
148 |
data_type => "timestamp", |
149 |
datetime_undef_if_invalid => 1, |
150 |
is_nullable => 1, |
151 |
}, |
152 |
); |
153 |
|
154 |
=head1 PRIMARY KEY |
155 |
|
156 |
=over 4 |
157 |
|
158 |
=item * L</debit_id> |
159 |
|
160 |
=back |
161 |
|
162 |
=cut |
163 |
|
164 |
__PACKAGE__->set_primary_key("debit_id"); |
165 |
|
166 |
=head1 RELATIONS |
167 |
|
168 |
=head2 account_offsets |
169 |
|
170 |
Type: has_many |
171 |
|
172 |
Related object: L<Koha::Schema::Result::AccountOffset> |
173 |
|
174 |
=cut |
175 |
|
176 |
__PACKAGE__->has_many( |
177 |
"account_offsets", |
178 |
"Koha::Schema::Result::AccountOffset", |
179 |
{ "foreign.debit_id" => "self.debit_id" }, |
180 |
{ cascade_copy => 0, cascade_delete => 0 }, |
181 |
); |
182 |
|
183 |
|
184 |
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-01-14 08:52:49 |
185 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M6yz+EMdQ1c79RewRIXX1g |
186 |
|
187 |
__PACKAGE__->belongs_to( |
188 |
"item", |
189 |
"Koha::Schema::Result::Item", |
190 |
{ itemnumber => "itemnumber" } |
191 |
); |
192 |
|
193 |
__PACKAGE__->belongs_to( |
194 |
"deleted_item", |
195 |
"Koha::Schema::Result::Deleteditem", |
196 |
{ itemnumber => "itemnumber" } |
197 |
); |
198 |
|
199 |
__PACKAGE__->belongs_to( |
200 |
"issue", |
201 |
"Koha::Schema::Result::Issue", |
202 |
{ issue_id => "issue_id" } |
203 |
); |
204 |
|
205 |
__PACKAGE__->belongs_to( |
206 |
"old_issue", |
207 |
"Koha::Schema::Result::OldIssue", |
208 |
{ issue_id => "issue_id" } |
209 |
); |
210 |
|
211 |
__PACKAGE__->belongs_to( |
212 |
"borrower", |
213 |
"Koha::Schema::Result::Borrower", |
214 |
{ borrowernumber => "borrowernumber" }, |
215 |
{ on_delete => "CASCADE", on_update => "CASCADE" }, |
216 |
); |
217 |
|
218 |
# You can replace this text with custom content, and it will be preserved on regeneration |
219 |
1; |