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