View | Details | Raw Unified | Return to bug 14826
Collapse All | Expand All

(-)a/Koha/Schema/Result/AccountOffset.pm (-1 / +145 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::AccountOffset;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::AccountOffset
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_offsets>
19
20
=cut
21
22
__PACKAGE__->table("account_offsets");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 credit_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 debit_id
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
44
=head2 type
45
46
  data_type: 'varchar'
47
  is_nullable: 0
48
  size: 16
49
50
=head2 amount
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [26,6]
55
56
=head2 created_on
57
58
  data_type: 'timestamp'
59
  datetime_undef_if_invalid: 1
60
  default_value: current_timestamp
61
  is_nullable: 0
62
63
=cut
64
65
__PACKAGE__->add_columns(
66
  "id",
67
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
68
  "credit_id",
69
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
70
  "debit_id",
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
72
  "type",
73
  { data_type => "varchar", is_nullable => 0, size => 16 },
74
  "amount",
75
  { data_type => "decimal", is_nullable => 0, size => [26, 6] },
76
  "created_on",
77
  {
78
    data_type => "timestamp",
79
    datetime_undef_if_invalid => 1,
80
    default_value => \"current_timestamp",
81
    is_nullable => 0,
82
  },
83
);
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
97
=head1 RELATIONS
98
99
=head2 credit
100
101
Type: belongs_to
102
103
Related object: L<Koha::Schema::Result::Accountline>
104
105
=cut
106
107
__PACKAGE__->belongs_to(
108
  "credit",
109
  "Koha::Schema::Result::Accountline",
110
  { accountlines_id => "credit_id" },
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
  },
137
);
138
139
140
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-15 16:13:26
141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CQ2SRBUEiVgEVhe88acqqA
142
143
144
# You can replace this text with custom code or comments, and it will be preserved on regeneration
145
1;

Return to bug 14826