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 |
40 |
|
39 |
|
41 |
data_type: 'smallint' |
40 |
data_type: 'integer' |
42 |
default_value: 0 |
41 |
is_foreign_key: 1 |
|
|
42 |
is_nullable: 1 |
43 |
|
44 |
=head2 type |
45 |
|
46 |
data_type: 'varchar' |
47 |
is_foreign_key: 1 |
43 |
is_nullable: 0 |
48 |
is_nullable: 0 |
|
|
49 |
size: 16 |
44 |
|
50 |
|
45 |
=head2 offsetamount |
51 |
=head2 amount |
46 |
|
52 |
|
47 |
data_type: 'decimal' |
53 |
data_type: 'decimal' |
48 |
is_nullable: 1 |
54 |
is_nullable: 0 |
49 |
size: [28,6] |
55 |
size: [26,6] |
50 |
|
56 |
|
51 |
=head2 timestamp |
57 |
=head2 created_on |
52 |
|
58 |
|
53 |
data_type: 'timestamp' |
59 |
data_type: 'timestamp' |
54 |
datetime_undef_if_invalid: 1 |
60 |
datetime_undef_if_invalid: 1 |
Lines 58-77
__PACKAGE__->table("accountoffsets");
Link Here
|
58 |
=cut |
64 |
=cut |
59 |
|
65 |
|
60 |
__PACKAGE__->add_columns( |
66 |
__PACKAGE__->add_columns( |
61 |
"borrowernumber", |
67 |
"id", |
62 |
{ |
68 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
63 |
data_type => "integer", |
69 |
"credit_id", |
64 |
default_value => 0, |
70 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
65 |
is_foreign_key => 1, |
71 |
"debit_id", |
66 |
is_nullable => 0, |
72 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
67 |
}, |
73 |
"type", |
68 |
"accountno", |
74 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 16 }, |
69 |
{ data_type => "smallint", default_value => 0, is_nullable => 0 }, |
75 |
"amount", |
70 |
"offsetaccount", |
76 |
{ data_type => "decimal", is_nullable => 0, size => [26, 6] }, |
71 |
{ data_type => "smallint", default_value => 0, is_nullable => 0 }, |
77 |
"created_on", |
72 |
"offsetamount", |
|
|
73 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
74 |
"timestamp", |
75 |
{ |
78 |
{ |
76 |
data_type => "timestamp", |
79 |
data_type => "timestamp", |
77 |
datetime_undef_if_invalid => 1, |
80 |
datetime_undef_if_invalid => 1, |
Lines 80-106
__PACKAGE__->add_columns(
Link Here
|
80 |
}, |
83 |
}, |
81 |
); |
84 |
); |
82 |
|
85 |
|
|
|
86 |
=head1 PRIMARY KEY |
87 |
|
88 |
=over 4 |
89 |
|
90 |
=item * L</id> |
91 |
|
92 |
=back |
93 |
|
94 |
=cut |
95 |
|
96 |
__PACKAGE__->set_primary_key("id"); |
97 |
|
83 |
=head1 RELATIONS |
98 |
=head1 RELATIONS |
84 |
|
99 |
|
85 |
=head2 borrowernumber |
100 |
=head2 credit |
|
|
101 |
|
102 |
Type: belongs_to |
103 |
|
104 |
Related object: L<Koha::Schema::Result::Accountline> |
105 |
|
106 |
=cut |
107 |
|
108 |
__PACKAGE__->belongs_to( |
109 |
"credit", |
110 |
"Koha::Schema::Result::Accountline", |
111 |
{ accountlines_id => "credit_id" }, |
112 |
{ |
113 |
is_deferrable => 1, |
114 |
join_type => "LEFT", |
115 |
on_delete => "CASCADE", |
116 |
on_update => "CASCADE", |
117 |
}, |
118 |
); |
119 |
|
120 |
=head2 debit |
121 |
|
122 |
Type: belongs_to |
123 |
|
124 |
Related object: L<Koha::Schema::Result::Accountline> |
125 |
|
126 |
=cut |
127 |
|
128 |
__PACKAGE__->belongs_to( |
129 |
"debit", |
130 |
"Koha::Schema::Result::Accountline", |
131 |
{ accountlines_id => "debit_id" }, |
132 |
{ |
133 |
is_deferrable => 1, |
134 |
join_type => "LEFT", |
135 |
on_delete => "CASCADE", |
136 |
on_update => "CASCADE", |
137 |
}, |
138 |
); |
139 |
|
140 |
=head2 type |
86 |
|
141 |
|
87 |
Type: belongs_to |
142 |
Type: belongs_to |
88 |
|
143 |
|
89 |
Related object: L<Koha::Schema::Result::Borrower> |
144 |
Related object: L<Koha::Schema::Result::AccountOffsetType> |
90 |
|
145 |
|
91 |
=cut |
146 |
=cut |
92 |
|
147 |
|
93 |
__PACKAGE__->belongs_to( |
148 |
__PACKAGE__->belongs_to( |
94 |
"borrowernumber", |
149 |
"type", |
95 |
"Koha::Schema::Result::Borrower", |
150 |
"Koha::Schema::Result::AccountOffsetType", |
96 |
{ borrowernumber => "borrowernumber" }, |
151 |
{ type => "type" }, |
97 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
152 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
98 |
); |
153 |
); |
99 |
|
154 |
|
100 |
|
155 |
|
101 |
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 |
156 |
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-20 16:27:04 |
102 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OTfcUiJCPb5aU/gjqAb/bA |
157 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tPPrIug2c7PbDO7LCxCJAA |
103 |
|
158 |
|
104 |
|
159 |
|
105 |
# You can replace this text with custom content, and it will be preserved on regeneration |
160 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
106 |
1; |
161 |
1; |
107 |
- |
|
|