Bug 12478: update the schema
[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: 'text'
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: 'mediumtext'
70   is_nullable: 1
71
72 =head2 filename
73
74   data_type: 'text'
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 => "text", is_nullable => 1 },
98   "basketno",
99   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
100   "raw_msg",
101   { data_type => "mediumtext", is_nullable => 1 },
102   "filename",
103   { data_type => "text", 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 edi_acct
158
159 Type: belongs_to
160
161 Related object: L<Koha::Schema::Result::VendorEdiAccount>
162
163 =cut
164
165 __PACKAGE__->belongs_to(
166   "edi_acct",
167   "Koha::Schema::Result::VendorEdiAccount",
168   { id => "edi_acct" },
169   {
170     is_deferrable => 1,
171     join_type     => "LEFT",
172     on_delete     => "RESTRICT",
173     on_update     => "RESTRICT",
174   },
175 );
176
177 =head2 vendor
178
179 Type: belongs_to
180
181 Related object: L<Koha::Schema::Result::Aqbookseller>
182
183 =cut
184
185 __PACKAGE__->belongs_to(
186   "vendor",
187   "Koha::Schema::Result::Aqbookseller",
188   { id => "vendor_id" },
189   {
190     is_deferrable => 1,
191     join_type     => "LEFT",
192     on_delete     => "RESTRICT",
193     on_update     => "RESTRICT",
194   },
195 );
196
197
198 # Created by DBIx::Class::Schema::Loader v0.07033 @ 2015-02-25 10:41:36
199 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l4h8AsG2RJupxXQcEw8yzQ
200
201
202 1;