Bug 7736: Support Ordering via Edifact EDI messages
[koha.git] / Koha / Schema / Result / EdifactMessage.pm
blob3250a57e751361e364c821b7e1b17c729f79dd35
1 use utf8;
2 package Koha::Schema::Result::EdifactMessage;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::EdifactMessage
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<edifact_messages>
20 =cut
22 __PACKAGE__->table("edifact_messages");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 message_type
34 data_type: 'varchar'
35 is_nullable: 0
36 size: 10
38 =head2 transfer_date
40 data_type: 'date'
41 datetime_undef_if_invalid: 1
42 is_nullable: 1
44 =head2 vendor_id
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
50 =head2 edi_acct
52 data_type: 'integer'
53 is_foreign_key: 1
54 is_nullable: 1
56 =head2 status
58 data_type: 'text'
59 is_nullable: 1
61 =head2 basketno
63 data_type: 'integer'
64 is_foreign_key: 1
65 is_nullable: 1
67 =head2 raw_msg
69 data_type: 'mediumtext'
70 is_nullable: 1
72 =head2 filename
74 data_type: 'text'
75 is_nullable: 1
77 =head2 deleted
79 data_type: 'tinyint'
80 default_value: 0
81 is_nullable: 0
83 =cut
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 },
108 =head1 PRIMARY KEY
110 =over 4
112 =item * L</id>
114 =back
116 =cut
118 __PACKAGE__->set_primary_key("id");
120 =head1 RELATIONS
122 =head2 aqinvoices
124 Type: has_many
126 Related object: L<Koha::Schema::Result::Aqinvoice>
128 =cut
130 __PACKAGE__->has_many(
131 "aqinvoices",
132 "Koha::Schema::Result::Aqinvoice",
133 { "foreign.message_id" => "self.id" },
134 { cascade_copy => 0, cascade_delete => 0 },
137 =head2 basketno
139 Type: belongs_to
141 Related object: L<Koha::Schema::Result::Aqbasket>
143 =cut
145 __PACKAGE__->belongs_to(
146 "basketno",
147 "Koha::Schema::Result::Aqbasket",
148 { basketno => "basketno" },
150 is_deferrable => 1,
151 join_type => "LEFT",
152 on_delete => "RESTRICT",
153 on_update => "RESTRICT",
157 =head2 edi_acct
159 Type: belongs_to
161 Related object: L<Koha::Schema::Result::VendorEdiAccount>
163 =cut
165 __PACKAGE__->belongs_to(
166 "edi_acct",
167 "Koha::Schema::Result::VendorEdiAccount",
168 { id => "edi_acct" },
170 is_deferrable => 1,
171 join_type => "LEFT",
172 on_delete => "RESTRICT",
173 on_update => "RESTRICT",
177 =head2 vendor
179 Type: belongs_to
181 Related object: L<Koha::Schema::Result::Aqbookseller>
183 =cut
185 __PACKAGE__->belongs_to(
186 "vendor",
187 "Koha::Schema::Result::Aqbookseller",
188 { id => "vendor_id" },
190 is_deferrable => 1,
191 join_type => "LEFT",
192 on_delete => "RESTRICT",
193 on_update => "RESTRICT",
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