2ce507dd60ba3924a8dfb7e9bfd0f06c1a2a75c6
[koha.git] / Koha / Schema / Result / Aqbasket.pm
1 use utf8;
2 package Koha::Schema::Result::Aqbasket;
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::Aqbasket
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<aqbasket>
19
20 =cut
21
22 __PACKAGE__->table("aqbasket");
23
24 =head1 ACCESSORS
25
26 =head2 basketno
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 basketname
33
34   data_type: 'varchar'
35   is_nullable: 1
36   size: 50
37
38 =head2 note
39
40   data_type: 'mediumtext'
41   is_nullable: 1
42
43 =head2 booksellernote
44
45   data_type: 'mediumtext'
46   is_nullable: 1
47
48 =head2 contractnumber
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 1
53
54 =head2 creationdate
55
56   data_type: 'date'
57   datetime_undef_if_invalid: 1
58   is_nullable: 1
59
60 =head2 closedate
61
62   data_type: 'date'
63   datetime_undef_if_invalid: 1
64   is_nullable: 1
65
66 =head2 booksellerid
67
68   data_type: 'integer'
69   default_value: 1
70   is_foreign_key: 1
71   is_nullable: 0
72
73 =head2 authorisedby
74
75   data_type: 'varchar'
76   is_nullable: 1
77   size: 10
78
79 =head2 booksellerinvoicenumber
80
81   data_type: 'mediumtext'
82   is_nullable: 1
83
84 =head2 basketgroupid
85
86   data_type: 'integer'
87   is_foreign_key: 1
88   is_nullable: 1
89
90 =head2 deliveryplace
91
92   data_type: 'varchar'
93   is_nullable: 1
94   size: 10
95
96 =head2 billingplace
97
98   data_type: 'varchar'
99   is_nullable: 1
100   size: 10
101
102 =cut
103
104 __PACKAGE__->add_columns(
105   "basketno",
106   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
107   "basketname",
108   { data_type => "varchar", is_nullable => 1, size => 50 },
109   "note",
110   { data_type => "mediumtext", is_nullable => 1 },
111   "booksellernote",
112   { data_type => "mediumtext", is_nullable => 1 },
113   "contractnumber",
114   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
115   "creationdate",
116   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
117   "closedate",
118   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
119   "booksellerid",
120   {
121     data_type      => "integer",
122     default_value  => 1,
123     is_foreign_key => 1,
124     is_nullable    => 0,
125   },
126   "authorisedby",
127   { data_type => "varchar", is_nullable => 1, size => 10 },
128   "booksellerinvoicenumber",
129   { data_type => "mediumtext", is_nullable => 1 },
130   "basketgroupid",
131   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
132   "deliveryplace",
133   { data_type => "varchar", is_nullable => 1, size => 10 },
134   "billingplace",
135   { data_type => "varchar", is_nullable => 1, size => 10 },
136 );
137
138 =head1 PRIMARY KEY
139
140 =over 4
141
142 =item * L</basketno>
143
144 =back
145
146 =cut
147
148 __PACKAGE__->set_primary_key("basketno");
149
150 =head1 RELATIONS
151
152 =head2 aqorders
153
154 Type: has_many
155
156 Related object: L<Koha::Schema::Result::Aqorder>
157
158 =cut
159
160 __PACKAGE__->has_many(
161   "aqorders",
162   "Koha::Schema::Result::Aqorder",
163   { "foreign.basketno" => "self.basketno" },
164   { cascade_copy => 0, cascade_delete => 0 },
165 );
166
167 =head2 basketgroupid
168
169 Type: belongs_to
170
171 Related object: L<Koha::Schema::Result::Aqbasketgroup>
172
173 =cut
174
175 __PACKAGE__->belongs_to(
176   "basketgroupid",
177   "Koha::Schema::Result::Aqbasketgroup",
178   { id => "basketgroupid" },
179   {
180     is_deferrable => 1,
181     join_type     => "LEFT",
182     on_delete     => "CASCADE",
183     on_update     => "CASCADE",
184   },
185 );
186
187 =head2 booksellerid
188
189 Type: belongs_to
190
191 Related object: L<Koha::Schema::Result::Aqbookseller>
192
193 =cut
194
195 __PACKAGE__->belongs_to(
196   "booksellerid",
197   "Koha::Schema::Result::Aqbookseller",
198   { id => "booksellerid" },
199   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
200 );
201
202 =head2 contractnumber
203
204 Type: belongs_to
205
206 Related object: L<Koha::Schema::Result::Aqcontract>
207
208 =cut
209
210 __PACKAGE__->belongs_to(
211   "contractnumber",
212   "Koha::Schema::Result::Aqcontract",
213   { contractnumber => "contractnumber" },
214   {
215     is_deferrable => 1,
216     join_type     => "LEFT",
217     on_delete     => "CASCADE",
218     on_update     => "CASCADE",
219   },
220 );
221
222
223 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
224 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b4UNvDyA6jbgcTsaasbKYA
225
226
227 # You can replace this text with custom content, and it will be preserved on regeneration
228 1;