-
Notifications
You must be signed in to change notification settings - Fork 54
/
FeeTransaction.pm
55 lines (43 loc) · 1.63 KB
/
FeeTransaction.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package Koha::Schema::FeeTransaction;
use strict;
use base qw(Koha::Schema::DB::Object::AutoBase1);
__PACKAGE__->meta->setup(
table => 'fee_transactions',
columns => [
id => { type => 'serial', not_null => 1 },
fee_id => { type => 'integer' },
payment_id => { type => 'integer' },
borrowernumber => { type => 'integer', not_null => 1 },
description => { type => 'scalar', length => 16777215 },
amount => { type => 'numeric', default => '0.000000', precision => 28, scale => 6 },
accounttype => { type => 'varchar', length => 16 },
operator_id => { type => 'integer' },
branchcode => { type => 'varchar', length => 10 },
date => { type => 'date' },
timestamp => { type => 'timestamp', not_null => 1 },
],
primary_key_columns => [ 'id' ],
foreign_keys => [
accounttype_obj => {
class => 'Koha::Schema::Accounttype',
key_columns => { accounttype => 'accounttype' },
},
borrower => {
class => 'Koha::Schema::Borrower',
key_columns => { operator_id => 'borrowernumber' },
},
borrower_obj => {
class => 'Koha::Schema::Borrower',
key_columns => { borrowernumber => 'borrowernumber' },
},
fee => {
class => 'Koha::Schema::Fee',
key_columns => { fee_id => 'id' },
},
payment => {
class => 'Koha::Schema::Payment',
key_columns => { payment_id => 'id' },
},
],
);
1;