Bug 7736: Support Ordering via Edifact EDI messages
[koha.git] / Koha / Schema / Result / MsgInvoice.pm
blob830d6e5a297702bfd14ea23b5b46addf3207341f
1 use utf8;
2 package Koha::Schema::Result::MsgInvoice;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::MsgInvoice
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<msg_invoice>
20 =cut
22 __PACKAGE__->table("msg_invoice");
24 =head1 ACCESSORS
26 =head2 mi_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 msg_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 1
38 =head2 invoiceid
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
44 =cut
46 __PACKAGE__->add_columns(
47 "mi_id",
48 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
49 "msg_id",
50 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
51 "invoiceid",
52 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
55 =head1 PRIMARY KEY
57 =over 4
59 =item * L</mi_id>
61 =back
63 =cut
65 __PACKAGE__->set_primary_key("mi_id");
67 =head1 RELATIONS
69 =head2 invoiceid
71 Type: belongs_to
73 Related object: L<Koha::Schema::Result::Aqinvoice>
75 =cut
77 __PACKAGE__->belongs_to(
78 "invoiceid",
79 "Koha::Schema::Result::Aqinvoice",
80 { invoiceid => "invoiceid" },
82 is_deferrable => 1,
83 join_type => "LEFT",
84 on_delete => "RESTRICT",
85 on_update => "RESTRICT",
89 =head2 msg
91 Type: belongs_to
93 Related object: L<Koha::Schema::Result::EdifactMessage>
95 =cut
97 __PACKAGE__->belongs_to(
98 "msg",
99 "Koha::Schema::Result::EdifactMessage",
100 { id => "msg_id" },
102 is_deferrable => 1,
103 join_type => "LEFT",
104 on_delete => "RESTRICT",
105 on_update => "RESTRICT",
110 # Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-02 11:37:47
111 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F1jqlEH57dpxn2Pvm/vPGA
114 # You can replace this text with custom code or comments, and it will be preserved on regeneration