Lines 1-12
Link Here
|
1 |
use utf8; |
1 |
use utf8; |
2 |
package Koha::Schema::Result::Accountoffset; |
2 |
package Koha::Schema::Result::AccountOffset; |
3 |
|
3 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
6 |
|
7 |
=head1 NAME |
7 |
=head1 NAME |
8 |
|
8 |
|
9 |
Koha::Schema::Result::Accountoffset |
9 |
Koha::Schema::Result::AccountOffset |
10 |
|
10 |
|
11 |
=cut |
11 |
=cut |
12 |
|
12 |
|
Lines 15-54
use warnings;
Link Here
|
15 |
|
15 |
|
16 |
use base 'DBIx::Class::Core'; |
16 |
use base 'DBIx::Class::Core'; |
17 |
|
17 |
|
18 |
=head1 TABLE: C<accountoffsets> |
18 |
=head1 TABLE: C<account_offsets> |
19 |
|
19 |
|
20 |
=cut |
20 |
=cut |
21 |
|
21 |
|
22 |
__PACKAGE__->table("accountoffsets"); |
22 |
__PACKAGE__->table("account_offsets"); |
23 |
|
23 |
|
24 |
=head1 ACCESSORS |
24 |
=head1 ACCESSORS |
25 |
|
25 |
|
26 |
=head2 borrowernumber |
26 |
=head2 id |
27 |
|
27 |
|
28 |
data_type: 'integer' |
28 |
data_type: 'integer' |
29 |
default_value: 0 |
29 |
is_auto_increment: 1 |
30 |
is_foreign_key: 1 |
|
|
31 |
is_nullable: 0 |
30 |
is_nullable: 0 |
32 |
|
31 |
|
33 |
=head2 accountno |
32 |
=head2 credit_id |
34 |
|
33 |
|
35 |
data_type: 'smallint' |
34 |
data_type: 'integer' |
36 |
default_value: 0 |
35 |
is_foreign_key: 1 |
37 |
is_nullable: 0 |
36 |
is_nullable: 1 |
38 |
|
37 |
|
39 |
=head2 offsetaccount |
38 |
=head2 debit_id |
|
|
39 |
|
40 |
data_type: 'integer' |
41 |
is_foreign_key: 1 |
42 |
is_nullable: 1 |
40 |
|
43 |
|
41 |
data_type: 'smallint' |
44 |
=head2 type |
42 |
default_value: 0 |
45 |
|
|
|
46 |
data_type: 'varchar' |
43 |
is_nullable: 0 |
47 |
is_nullable: 0 |
|
|
48 |
size: 16 |
44 |
|
49 |
|
45 |
=head2 offsetamount |
50 |
=head2 amount |
46 |
|
51 |
|
47 |
data_type: 'decimal' |
52 |
data_type: 'decimal' |
48 |
is_nullable: 1 |
53 |
is_nullable: 0 |
49 |
size: [28,6] |
54 |
size: [26,6] |
50 |
|
55 |
|
51 |
=head2 timestamp |
56 |
=head2 created_on |
52 |
|
57 |
|
53 |
data_type: 'timestamp' |
58 |
data_type: 'timestamp' |
54 |
datetime_undef_if_invalid: 1 |
59 |
datetime_undef_if_invalid: 1 |
Lines 58-77
__PACKAGE__->table("accountoffsets");
Link Here
|
58 |
=cut |
63 |
=cut |
59 |
|
64 |
|
60 |
__PACKAGE__->add_columns( |
65 |
__PACKAGE__->add_columns( |
61 |
"borrowernumber", |
66 |
"id", |
62 |
{ |
67 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
63 |
data_type => "integer", |
68 |
"credit_id", |
64 |
default_value => 0, |
69 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
65 |
is_foreign_key => 1, |
70 |
"debit_id", |
66 |
is_nullable => 0, |
71 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
67 |
}, |
72 |
"type", |
68 |
"accountno", |
73 |
{ data_type => "varchar", is_nullable => 0, size => 16 }, |
69 |
{ data_type => "smallint", default_value => 0, is_nullable => 0 }, |
74 |
"amount", |
70 |
"offsetaccount", |
75 |
{ data_type => "decimal", is_nullable => 0, size => [26, 6] }, |
71 |
{ data_type => "smallint", default_value => 0, is_nullable => 0 }, |
76 |
"created_on", |
72 |
"offsetamount", |
|
|
73 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
74 |
"timestamp", |
75 |
{ |
77 |
{ |
76 |
data_type => "timestamp", |
78 |
data_type => "timestamp", |
77 |
datetime_undef_if_invalid => 1, |
79 |
datetime_undef_if_invalid => 1, |
Lines 80-106
__PACKAGE__->add_columns(
Link Here
|
80 |
}, |
82 |
}, |
81 |
); |
83 |
); |
82 |
|
84 |
|
|
|
85 |
=head1 PRIMARY KEY |
86 |
|
87 |
=over 4 |
88 |
|
89 |
=item * L</id> |
90 |
|
91 |
=back |
92 |
|
93 |
=cut |
94 |
|
95 |
__PACKAGE__->set_primary_key("id"); |
96 |
|
83 |
=head1 RELATIONS |
97 |
=head1 RELATIONS |
84 |
|
98 |
|
85 |
=head2 borrowernumber |
99 |
=head2 credit |
86 |
|
100 |
|
87 |
Type: belongs_to |
101 |
Type: belongs_to |
88 |
|
102 |
|
89 |
Related object: L<Koha::Schema::Result::Borrower> |
103 |
Related object: L<Koha::Schema::Result::Accountline> |
90 |
|
104 |
|
91 |
=cut |
105 |
=cut |
92 |
|
106 |
|
93 |
__PACKAGE__->belongs_to( |
107 |
__PACKAGE__->belongs_to( |
94 |
"borrowernumber", |
108 |
"credit", |
95 |
"Koha::Schema::Result::Borrower", |
109 |
"Koha::Schema::Result::Accountline", |
96 |
{ borrowernumber => "borrowernumber" }, |
110 |
{ accountlines_id => "credit_id" }, |
97 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
111 |
{ |
|
|
112 |
is_deferrable => 1, |
113 |
join_type => "LEFT", |
114 |
on_delete => "CASCADE", |
115 |
on_update => "CASCADE", |
116 |
}, |
117 |
); |
118 |
|
119 |
=head2 debit |
120 |
|
121 |
Type: belongs_to |
122 |
|
123 |
Related object: L<Koha::Schema::Result::Accountline> |
124 |
|
125 |
=cut |
126 |
|
127 |
__PACKAGE__->belongs_to( |
128 |
"debit", |
129 |
"Koha::Schema::Result::Accountline", |
130 |
{ accountlines_id => "debit_id" }, |
131 |
{ |
132 |
is_deferrable => 1, |
133 |
join_type => "LEFT", |
134 |
on_delete => "CASCADE", |
135 |
on_update => "CASCADE", |
136 |
}, |
98 |
); |
137 |
); |
99 |
|
138 |
|
100 |
|
139 |
|
101 |
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 |
140 |
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-12 14:26:28 |
102 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OTfcUiJCPb5aU/gjqAb/bA |
141 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eu/gSdbAUL5bwhcvC+MGsw |
103 |
|
142 |
|
104 |
|
143 |
|
105 |
# You can replace this text with custom content, and it will be preserved on regeneration |
144 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
106 |
1; |
145 |
1; |