Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / Accountline.pm
blobc2ae858a96915d09a9a2f73f19235449b96f156a
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: 'date'
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 accounttype
68 data_type: 'varchar'
69 is_nullable: 1
70 size: 80
72 =head2 status
74 data_type: 'varchar'
75 is_nullable: 1
76 size: 16
78 =head2 payment_type
80 data_type: 'varchar'
81 is_nullable: 1
82 size: 80
84 =head2 amountoutstanding
86 data_type: 'decimal'
87 is_nullable: 1
88 size: [28,6]
90 =head2 timestamp
92 data_type: 'timestamp'
93 datetime_undef_if_invalid: 1
94 default_value: current_timestamp
95 is_nullable: 0
97 =head2 note
99 data_type: 'mediumtext'
100 is_nullable: 1
102 =head2 manager_id
104 data_type: 'integer'
105 is_foreign_key: 1
106 is_nullable: 1
108 =head2 register_id
110 data_type: 'integer'
111 is_foreign_key: 1
112 is_nullable: 1
114 =head2 interface
116 data_type: 'varchar'
117 is_nullable: 0
118 size: 16
120 =head2 branchcode
122 data_type: 'varchar'
123 is_foreign_key: 1
124 is_nullable: 1
125 size: 10
127 =cut
129 __PACKAGE__->add_columns(
130 "accountlines_id",
131 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
132 "issue_id",
133 { data_type => "integer", is_nullable => 1 },
134 "borrowernumber",
135 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
136 "itemnumber",
137 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
138 "date",
139 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
140 "amount",
141 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
142 "description",
143 { data_type => "longtext", is_nullable => 1 },
144 "accounttype",
145 { data_type => "varchar", is_nullable => 1, size => 80 },
146 "status",
147 { data_type => "varchar", is_nullable => 1, size => 16 },
148 "payment_type",
149 { data_type => "varchar", is_nullable => 1, size => 80 },
150 "amountoutstanding",
151 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
152 "timestamp",
154 data_type => "timestamp",
155 datetime_undef_if_invalid => 1,
156 default_value => \"current_timestamp",
157 is_nullable => 0,
159 "note",
160 { data_type => "mediumtext", is_nullable => 1 },
161 "manager_id",
162 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
163 "register_id",
164 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
165 "interface",
166 { data_type => "varchar", is_nullable => 0, size => 16 },
167 "branchcode",
168 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
171 =head1 PRIMARY KEY
173 =over 4
175 =item * L</accountlines_id>
177 =back
179 =cut
181 __PACKAGE__->set_primary_key("accountlines_id");
183 =head1 RELATIONS
185 =head2 account_offsets_credits
187 Type: has_many
189 Related object: L<Koha::Schema::Result::AccountOffset>
191 =cut
193 __PACKAGE__->has_many(
194 "account_offsets_credits",
195 "Koha::Schema::Result::AccountOffset",
196 { "foreign.credit_id" => "self.accountlines_id" },
197 { cascade_copy => 0, cascade_delete => 0 },
200 =head2 account_offsets_debits
202 Type: has_many
204 Related object: L<Koha::Schema::Result::AccountOffset>
206 =cut
208 __PACKAGE__->has_many(
209 "account_offsets_debits",
210 "Koha::Schema::Result::AccountOffset",
211 { "foreign.debit_id" => "self.accountlines_id" },
212 { cascade_copy => 0, cascade_delete => 0 },
215 =head2 borrowernumber
217 Type: belongs_to
219 Related object: L<Koha::Schema::Result::Borrower>
221 =cut
223 __PACKAGE__->belongs_to(
224 "borrowernumber",
225 "Koha::Schema::Result::Borrower",
226 { borrowernumber => "borrowernumber" },
228 is_deferrable => 1,
229 join_type => "LEFT",
230 on_delete => "SET NULL",
231 on_update => "CASCADE",
235 =head2 branchcode
237 Type: belongs_to
239 Related object: L<Koha::Schema::Result::Branch>
241 =cut
243 __PACKAGE__->belongs_to(
244 "branchcode",
245 "Koha::Schema::Result::Branch",
246 { branchcode => "branchcode" },
248 is_deferrable => 1,
249 join_type => "LEFT",
250 on_delete => "SET NULL",
251 on_update => "CASCADE",
255 =head2 itemnumber
257 Type: belongs_to
259 Related object: L<Koha::Schema::Result::Item>
261 =cut
263 __PACKAGE__->belongs_to(
264 "itemnumber",
265 "Koha::Schema::Result::Item",
266 { itemnumber => "itemnumber" },
268 is_deferrable => 1,
269 join_type => "LEFT",
270 on_delete => "SET NULL",
271 on_update => "CASCADE",
275 =head2 manager
277 Type: belongs_to
279 Related object: L<Koha::Schema::Result::Borrower>
281 =cut
283 __PACKAGE__->belongs_to(
284 "manager",
285 "Koha::Schema::Result::Borrower",
286 { borrowernumber => "manager_id" },
288 is_deferrable => 1,
289 join_type => "LEFT",
290 on_delete => "SET NULL",
291 on_update => "CASCADE",
295 =head2 register
297 Type: belongs_to
299 Related object: L<Koha::Schema::Result::CashRegister>
301 =cut
303 __PACKAGE__->belongs_to(
304 "register",
305 "Koha::Schema::Result::CashRegister",
306 { id => "register_id" },
308 is_deferrable => 1,
309 join_type => "LEFT",
310 on_delete => "SET NULL",
311 on_update => "CASCADE",
316 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-23 10:45:21
317 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L+QlTTT+MdGoA3shpyaBgQ
319 sub koha_objects_class {
320 'Koha::Account::Lines';
322 sub koha_object_class {
323 'Koha::Account::Line';