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