Bug 8798: DBIx::Class base classes for all Koha tables
[koha_ffzg] / Koha / Schema / Result / Accountline.pm
1 package Koha::Schema::Result::Accountline;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Accountline
15
16 =cut
17
18 __PACKAGE__->table("accountlines");
19
20 =head1 ACCESSORS
21
22 =head2 accountlines_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 borrowernumber
29
30   data_type: 'integer'
31   default_value: 0
32   is_foreign_key: 1
33   is_nullable: 0
34
35 =head2 accountno
36
37   data_type: 'smallint'
38   default_value: 0
39   is_nullable: 0
40
41 =head2 itemnumber
42
43   data_type: 'integer'
44   is_foreign_key: 1
45   is_nullable: 1
46
47 =head2 date
48
49   data_type: 'date'
50   is_nullable: 1
51
52 =head2 amount
53
54   data_type: 'decimal'
55   is_nullable: 1
56   size: [28,6]
57
58 =head2 description
59
60   data_type: 'mediumtext'
61   is_nullable: 1
62
63 =head2 dispute
64
65   data_type: 'mediumtext'
66   is_nullable: 1
67
68 =head2 accounttype
69
70   data_type: 'varchar'
71   is_nullable: 1
72   size: 5
73
74 =head2 amountoutstanding
75
76   data_type: 'decimal'
77   is_nullable: 1
78   size: [28,6]
79
80 =head2 lastincrement
81
82   data_type: 'decimal'
83   is_nullable: 1
84   size: [28,6]
85
86 =head2 timestamp
87
88   data_type: 'timestamp'
89   default_value: current_timestamp
90   is_nullable: 0
91
92 =head2 notify_id
93
94   data_type: 'integer'
95   default_value: 0
96   is_nullable: 0
97
98 =head2 notify_level
99
100   data_type: 'integer'
101   default_value: 0
102   is_nullable: 0
103
104 =head2 note
105
106   data_type: 'text'
107   is_nullable: 1
108
109 =head2 manager_id
110
111   data_type: 'integer'
112   is_nullable: 1
113
114 =cut
115
116 __PACKAGE__->add_columns(
117   "accountlines_id",
118   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
119   "borrowernumber",
120   {
121     data_type      => "integer",
122     default_value  => 0,
123     is_foreign_key => 1,
124     is_nullable    => 0,
125   },
126   "accountno",
127   { data_type => "smallint", default_value => 0, is_nullable => 0 },
128   "itemnumber",
129   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
130   "date",
131   { data_type => "date", is_nullable => 1 },
132   "amount",
133   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
134   "description",
135   { data_type => "mediumtext", is_nullable => 1 },
136   "dispute",
137   { data_type => "mediumtext", is_nullable => 1 },
138   "accounttype",
139   { data_type => "varchar", is_nullable => 1, size => 5 },
140   "amountoutstanding",
141   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
142   "lastincrement",
143   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
144   "timestamp",
145   {
146     data_type     => "timestamp",
147     default_value => \"current_timestamp",
148     is_nullable   => 0,
149   },
150   "notify_id",
151   { data_type => "integer", default_value => 0, is_nullable => 0 },
152   "notify_level",
153   { data_type => "integer", default_value => 0, is_nullable => 0 },
154   "note",
155   { data_type => "text", is_nullable => 1 },
156   "manager_id",
157   { data_type => "integer", is_nullable => 1 },
158 );
159 __PACKAGE__->set_primary_key("accountlines_id");
160
161 =head1 RELATIONS
162
163 =head2 borrowernumber
164
165 Type: belongs_to
166
167 Related object: L<Koha::Schema::Result::Borrower>
168
169 =cut
170
171 __PACKAGE__->belongs_to(
172   "borrowernumber",
173   "Koha::Schema::Result::Borrower",
174   { borrowernumber => "borrowernumber" },
175   { on_delete => "CASCADE", on_update => "CASCADE" },
176 );
177
178 =head2 itemnumber
179
180 Type: belongs_to
181
182 Related object: L<Koha::Schema::Result::Item>
183
184 =cut
185
186 __PACKAGE__->belongs_to(
187   "itemnumber",
188   "Koha::Schema::Result::Item",
189   { itemnumber => "itemnumber" },
190   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
191 );
192
193
194 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
195 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+AbxKjLUR7hQsP2dpsyAPw
196
197
198 # You can replace this text with custom content, and it will be preserved on regeneration
199 1;