]> git.koha-community.org Git - koha.git/blob - Koha/Schema/Result/EdifactMessage.pm
Bug ?????: DBIC schema changes: bug of dbic or forgotten update
[koha.git] / Koha / Schema / Result / EdifactMessage.pm
1 use utf8;
2 package Koha::Schema::Result::EdifactMessage;
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::EdifactMessage
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<edifact_messages>
19
20 =cut
21
22 __PACKAGE__->table("edifact_messages");
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 message_type
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 10
37
38 =head2 transfer_date
39
40   data_type: 'date'
41   datetime_undef_if_invalid: 1
42   is_nullable: 1
43
44 =head2 vendor_id
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 1
49
50 =head2 edi_acct
51
52   data_type: 'integer'
53   is_foreign_key: 1
54   is_nullable: 1
55
56 =head2 status
57
58   data_type: 'mediumtext'
59   is_nullable: 1
60
61 =head2 basketno
62
63   data_type: 'integer'
64   is_foreign_key: 1
65   is_nullable: 1
66
67 =head2 raw_msg
68
69   data_type: 'longtext'
70   is_nullable: 1
71
72 =head2 filename
73
74   data_type: 'mediumtext'
75   is_nullable: 1
76
77 =head2 deleted
78
79   data_type: 'tinyint'
80   default_value: 0
81   is_nullable: 0
82
83 =cut
84
85 __PACKAGE__->add_columns(
86   "id",
87   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
88   "message_type",
89   { data_type => "varchar", is_nullable => 0, size => 10 },
90   "transfer_date",
91   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
92   "vendor_id",
93   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
94   "edi_acct",
95   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
96   "status",
97   { data_type => "mediumtext", is_nullable => 1 },
98   "basketno",
99   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
100   "raw_msg",
101   { data_type => "longtext", is_nullable => 1 },
102   "filename",
103   { data_type => "mediumtext", is_nullable => 1 },
104   "deleted",
105   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
106 );
107
108 =head1 PRIMARY KEY
109
110 =over 4
111
112 =item * L</id>
113
114 =back
115
116 =cut
117
118 __PACKAGE__->set_primary_key("id");
119
120 =head1 RELATIONS
121
122 =head2 aqinvoices
123
124 Type: has_many
125
126 Related object: L<Koha::Schema::Result::Aqinvoice>
127
128 =cut
129
130 __PACKAGE__->has_many(
131   "aqinvoices",
132   "Koha::Schema::Result::Aqinvoice",
133   { "foreign.message_id" => "self.id" },
134   { cascade_copy => 0, cascade_delete => 0 },
135 );
136
137 =head2 basketno
138
139 Type: belongs_to
140
141 Related object: L<Koha::Schema::Result::Aqbasket>
142
143 =cut
144
145 __PACKAGE__->belongs_to(
146   "basketno",
147   "Koha::Schema::Result::Aqbasket",
148   { basketno => "basketno" },
149   {
150     is_deferrable => 1,
151     join_type     => "LEFT",
152     on_delete     => "RESTRICT",
153     on_update     => "RESTRICT",
154   },
155 );
156
157 =head2 basketno_2
158
159 Type: belongs_to
160
161 Related object: L<Koha::Schema::Result::Aqbasket>
162
163 =cut
164
165 __PACKAGE__->belongs_to(
166   "basketno_2",
167   "Koha::Schema::Result::Aqbasket",
168   { basketno => "basketno" },
169   {
170     is_deferrable => 1,
171     join_type     => "LEFT",
172     on_delete     => "CASCADE",
173     on_update     => "CASCADE",
174   },
175 );
176
177 =head2 edi_acct
178
179 Type: belongs_to
180
181 Related object: L<Koha::Schema::Result::VendorEdiAccount>
182
183 =cut
184
185 __PACKAGE__->belongs_to(
186   "edi_acct",
187   "Koha::Schema::Result::VendorEdiAccount",
188   { id => "edi_acct" },
189   {
190     is_deferrable => 1,
191     join_type     => "LEFT",
192     on_delete     => "RESTRICT",
193     on_update     => "RESTRICT",
194   },
195 );
196
197 =head2 edi_acct_2
198
199 Type: belongs_to
200
201 Related object: L<Koha::Schema::Result::VendorEdiAccount>
202
203 =cut
204
205 __PACKAGE__->belongs_to(
206   "edi_acct_2",
207   "Koha::Schema::Result::VendorEdiAccount",
208   { id => "edi_acct" },
209   {
210     is_deferrable => 1,
211     join_type     => "LEFT",
212     on_delete     => "CASCADE",
213     on_update     => "CASCADE",
214   },
215 );
216
217 =head2 vendor
218
219 Type: belongs_to
220
221 Related object: L<Koha::Schema::Result::Aqbookseller>
222
223 =cut
224
225 __PACKAGE__->belongs_to(
226   "vendor",
227   "Koha::Schema::Result::Aqbookseller",
228   { id => "vendor_id" },
229   {
230     is_deferrable => 1,
231     join_type     => "LEFT",
232     on_delete     => "RESTRICT",
233     on_update     => "RESTRICT",
234   },
235 );
236
237 =head2 vendor_2
238
239 Type: belongs_to
240
241 Related object: L<Koha::Schema::Result::Aqbookseller>
242
243 =cut
244
245 __PACKAGE__->belongs_to(
246   "vendor_2",
247   "Koha::Schema::Result::Aqbookseller",
248   { id => "vendor_id" },
249   {
250     is_deferrable => 1,
251     join_type     => "LEFT",
252     on_delete     => "CASCADE",
253     on_update     => "CASCADE",
254   },
255 );
256
257
258 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17
259 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A/Si6z6lih7nS39P5jTffA
260
261 __PACKAGE__->add_columns(
262     '+deleted' => { is_boolean => 1 },
263 );
264
265 1;