Bug 7736: Support Ordering via Edifact EDI messages
[koha.git] / Koha / Schema / Result / EdifactEan.pm
1 use utf8;
2 package Koha::Schema::Result::EdifactEan;
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::EdifactEan
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<edifact_ean>
19
20 =cut
21
22 __PACKAGE__->table("edifact_ean");
23
24 =head1 ACCESSORS
25
26 =head2 ee_id
27
28   data_type: 'integer'
29   extra: {unsigned => 1}
30   is_auto_increment: 1
31   is_nullable: 0
32
33 =head2 branchcode
34
35   data_type: 'varchar'
36   is_foreign_key: 1
37   is_nullable: 0
38   size: 10
39
40 =head2 ean
41
42   data_type: 'varchar'
43   is_nullable: 0
44   size: 15
45
46 =head2 id_code_qualifier
47
48   data_type: 'varchar'
49   default_value: 14
50   is_nullable: 0
51   size: 3
52
53 =cut
54
55 __PACKAGE__->add_columns(
56   "ee_id",
57   {
58     data_type => "integer",
59     extra => { unsigned => 1 },
60     is_auto_increment => 1,
61     is_nullable => 0,
62   },
63   "branchcode",
64   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
65   "ean",
66   { data_type => "varchar", is_nullable => 0, size => 15 },
67   "id_code_qualifier",
68   { data_type => "varchar", default_value => 14, is_nullable => 0, size => 3 },
69 );
70
71 =head1 PRIMARY KEY
72
73 =over 4
74
75 =item * L</ee_id>
76
77 =back
78
79 =cut
80
81 __PACKAGE__->set_primary_key("ee_id");
82
83 =head1 RELATIONS
84
85 =head2 branchcode
86
87 Type: belongs_to
88
89 Related object: L<Koha::Schema::Result::Branch>
90
91 =cut
92
93 __PACKAGE__->belongs_to(
94   "branchcode",
95   "Koha::Schema::Result::Branch",
96   { branchcode => "branchcode" },
97   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
98 );
99
100
101 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-06-12 10:22:04
102 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WWcMBSXeuzgCPqM0KMxfBg
103
104
105 # You can replace this text with custom code or comments, and it will be preserved on regeneration
106 __PACKAGE__->belongs_to('branch',
107     "Koha::Schema::Result::Branch",
108     { 'branchcode' => 'branchcode' },
109     {
110         is_deferrable => 1,
111         join_type => 'LEFT',
112         on_delete => 'CASCADE',
113         on_update => 'CASCADE',
114     },
115 );
116
117 1;