Bug 25501: Supress warnings on installing translation
[koha.git] / Koha / Schema / Result / Accountline.pm
blob12bb08c17e4640d96d4fc671e10a2f708ba296c3
1 use utf8;
2 package Koha::Schema::Result::Accountline;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Accountline
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<accountlines>
20 =cut
22 __PACKAGE__->table("accountlines");
24 =head1 ACCESSORS
26 =head2 accountlines_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 issue_id
34 data_type: 'integer'
35 is_nullable: 1
37 =head2 borrowernumber
39 data_type: 'integer'
40 is_foreign_key: 1
41 is_nullable: 1
43 =head2 itemnumber
45 data_type: 'integer'
46 is_foreign_key: 1
47 is_nullable: 1
49 =head2 date
51 data_type: 'timestamp'
52 datetime_undef_if_invalid: 1
53 is_nullable: 1
55 =head2 amount
57 data_type: 'decimal'
58 is_nullable: 1
59 size: [28,6]
61 =head2 description
63 data_type: 'longtext'
64 is_nullable: 1
66 =head2 credit_type_code
68 data_type: 'varchar'
69 is_foreign_key: 1
70 is_nullable: 1
71 size: 80
73 =head2 debit_type_code
75 data_type: 'varchar'
76 is_foreign_key: 1
77 is_nullable: 1
78 size: 80
80 =head2 status
82 data_type: 'varchar'
83 is_nullable: 1
84 size: 16
86 =head2 payment_type
88 data_type: 'varchar'
89 is_nullable: 1
90 size: 80
92 =head2 amountoutstanding
94 data_type: 'decimal'
95 is_nullable: 1
96 size: [28,6]
98 =head2 timestamp
100 data_type: 'timestamp'
101 datetime_undef_if_invalid: 1
102 default_value: current_timestamp
103 is_nullable: 0
105 =head2 note
107 data_type: 'mediumtext'
108 is_nullable: 1
110 =head2 manager_id
112 data_type: 'integer'
113 is_foreign_key: 1
114 is_nullable: 1
116 =head2 register_id
118 data_type: 'integer'
119 is_foreign_key: 1
120 is_nullable: 1
122 =head2 interface
124 data_type: 'varchar'
125 is_nullable: 0
126 size: 16
128 =head2 branchcode
130 data_type: 'varchar'
131 is_foreign_key: 1
132 is_nullable: 1
133 size: 10
135 =cut
137 __PACKAGE__->add_columns(
138 "accountlines_id",
139 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
140 "issue_id",
141 { data_type => "integer", is_nullable => 1 },
142 "borrowernumber",
143 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
144 "itemnumber",
145 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
146 "date",
148 data_type => "timestamp",
149 datetime_undef_if_invalid => 1,
150 is_nullable => 1,
152 "amount",
153 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
154 "description",
155 { data_type => "longtext", is_nullable => 1 },
156 "credit_type_code",
157 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
158 "debit_type_code",
159 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
160 "status",
161 { data_type => "varchar", is_nullable => 1, size => 16 },
162 "payment_type",
163 { data_type => "varchar", is_nullable => 1, size => 80 },
164 "amountoutstanding",
165 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
166 "timestamp",
168 data_type => "timestamp",
169 datetime_undef_if_invalid => 1,
170 default_value => \"current_timestamp",
171 is_nullable => 0,
173 "note",
174 { data_type => "mediumtext", is_nullable => 1 },
175 "manager_id",
176 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
177 "register_id",
178 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
179 "interface",
180 { data_type => "varchar", is_nullable => 0, size => 16 },
181 "branchcode",
182 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
185 =head1 PRIMARY KEY
187 =over 4
189 =item * L</accountlines_id>
191 =back
193 =cut
195 __PACKAGE__->set_primary_key("accountlines_id");
197 =head1 RELATIONS
199 =head2 account_offsets_credits
201 Type: has_many
203 Related object: L<Koha::Schema::Result::AccountOffset>
205 =cut
207 __PACKAGE__->has_many(
208 "account_offsets_credits",
209 "Koha::Schema::Result::AccountOffset",
210 { "foreign.credit_id" => "self.accountlines_id" },
211 { cascade_copy => 0, cascade_delete => 0 },
214 =head2 account_offsets_debits
216 Type: has_many
218 Related object: L<Koha::Schema::Result::AccountOffset>
220 =cut
222 __PACKAGE__->has_many(
223 "account_offsets_debits",
224 "Koha::Schema::Result::AccountOffset",
225 { "foreign.debit_id" => "self.accountlines_id" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 borrowernumber
231 Type: belongs_to
233 Related object: L<Koha::Schema::Result::Borrower>
235 =cut
237 __PACKAGE__->belongs_to(
238 "borrowernumber",
239 "Koha::Schema::Result::Borrower",
240 { borrowernumber => "borrowernumber" },
242 is_deferrable => 1,
243 join_type => "LEFT",
244 on_delete => "SET NULL",
245 on_update => "CASCADE",
249 =head2 branchcode
251 Type: belongs_to
253 Related object: L<Koha::Schema::Result::Branch>
255 =cut
257 __PACKAGE__->belongs_to(
258 "branchcode",
259 "Koha::Schema::Result::Branch",
260 { branchcode => "branchcode" },
262 is_deferrable => 1,
263 join_type => "LEFT",
264 on_delete => "SET NULL",
265 on_update => "CASCADE",
269 =head2 credit_type_code
271 Type: belongs_to
273 Related object: L<Koha::Schema::Result::AccountCreditType>
275 =cut
277 __PACKAGE__->belongs_to(
278 "credit_type_code",
279 "Koha::Schema::Result::AccountCreditType",
280 { code => "credit_type_code" },
282 is_deferrable => 1,
283 join_type => "LEFT",
284 on_delete => "RESTRICT",
285 on_update => "CASCADE",
289 =head2 debit_type_code
291 Type: belongs_to
293 Related object: L<Koha::Schema::Result::AccountDebitType>
295 =cut
297 __PACKAGE__->belongs_to(
298 "debit_type_code",
299 "Koha::Schema::Result::AccountDebitType",
300 { code => "debit_type_code" },
302 is_deferrable => 1,
303 join_type => "LEFT",
304 on_delete => "RESTRICT",
305 on_update => "CASCADE",
309 =head2 itemnumber
311 Type: belongs_to
313 Related object: L<Koha::Schema::Result::Item>
315 =cut
317 __PACKAGE__->belongs_to(
318 "itemnumber",
319 "Koha::Schema::Result::Item",
320 { itemnumber => "itemnumber" },
322 is_deferrable => 1,
323 join_type => "LEFT",
324 on_delete => "SET NULL",
325 on_update => "CASCADE",
329 =head2 manager
331 Type: belongs_to
333 Related object: L<Koha::Schema::Result::Borrower>
335 =cut
337 __PACKAGE__->belongs_to(
338 "manager",
339 "Koha::Schema::Result::Borrower",
340 { borrowernumber => "manager_id" },
342 is_deferrable => 1,
343 join_type => "LEFT",
344 on_delete => "SET NULL",
345 on_update => "CASCADE",
349 =head2 register
351 Type: belongs_to
353 Related object: L<Koha::Schema::Result::CashRegister>
355 =cut
357 __PACKAGE__->belongs_to(
358 "register",
359 "Koha::Schema::Result::CashRegister",
360 { id => "register_id" },
362 is_deferrable => 1,
363 join_type => "LEFT",
364 on_delete => "SET NULL",
365 on_update => "CASCADE",
370 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-19 09:20:20
371 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BuE4CYsSH4BwXZoQKE2MWw
373 sub koha_objects_class {
374 'Koha::Account::Lines';
376 sub koha_object_class {
377 'Koha::Account::Line';